nvda icon indicating copy to clipboard operation
nvda copied to clipboard

FeatureFlag: fix changing from default value and value of default

Open seanbudd opened this issue 1 year ago • 2 comments

Link to issue number:

None

Summary of the issue:

Feature flags use a default option that results in a default value. For example, for a boolean feature flag could have three options: Default (Enabled), Enabled, Disabled. When comparing feature flags __eq__ is overridden such that Default (Enabled) == Enabled.

NVDA checks if a value has changed before marking a profile as dirty so that it is written to disk when saving the configuration. Due to __eq__ being overridden, NVDA does not write changes to disk if you change from the default value to the value of default.

STR:

  1. With NVDA running, open braille preferences
  2. Update "Interrupt Speech While scrolling" from Default (Enabled) to Enabled
  3. Save the settings and exit the settings dialog
  4. Re-open braille preferences, note the setting is still set to Default (Enabled)

Description of user facing changes

NVDA correctly updates feature flags when changing from the default value to the value of default.

Description of development approach

When checking if a config setting has changed, compare non-sections as strings, as this is how they are written to the config profile.

Testing strategy:

Manually test STR

Known issues with pull request:

None

Change log entries:

Not required

Code Review Checklist:

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

seanbudd avatar Sep 13 '22 00:09 seanbudd

  • PASS: Translation comments check.
  • PASS: Unit tests.
  • PASS: Lint check.
  • FAIL: System tests (tags: installer NVDA). See test results for more information.
  • Build (for testing PR): https://ci.appveyor.com/api/buildjobs/58pqp2iiqxhx18k4/artifacts/output/nvda_snapshot_pr14133-26534,77b915a1.exe

See test results for failed build of commit 77b915a162

AppVeyorBot avatar Sep 13 '22 00:09 AppVeyorBot

  • PASS: Translation comments check.
  • PASS: Unit tests.
  • PASS: Lint check.
  • FAIL: System tests (tags: installer NVDA). See test results for more information.
  • Build (for testing PR): https://ci.appveyor.com/api/buildjobs/6bb19s4nsdue9xal/artifacts/output/nvda_snapshot_pr14133-26645,b2f3ec5b.exe
  • CI timing (mins): INIT 0.0, INSTALL_START 0.8, INSTALL_END 0.8, BUILD_START 0.0, BUILD_END 22.0, TESTSETUP_START 0.0, TESTSETUP_END 0.2, TEST_START 0.0, TEST_END 13.5, FINISH_END 0.2

See test results for failed build of commit b2f3ec5b6c

AppVeyorBot avatar Sep 21 '22 06:09 AppVeyorBot

  • PASS: Translation comments check.
  • PASS: Unit tests.
  • PASS: Lint check.
  • FAIL: System tests (tags: installer NVDA). See test results for more information.
  • Build (for testing PR): https://ci.appveyor.com/api/buildjobs/q1j585gxipi7x53u/artifacts/output/nvda_snapshot_pr14133-26719,a91446c2.exe
  • CI timing (mins): INIT 0.0, INSTALL_START 0.7, INSTALL_END 0.8, BUILD_START 0.0, BUILD_END 20.9, TESTSETUP_START 0.0, TESTSETUP_END 0.2, TEST_START 0.0, TEST_END 13.1, FINISH_END 0.1

See test results for failed build of commit a91446c26a

AppVeyorBot avatar Oct 03 '22 03:10 AppVeyorBot