Input gestures dialog improvements#20437
Conversation
|
I have more for this pr, So I convurted to draft until my tests have been completed |
|
Done. It was about the actions and shortcuts of the input gestures dialog, So Now the actions and suggestion regarding the delete key for gesture delete shortcut is implemented. It was very annoying that we didn't have a (edit) possibility to edit a gesture raather than removing and adding again. It saves several steps for the user. Suggestions regarding shortcut keys for other actions (Add) and (edit) Are Welcome! |
|
I have just tested this PR. @amirmahdifard thanks for this! The possibility to be able to modify an existing gesture rather than having to delete and add a new one is very appreciated! What about using "Change" or "Modify" on the button rather than "Edit"? This would sound more natural to me. Please other people, give your opinion on this, especially if you are native English speaker. At last, playing with NVDA to test this PR, I have had an error once when trying to reopen the dialog. I have not been able to reproduce again so I do not know if it is related to this PR or not. Just reporting in case someone else has seen this issue. |
|
@CyrilleB79 hi, |
|
Hi! In my humble opinion, I don't think adding a button to edit an existing gesture is really necessary. It would introduce an additional button without providing a significant benefit. Replacing an existing gesture with a new one can already be done by pressing the Thanks. |
|
@tareh7z This is your personal opinion. We have open issue and a lot of user feedback regarding the possibility to edit gestures. |
|
Hi! I understand your point. My concern isn't the existence of an edit action itself, but whether it actually adds enough value in this specific case to justify another button in the UI. If users overwhelmingly prefer it and the feedback supports it, then that is a reasonable argument for adding it. Thanks. |
|
Hi, Some overall comments on this PR and other recent ones that I hope we can keep in mind when reviewing this work:
As you work on future NVDA pull requests, I kindly suggest thinking about the following question: how should I be remembered five years from now? Would you like to be remembered as someone pushing for personal opinions without considering others' thoughts thoroughly, or a contributor who understands you won't always get your proposals accepted? Choose wisely. Finally, one advice from a veteran contributor: you are at a stage in NVDA contribution where you must now consider what the organization (NV Access and the NVDA community overall) wants you to remember. when being hired or volunteering for the first time, people may think that they have some part in influencing the overall organization. This is not always the case: you will go through a phase where you will be torn between your "ideas" about work and the organizational reality you are facing. In NVDA contribution terms, this means your idea of "contributing" something to the NVDA project will be contrasted with what NV Access and the community actually demands from contributors: thorough thinking evidenced by issue/PR documentation, responding to comments and addressing review notes, to name a few. Only after going through this phase (having both general (macro-level) and personal (micro-level) understanding of what the community/organizations wants from you and finding a path toward your unique contribution) will you be seen as acceptable to the community (it took me a better part of 2012 and 2013 to go through this phase when it came to my NVDA work). As you can tell, my discussion of this "socialization" phase closely aligns with some of the big criticisms NV Access and some members of the community have for you: learn that nonacceptance is an option and gladly take it when it happens. So here's my advice: do not propose massive changes and pull requests until becoming comfortable with what the community expects from you. Good luck. Thanks. |
|
@tareh7z yes. You will even will be end up using it at some point if you for example want to change a gesture for one of your scripts, and an edit action in that case would look easya for you raather than remove>add. Thanks. |
|
Hi, I think there is another (implied) part to Tarik's question that I think we should address before continuing: what value will that bring to NVDA screen reader overall? Regarding wording, I propose "change". We have processes such as changing speech syntehsizers with the interface labeled "change" in NVDA settings/Speech panel. Terms like "edit" and "replace" are also good, but I think we should keep it a bit general and make it easy to translate. Also, one thing to keep in mind: it might be possible that one or more ad-dons might be relying on the "look and feel" of input gestures dialog. Adding new elements means these add-ons may need to be modified to offer the same "look and feel" if add-on authors choose to do so. Thanks. |
|
@josephsl I saw the open issue in github that was requesting editing existing gestures, And I didn't think that it's bad. I had the possibility, so I Implemented it, linked the related issue here, and submitted. I don't have anything else to say. |
|
There are no impact for addons, because I didn't touch an existing functions at all. |
|
I also support using 'change', which is clearer than editing and is only used to redefine new gestures |
|
There is a scenario where directly changing a gesture is very practical:
Additionally, if a new gesture is assigned incorrectly, or the wrong keyboard layout is selected for the gesture, using the Change command is also more efficient than deleting and then adding again. However, since this feature is not essential and there is now a context menu, I believe that:
|
|
Hi! I don't think anyone here is attacking you personally. People are questioning the proposal, not you, and that's a completely normal part of the review process in the open source world. Also, I think Joseph gave you a lot of valuable advice. He has many years of experience with both open source projects and NVDA itself, so I think it's worth taking his comments seriously, taking a step back, and reflecting on them, even if you ultimately don't agree with everything he said. Finally, I'd like to add that I agree with what @wmhn1872265132 said. Keeping the Change action in the context menu seems like the best solution for this kind of functionality. Thanks. |
|
For whatever it is worth, I also support this PR. Being able to change or modify an existing gesture would be hugely welcome. |
|
hi guys! thanks for all of your feedback!
|
|
I agree with renaming the "Edit" button to "Change": that would match what is already done in speech/braille settings panel. And to have a complete match, I suggest the same accelerator key, i.e. "h": "C&hange". On the presence of buttons or not, I agree with last message of @amirmahdifard. We should try to do something consistent: either we duplicate all actions on single item between buttons and context menu (Add, Change and Remove), or we duplicate none. At last, I can see that "Reset to factory defaults" has been added in the context menu. I disagree with this approach. Resetting to factory default is quite rare so we do not need it in context menu. It's also clearer to add in context menu only the actions that apply to the selected item only. At last, in the dictionary work, the global reset action has not been put in the context menu so doing something consistent here would be appreciable. |
|
@CyrilleB79 thanks!
|
|
One additional clarification why I suggest to name the button "Change" rather than "Edit":
Hence my choice for "Change" rather than "Edit". Also, regarding the 2 GUI architecture alternatives you list in #20437 (comment) (point 5. and 6.), I'd like to clarify that my proposal in #20437 (comment) is a third one:
|
|
@CyrilleB79 thanks. Your reason for the change is correct and I also agree. I will call it change with c&hange. |
|
OK, I have heard your opinion. But I don't share it: it is not always 100% respected, but usually, context menu items are actions that apply to the selected item in a list. Anyway, let's hear NV Access opinion on this point. |
|
@CyrilleB79 Yes, you're correct, |
|
@CyrilleB79 hi again. I've applyed (Change) instead of (edit). If you want, please test it again and see if this is better as requested? thanks, I'm happy that you liked this feature, Along with the others and who opened the issue #10983 I get so happy when I see an issue, And I know how to implement it. it's unbeleavable, but it's the moste ever thing that makes me happy. |
|
Hi, Two more things I would like us to consider based on recent comments:
If you can do the second exercise, that's great - better later than never. But in the future, please do this kind of exercise BEFORE even committing your first commit. Trust me: having a conversation with yourslef about design choices and evidence saves reviewer time and work (up to an extent). As some have noted, I want to make sure that your proposal is solid and have broader community support to make life easier for NV Access staff who will be reviewing this code (consider community members as "first-level gatekeepers" and test audience to guide your thinking). Thanks. |
|
@josephsl hi. Sorry. By saying nvda covers all user needs, I didn't mean we absolutely support all user needs in the urth like this. |
|
anyway, guys, I feal the conversation in this pr became too complicated and unrelated. This pr was simply about That I fixed 2 open issues regarding delete key to remove the gestures and #10983 |
|
Hi @amirmahdifard, First off, thanks for putting this together! As a fellow contributor who cares deeply about this project—and someone who has definitely had their fair share of heated debates over features—I wanted to share a few thoughts from a fresh perspective. Looking closely at how the thread has evolved, a couple of things stood out to me that might be worth reflecting on:
Like Joseph mentioned, knowing when to compromise and how to negotiate is a massive skill here. Writing the code is often just 30% of the work; the other 70% is collaborating within the existing project rules and building consensus with the community. Dropping the defensive posture is usually the quickest way to turn that raw technical passion into merged code. Thanks again for all the effort you've poured into this, and I’m looking forward to seeing this feature land in a way that feels seamless and native to NVDA! Best, |
|
@cary-rowen hi. Very thank you for your comment.
|
6f0a236 to
1b8a2e7
Compare
|
sorry. I messed up this branch, So I forced to create a new one just because I was trying to force push and rebace my branch |
Link to issue number:
fixes #16816
fixes #10983
Summary of the issue:
In the linked issue, requests have been made to be able to delete the gestures with the delete key, like the windows standard. The final result on that issue was adding the delete key to remove a gesture, read more on the linked issue
Also, while improving the dialog and added the context menu, It was a grate place for this pr to solv another issue, and edit an existing gesture
Description of user facing changes:
Added context menu And delete key shortcut to remove gestures on the input gestures dialog. Added (edit button) and (edit) action to the context menu that appears when a (Gesture) is in focus, Allowing user to replace and edit a gesture without needing to remove the gesture, and add a new gesture from the script level
Description of developer facing changes:
none
Description of development approach:
Added On context menu, and on charhook methods to the input gestures, Used the exact same statements used on refresh buttons method, And bound them to the tree
Used the same patten as the onAdd method and added an onEdit method, that safely removes the currently focused gesture, and Allow the user to enter a new one.
Testing strategy:
Manual testing. Tested all cases. Made sure that Context menu add, remove, and globel reset option works the same as buttons. Made sure that the delete button only works for the gestures. used same statements and patten as the refresh buttons method made by NVAccess it self. Made sure that the (pendingAdd) gard is properly protected in all cases. Edited an existing gesture, made sure that it properly edits. No unexpected bug, no crash, no duplication.
Known issues with pull request:
none
Code Review Checklist: