Skip to content

Allow exporting a gesture map without saving it#14582

Merged
seanbudd merged 11 commits into
nvaccess:masterfrom
LeonarddeR:exportGestureMap
Mar 27, 2023
Merged

Allow exporting a gesture map without saving it#14582
seanbudd merged 11 commits into
nvaccess:masterfrom
LeonarddeR:exportGestureMap

Conversation

@LeonarddeR

@LeonarddeR LeonarddeR commented Jan 24, 2023

Copy link
Copy Markdown
Collaborator

Link to issue number:

None

Summary of the issue:

You can currently load a gesture map from a file or a dictionary, but you can only save it as a file, i.e. you can't go from gesture map to the flattened dictionary format.

Description of user facing changes

None

Description of development approach

SPlit out the save function into another function called export. The save function uses the export function internally. This can also be used for unit testing the code as demonstrated. Furthermore, it is useful for braille display driver authors to develop a gesture map in the user gesture map, then export it from the python console to include it in their driver in the proper format.

Testing strategy:

Tested manually that exporting the gesture map and then importing it again results in the same map.

Known issues with pull request:

None

Change log entries:

For Developers

  • You can now call the export method on a gesture map to export it to a dictionary. This dictionary can be imported in another gesture either by passing it to the constructor of GlobalGestureMap or by passing it to the update method on an existing map.

Code Review Checklist:

  • Pull Request description:
    • description is up to date
    • change log entries
  • Testing:
    • Unit tests
    • System (end to end) tests
    • Manual testing
  • API is compatible with existing add-ons.
  • Documentation:
    • User Documentation
    • Developer / Technical Documentation
    • Context sensitive help for GUI changes
  • UX of all users considered:
    • Speech
    • Braille
    • Low Vision
    • Different web browsers
    • Localization in other languages / culture than English
  • Security precautions taken.

@LeonarddeR LeonarddeR marked this pull request as ready for review January 25, 2023 07:16
@LeonarddeR LeonarddeR requested a review from a team as a code owner January 25, 2023 07:16
@LeonarddeR LeonarddeR requested a review from seanbudd January 25, 2023 07:16
@AppVeyorBot

Copy link
Copy Markdown

See test results for failed build of commit 0333708cd2

@AppVeyorBot

Copy link
Copy Markdown

See test results for failed build of commit 1880042726

@AppVeyorBot

Copy link
Copy Markdown

See test results for failed build of commit c693e7ffa9

Comment thread source/inputCore.py Outdated

@seanbudd seanbudd left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@LeonarddeR looks good to me generally, can you add this missing typing?

Co-authored-by: Sean Budd <seanbudd123@gmail.com>
@LeonarddeR

Copy link
Copy Markdown
Collaborator Author

Done, thanks for approving!

@seanbudd seanbudd merged commit 10c597a into nvaccess:master Mar 27, 2023
@nvaccessAuto nvaccessAuto added this to the 2023.2 milestone Mar 27, 2023
@LeonarddeR LeonarddeR deleted the exportGestureMap branch August 23, 2025 06:27
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.

4 participants