-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make URLs in popup notices clickable #4637
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Found an extra dot in one of the links, otherwise ACK from me.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
utACK
Great thanks for the prompt implementation! Cool solution!
Testing status:[TESTED]- offerbook.warning.newVersionAnnouncement Screenshots of all dialogs tested: https://imgur.com/a/pwP06gB custom error box, not a popup [NOT USED ANYWHERE!] - popup.warning.trade.depositTxNull |
Fixes #4623 URLs in Javafx label controls are not clickable, so separate them out to one or more clickable Hyperlinks displayed at the footer of the popup. The approach taken for this is to embed the tag `[HYPERLINK:]` in the message around a link that you want to be handled this way. The links can be anywhere within the popup message, in the same order that they will be displayed. Using the tag has the advantage of being optional, and does not require new code to be written for each individual popup. Refactor to be more flexible; allowing inline hyperlinks Codacy nits.
Status update: testing revealed some of the more complex popups (e.g. missingDepositTx) were not compatible with the first implementation of this feature. So I re-implemented the parsing to extract hyperlinks from anywhere within the textual message using regex Pattern/Matcher and String.replaceFirst. The code has been fully retested as documented here and is ready for review. (Apologies to those who already reviewed the prior version). N.B. I came across a message which appears unused in Bisq: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
utACK
Re "popup.warning.trade.depositTxNull": Yes that and the other related ones are not used anymore and should be deleted in the strings file. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
utACK
utACK |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
utACK - code looks fine 👍
Fixes #4623
URLs in Javafx label controls are not clickable, so separate them out to one or more clickable Hyperlinks displayed at the footer of the popup.
The approach taken for this is to embed the tag
[HYPERLINK:https://foo.bar]
in the message around a link that you want to be handled this way. The links can be anywhere in the popup message. They will be extracted, referenced and listed at the bottom of the popup. Using the tag has the advantage of being optional, and does not require new code to be written for each individual popup.These popup messages have been modified to use the
[HYPERLINK:]
tag:Examples: