Do not sort dictionaries in characterProcessing.listAvailableSymbolDictionaryDefinitions
#18178
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
PR against beta since it impacts the API.
Link to issue number:
Discussed in #16823 (comment) and following comments.
Summary of the issue:
characterProcessing.listAvailableSymbolDictionaryDefinitions
indicates that it returns the list of available symbol dictionary definitions as initialized in core or in add-ons.Though, it actually returns a sorted version of the internal list used by NVDA. This sorting order was only useful for the dictionaries displayed in the GUI but have no sense for the whole list of symbol dictionaries.
Description of user facing changes
Return a list in the same order as the order in which the dictionaries were added, i.e. order corresponding to the internal variable.
If the dictionaries need a specific sorting order in the GUI, it can be done outside of this function, and after API breaking change if needed.
Description of development approach
Removed sorting, but still returns a new list to avoid modifying the original list.
Testing strategy:
Launched NVDA with the test add-on used in #16823.
Also noted that, for this specific add-on, by chance, the order in the GUI has not changed, because the dictionaries had been added in alphabetical order in the add-on's manifest.
Known issues with pull request:
This makes a late API-breaking change. Though, it is very unlikely that an add-on use this function (introduced in 2024.4) and be impacted by this order change.
Code Review Checklist:
@coderabbitai summary