Skip to content
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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

ashley44511
Copy link

✨ 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

output

I tested using yarn to make sure the popup appears at the right time.

@CLAassistant
Copy link

CLAassistant commented Oct 3, 2024

CLA assistant check
All committers have signed the CLA.

Comment on lines +47 to +56
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();
}}
Copy link
Contributor

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);
Copy link
Contributor

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
Copy link
Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants