Skip to content

Indicate category and option name in error message when validating settings dialog#16352

Merged
seanbudd merged 3 commits into
nvaccess:masterfrom
CyrilleB79:errValidationMsg
Apr 16, 2024
Merged

Indicate category and option name in error message when validating settings dialog#16352
seanbudd merged 3 commits into
nvaccess:masterfrom
CyrilleB79:errValidationMsg

Conversation

@CyrilleB79

Copy link
Copy Markdown
Contributor

Link to issue number:

None

Summary of the issue:

The settings dialog contains always more error message boxes appearing when the validation of a parameter fails: modes available in cycle speech mode command or in cycle sound split mode command and regex validation in advanced settings have been added recently.

These messages do not formally mention the panel, nor the option which they are associated with. This may be difficult for the user to know which option is causing the error when the user has been modifying various settings in various setting panels (categories) before validating with "OK" or "Apply".

Description of user facing changes

The validation error messages now indicate the category and the name of the option which is causing the error so that the user can go to this option and modify it.

Description of development approach

Create a common dedicated error validation message with appropriate placeholders to be filled.

Testing strategy:

  • [ ]: Manual test of the 4 validation error messages (no NVDA key, customize cycle speech mode, customize sound split mode and paragraph text regexp)
  • [ ]: Visual test from sighted people (see below)

Visual test

Sighted people collaboration needed please. Cc @Qchristensen, @gerald-hartig

The current aspect of the dialog is as follows:
image

The initial error message is written bigger (12 pt) and in aqua-blue color. The additional information (category and options) is written smaller (9 pt) and in black color.
This difference was not done on purpose and seems due to the empty line that I have added between the initial error text and the additional information.

If I remove this empty line, the dialog would becomes as follows, with all the text written in black, size 9pt:
image

What is the best appearance according to you?
Or should I explore a third solution, e.g. all the text in 9pt black, but with a blank line between first error text and additional information? I do not know if it is easily doable...

Known issues with pull request:

None

Change log

Not needed IMO.

Code Review Checklist:

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

@gerald-hartig

Copy link
Copy Markdown
Contributor

FWIW I quite like the 12pt blue and 9pt black created by the empty line. It has good visual semantics, better than the other two options.

@CyrilleB79 CyrilleB79 marked this pull request as ready for review April 4, 2024 08:13
@CyrilleB79 CyrilleB79 requested a review from a team as a code owner April 4, 2024 08:13
@CyrilleB79

Copy link
Copy Markdown
Contributor Author

Thanks @gerald-hartig for your feedback.

Comment thread source/gui/settingsDialogs.py
@seanbudd seanbudd added the conceptApproved Similar 'triaged' for issues, PR accepted in theory, implementation needs review. label Apr 16, 2024

@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.

Generally looks good, just thought that we could make the message title more descriptive potentially

Comment thread source/gui/settingsDialogs.py Outdated
option=option,
),
# Translators: The title of the message box
caption=_("Error"),

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.

Suggested change
caption=_("Error"),
caption=_("Invalid settings"),

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Shouldn't it rather be "Invalid setting" with singular form. Only one invalid setting is reported in each dialog.

Or is "settings" always with a final "s" in English?

@seanbudd, feel free to commit yourself the more suitable proposal.

Suggested change
caption=_("Error"),
caption=_("Invalid setting"),

@XLTechie

XLTechie commented Apr 16, 2024 via email

Copy link
Copy Markdown
Collaborator

@seanbudd seanbudd merged commit 669b6d9 into nvaccess:master Apr 16, 2024
@nvaccessAuto nvaccessAuto added this to the 2024.2 milestone Apr 16, 2024
@CyrilleB79 CyrilleB79 deleted the errValidationMsg branch April 18, 2024 07:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

conceptApproved Similar 'triaged' for issues, PR accepted in theory, implementation needs review.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants