Skip to content

Add toggleReportCellBorders script to input gestures.#10408

Merged
seanbudd merged 20 commits into
nvaccess:masterfrom
jakubl7545:i9507
Jul 22, 2021
Merged

Add toggleReportCellBorders script to input gestures.#10408
seanbudd merged 20 commits into
nvaccess:masterfrom
jakubl7545:i9507

Conversation

@jakubl7545

@jakubl7545 jakubl7545 commented Oct 21, 2019

Copy link
Copy Markdown
Contributor

Link to issue number:

Closes #9507

Summary of the issue:

Currently script for reporting cell borders is not present in input gestures dialog so it is not possible to add a gesture for that.

Description of how this pull request fixes the issue:

It adds toggleReportCellBorders script to globalCommands.

Testing performed:

I opened document formatting group in input gestures and found added script there. Then assigned gesture and checked that it works.

Known issues with pull request:

None.

Change log entry:

It is now possible to assign gesture to script reporting cell borders.
Section: Bug fixes

@jakubl7545

Copy link
Copy Markdown
Contributor Author

I closed previous PR and open a new one but it fails with the same message:
Error sending GitHubPullRequest notification: Error commenting on GitHub pull request: {"message":"Validation Failed","errors":[{"resource":"IssueComment","code":"unprocessable","field":"data","message":"Body cannot be blank"}],"documentation_url":"https://developer.github.com/v3/issues/comments/#create-a-comment"}
Any help with that will be appreciated.

Comment thread source/globalCommands.py Outdated
def script_toggleReportCellBorders(self, gesture):
if not config.conf["documentFormatting"]["reportBorderStyle"] and not config.conf["documentFormatting"]["reportBorderColor"]:
# Translators: A message reported when cycling through cell borders settings.
config.conf["documentFormatting"]["reportBorderStyle"] = True

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

At the moment check for translatable commends fails because the commend is not placed directly above the message.

@AppVeyorBot

Copy link
Copy Markdown

PR introduces Flake8 errors 😲

See test results for Failed build of commit c517cd8955

@LeonarddeR LeonarddeR left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thanks for taking this

Comment thread source/globalCommands.py
@@ -1,9 +1,8 @@
# -*- coding: UTF-8 -*-

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Feel free to remove this line

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.

It must be present because there is a letter Ł in one of contributors name.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Now the encoding declaration can be removed, since the encoding is specified when invoking Gettext.

Comment thread source/globalCommands.py Outdated
@@ -1,9 +1,8 @@
# -*- coding: UTF-8 -*-
#globalCommands.py
#A part of NonVisual Desktop Access (NVDA)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Could you please add a space after every hash sign while at it?

Suggested change
#A part of NonVisual Desktop Access (NVDA)
# A part of NonVisual Desktop Access (NVDA)

Comment thread source/globalCommands.py Outdated
ui.message(state)
# Translators: Input help mode message for toggle report font name command.
script_toggleReportFontName.__doc__=_("Toggles on and off the reporting of font changes")
script_toggleReportFontName.__doc__=_("Toggles on and off the reporting of font name changes")

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

As you are touching code for this script, could you please also add the script decorator to this one?

Comment thread source/globalCommands.py Outdated

@script(
# Translators: Input help mode message for toggle report cell borders command.
description=_("Cycles through cell borders settings"),

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Suggested change
description=_("Cycles through cell borders settings"),
description=_("Cycles through the cell border reporting settings"),

@AppVeyorBot

Copy link
Copy Markdown

PR introduces Flake8 errors 😲

See test results for Failed build of commit fa5bebbff0

@jakubl7545

Copy link
Copy Markdown
Contributor Author

@LeonarddeR All comments are addressed. And thanks a lot @lukaszgo1 for help.

@lukaszgo1

Copy link
Copy Markdown
Contributor

@jakubl7545 Do you intent to fix the merge conflicts here?

@AppVeyorBot

Copy link
Copy Markdown

@lukaszgo1

Copy link
Copy Markdown
Contributor

Is there anything blocking this PR from being looked at? cc @seanbudd

@seanbudd seanbudd self-requested a review July 7, 2021 01:12
Comment thread source/globalCommands.py Outdated

@script(
# Translators: Input help mode message for toggle report cell borders command.
description=_("Cycles through the cell border reporting settings"),

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
description=_("Cycles through the cell border reporting settings"),
description=_("Cycles through the cell border reporting settings"),

@seanbudd seanbudd self-requested a review July 7, 2021 01:13

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

Thanks @jakubl7545, looks good to me otherwise

Comment thread source/globalCommands.py Outdated
Comment on lines +712 to +713
not config.conf["documentFormatting"]["reportBorderStyle"] and not
config.conf["documentFormatting"]["reportBorderColor"]

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.

Just to improve readability

Suggested change
not config.conf["documentFormatting"]["reportBorderStyle"] and not
config.conf["documentFormatting"]["reportBorderColor"]
not config.conf["documentFormatting"]["reportBorderStyle"] and
not config.conf["documentFormatting"]["reportBorderColor"]

Comment thread source/globalCommands.py Outdated
Comment on lines +719 to +720
config.conf["documentFormatting"]["reportBorderStyle"] and not
config.conf["documentFormatting"]["reportBorderColor"]

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
config.conf["documentFormatting"]["reportBorderStyle"] and not
config.conf["documentFormatting"]["reportBorderColor"]
config.conf["documentFormatting"]["reportBorderStyle"] and
not config.conf["documentFormatting"]["reportBorderColor"]

@jakubl7545 jakubl7545 requested a review from a team as a code owner July 21, 2021 15:06
@AppVeyorBot

Copy link
Copy Markdown

See test results for failed build of commit a30119b14b

@jakubl7545

Copy link
Copy Markdown
Contributor Author

@seanbudd Changes applied.

Comment thread source/globalCommands.py Outdated
@jakubl7545

Copy link
Copy Markdown
Contributor Author

That was discussed long time ago. Don't remember the details but I was asked to do that by the reviewer.

@seanbudd seanbudd merged commit f9fc324 into nvaccess:master Jul 22, 2021
@nvaccessAuto nvaccessAuto added this to the 2021.3 milestone Jul 22, 2021
@jakubl7545 jakubl7545 deleted the i9507 branch July 22, 2021 09:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Input Gestures Dialog: Add Missing Gestures for Document Formatting

8 participants