restore controlTypes aliases#13588
Merged
Merged
Conversation
This comment was marked as outdated.
This comment was marked as outdated.
Contributor
Author
|
Chrome system tests are failing on all builds and being investigated separately. This PR probably should be blocked until that is addressed. |
This comment was marked as outdated.
This comment was marked as outdated.
Fix unit tests
This comment was marked as outdated.
This comment was marked as outdated.
seanbudd
previously approved these changes
Apr 8, 2022
michaelDCurran
previously approved these changes
Apr 8, 2022
281544f
michaelDCurran
approved these changes
Apr 12, 2022
This comment was marked as outdated.
This comment was marked as outdated.
5 tasks
This comment was marked as outdated.
This comment was marked as outdated.
feerrenrut
added a commit
that referenced
this pull request
Apr 14, 2022
… (PR #13603) Related to #13588 Based on conversation in https://nvda-addons.groups.io/g/nvda-addons/topic/90329930 Summary of the issue: - Some add-ons depend on the legacy values of controlTypes.Roles (and possibly controlTypes.States) - These were removed in commit d4586a5 via PR #13414. - While HAS_ARIA_DETAILS isn't used internally, add-ons may indirectly depend on it. This enum value was initially added to controlTypes.py in commit d6787b8 and removed in aa351c5 which introduced a replacement approach: Use instead NVDAObject.hasDetails Description of change: Restore the values using more developer friendly definitions, use unit tests to ensure values match and can be constructed from and compared with integer values, or constructed from the enum value name.
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Link to issue number:
#13583
Summary of the issue:
ControlTypes was refactored, aliases were left in place deprecated and marked for removal in the 2022.1 release.
During the beta NV Access received feedback from add-on authors that updating usages of these aliases is difficult and feels unnecessary.
Description of how this pull request fixes the issue:
Upon reconsideration, assessing the maintenance cost as low, these aliases can be reintroduced.
Note, these aliases remain deprecated, and will be removed if maintenance cost becomes high.
It is still recommended that add-on authors use the new
controlTypes.RoleandcontrolTypes.Statesymbols instead for consistency with the NVDA core code.Testing strategy:
Tested with a global plugin in developer scratch pad.
Known issues with pull request:
This code exposes the deprecated symbols to IDEs. Due to use of
from .deprecatedAliases import *This may be considered a feature (ease of determining the underlaying type for the alias) or a bug (the deprecated nature is not obvious from an IDEs code suggestions)
It would be possible to programmatically import the symbols, making them less likely to be exposed to the IDE.
The current approach prefers to value simplicity and the discoverability of the alias type.
Change log entries:
Adjustments required to the
For Developerssection.Code Review Checklist: