-
Notifications
You must be signed in to change notification settings - Fork 14
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
Only suggest inserting masks in text fields #488
Conversation
The context menu entries to generate/reuse a mask only really make sense if the user is right-clicking an editable field. (Ideally even just email address fields, but we don't have an API that allows us to detect that.)
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.
@@ -35,7 +35,7 @@ const staticMenuData = { | |||
title: browser.i18n.getMessage("pageInputIconInsertPhoneMask"), | |||
enabled: true, | |||
visible: true, | |||
contexts: ["all"], | |||
contexts: ["editable"], |
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.
suggestion (non-blocking): I would recommend leaving this one as is. Having a way to open Relay anywhere can be useful.
contexts: ["editable"], | |
contexts: ["all"], |
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.
GitHub's diff collapsing makes this looks like this affects the manageAliases
entry, but it's actually insertPhoneMask
:
Screencast.from.2023-04-13.10-53-26.webm
"Manage aliases" will indeed still be available everywhere.
(I was so confused when I went to make this change 😅
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.
ughhhh. Sorry! My intentions were pure.
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.
Hahaha no worries, I made the exact same mistake until I checked the code out locally.
@@ -55,13 +55,13 @@ const staticMenuData = { | |||
"pageInputIconUseExistingAliasFromTheSite_mask" | |||
), | |||
visible: true, | |||
contexts: ["all"], | |||
contexts: ["editable"], |
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.
question (non-blocking): Should we leave one as is? Having a way for users to upgrade may be useful? This may also seem like too upgrade-focused. LMK your thoughts.
contexts: ["editable"], | |
contexts: ["all"], |
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.
And here too, this is actually useExistingAliasFromWebsite
rather than upgradeToPremium
:)
@maxxcrawford requested another review - I'm assuming this is good to merge, but because GH's diff display is confusing, might be good to take another look to be sure. |
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.
The context menu entries to generate/reuse a mask only really make sense if the user is right-clicking an editable field. (Ideally even just email address fields, but we don't have an API that allows us to detect that.) @maxxcrawford let me know if there was a reason you initially had these set to
all
. See https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/API/menus/ContextType.This PR fixes MPP-3014.
How to test: right-click an email input - nothing should have changed. Right-click anything else, e.g. the Relay icon in the toolbar, and you should not have options to generate or reuse a mask.
/frontend/src/styles/tokens.scss
).