-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Suggest Chrome Extension Installation Popup #1318
base: main
Are you sure you want to change the base?
Suggest Chrome Extension Installation Popup #1318
Conversation
onClick={() => { | ||
window.electron.ipcRenderer.sendMessage( | ||
IPC_MAIN_CHANNELS.OPEN_EXTERNAL, | ||
{ | ||
url: `https://chromewebstore.google.com/detail/responsively-helper/jhphiidjkooiaollfiknkokgodbaddcj`, | ||
} | ||
); | ||
window.electron.store.set('chromePopup.usesChrome', true); | ||
onClose(); | ||
}} |
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.
it is best practice to declare a new function outside of the onclick and then call it as in:
onClick={handleDownload}
If you declare a function inline in onClick={}, it will be recreated on every render. This can have performance implications
url: `https://chromewebstore.google.com/detail/responsively-helper/jhphiidjkooiaollfiknkokgodbaddcj`, | ||
} | ||
); | ||
window.electron.store.set('chromePopup.usesChrome', true); |
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.
usesChrome is a bit vague, I would name this something like hasSeenChromeExtensionPopUp
isTextButton | ||
isPrimary | ||
> | ||
I do not use Chrome |
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.
I would change the text to "No, thank you", in order to cover more cases, like the person doesn't want it or they want to close the popup
✨ Pull Request
📓 Referenced Issue
resolves #1292
ℹ️ About the PR
A popup has been added to ask the user to install the "Responsively Helper" Chrome extension upon starting the Responsively App on desktop. The "Download Extension" button takes the user to the Chrome Web Store when clicked. The "I do not use Chrome" button marks the chromePopup.usesChrome variable false so that the popup will not appear again.
🖼️ Testing Scenarios / Screenshots
I tested using yarn to make sure the popup appears at the right time.