-
-
Notifications
You must be signed in to change notification settings - Fork 631
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Give ui.browseableMessage the ability to show copy and close buttons …
…after the message, and add buttons to some instances (2nd try) (#17018) Fixes #14641 Addresses #16995 Addresses #16996 Summary of the issue: In #14641 @Qchristensen reported that some users are confused by browseableMessages, and their lack of definite closure mechanisms. During the conversation, it was pointed out that in some cases, a user might also desire a copy button. During work on the PR (originally #16369), it was requested that the copy button be given an accelerator key. Description of user facing changes Added copy and close buttons to some browseableMessages, and the capability to add them to others. Description of development approach Thanks to @michaelDCurran's change in ui.browseableMessage--namely adding a Scripting.Dictionary to carry arbitrary query-string-equivalent style parameters to the mshtml instance behind browseableMessage, it is now possible to pass in values for two new buttons, and various translatable messages, without any contortions. Tried different methods in the JS and CSS of message.html, and eventually settled on one which displayed the two buttons side-by-side, under a separator. If neither button's label is supplied, the div containing the HR and buttons remains hidden. The "Copy" button can be activated with Ctrl+Shift+C, and the "Close" button by Escape. Alt+C is indicated to the user via an accessibility label. Fixed up some docstring parameter listings to match modern format. Per the issue, modified the Report Link Destination message, to have both a copy button and a close button. Per the issue, added buttons to the Report Character Information message. Per request in PR comments, used a live region to present a "Copy complete" or "copy failed" message to the user. This message remains on screen for five seconds. The AI suggested covering for more failures in the initialization and configuration of MSHTML. I used its suggested exception checking, but added a private function to display an error message to the user when one of the components fail, so at least some kind of user notice can be given. I based it on the already extant private function for messaging the user if a browseableMessage is called on a secure screen. Both of the warning functions for browseableMessage unavailable situations, are now self-contained, with respect to wx. Added an immediate return if the MSHTML window is opened without providing the dialog arguments (i.e. the message and title, at least). That situation should never actually occur, but in the unlikely event that a failure passes the error checking we have in browseableMessage, this will return immediately, instead of stranding the user in a blank window with no obvious close mechanism.
- Loading branch information
Showing
4 changed files
with
203 additions
and
46 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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