Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Feature Documentation #154

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Add Feature Documentation #154

wants to merge 2 commits into from

Conversation

TTWNO
Copy link
Member

@TTWNO TTWNO commented Sep 7, 2024

Fix #153

@albertotirla albertotirla marked this pull request as ready for review September 10, 2024 17:37
@albertotirla
Copy link
Member

alright, it looks good from my perspective, however there's one more thing that could be done if you want.
Optionally, you could add more details about what it means to make a type and implement FromAsyncState for it, basically point the contributors to a minimal example where this is implemented, via a link they can click on to get to the files, perhaps the handler for focused events is simple enough?

- [ ] Find the AT-SPI event that corresponds to the desired feature
- Take a look at the docs for `common/events/` and try to find the right event.
- For example, to create a feature that reads out changed text in an aria-live region, you would want the event `TextChangedEvent`.
- [ ] Decide if there are any pre-requisites to the feature being triggerwd (think: focused window only, open tab only, etc.)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- [ ] Decide if there are any pre-requisites to the feature being triggerwd (think: focused window only, open tab only, etc.)
- [ ] Decide if there are any prerequisites to the feature being triggered (think: focused window only, open tab only, etc.)

Spelling, consistency

- [ ] Decide what, if any, state is required for your feature (caret position, last focused item, etc.)
- For example: to know if the current window is focused, the current window must be stored in the state of the screen reader.
- [ ] Check to see if we already have your state info as a type; you can check this at `odilia/src/state.rs`.
- If not, make a [newtype](https://doc.rust-lang.org/book/ch19-04-advanced-types.html#using-the-newtype-pattern-for-type-safety-and-abstraction), add it to the `State` struct, then implement the `FromAsyncState` trait for the type (so it can be extracted by the `FromAsyncState` implementation).
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if it wouldn't be better, from a document-source-reading perspective, if this URL were a named reference? You'd change the link here to something like,

[newtype][newtype-pat]

And waay at the bottom of the file, drop in:

[newtype-pat]: https://doc.rust-lang.org/book/ch19-04-advanced-types.html#using-the-newtype-pattern-for-type-safety-and-abstraction

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Write Docs on How To Add A Feature/Functionality
3 participants