-
Notifications
You must be signed in to change notification settings - Fork 342
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
Remember choice for default containers in the "Always open in" confirm page #2649
Conversation
402828f
to
c48a75a
Compare
Also looking into integrating / fixing #2617, which tries to remember the choice when switching to a container that is not the "default container" (i.e. not "Open in current tab"). |
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.
Couple blocking changes.
Can you write out the steps you used to spot-check this? I tried:
- Go to accounts.firefox.com
- In the browserAction menu, choose "Always Open This Site in..."
- In the list of containers, choose "Work"
- Close the tab
- Open a new window
- Go to accounts.firefox.com
Expected Result:
- I should be prompted to confirm I want to open the site in a Work tab
Actual Result:
- I'm not prompted to confirm I want to open the site in a Work tab
Also, please change the commit message to start with |
c48a75a
to
5164527
Compare
5164527
to
cd343ab
Compare
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.
Thanks @rafeerahman I was able to reproduce the bug and the fix on youtube.com.
There's still one more bug that I think is worth fixing:
- Go to youtube.com
- In the browserAction menu, choose "Always Open This Site in..."
- Choose the work container
- Open youtube.com in a new tab.
- On the confirmation page prompt, check "Remember my decision for this site" then click "Open in current tab"
- Open youtube.com in a new tab
- verify that there is no confirmation page.
- verify youtube.com opens in default/non-container tab
- Open the work containers "site list"
- verify that it is empty.
- Open a new work tab
- Go to youtube.com
Expected results:
youtube.com automatically opens in default/non-container tab without prompting
Actual results:
youtube.com opens in work container tab
55eb69d
to
0e37cb7
Compare
src/js/confirm-page.js
Outdated
if (neverAsk && !currentContainer) { | ||
await browser.runtime.sendMessage({ | ||
method: "neverAsk", | ||
neverAsk: true, | ||
defaultContainer: true, | ||
cookieStoreId: currentCookieStoreId, | ||
pageUrl: redirectUrl | ||
}); | ||
} | ||
|
||
if (neverAsk) { | ||
browser.runtime.sendMessage({ | ||
method: "neverAsk", | ||
neverAsk: true, | ||
cookieStoreId: currentCookieStoreId, | ||
pageUrl: redirectUrl | ||
}); | ||
} |
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.
Maybe optimize it by something like:
if (neverAsk) {
await browser.runtime.sendMessage({
method: "neverAsk",
neverAsk: true,
cookieStoreId: currentCookieStoreId,
pageUrl: redirectUrl,
defaultContainer: !currentContainer
});
}
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.
Thanks!
0e37cb7
to
6bde0a7
Compare
Before submitting your pull request
npm test
and all tests passed.Description
When a user is on the confirm-page after re-opening a site they chose to 'always open in a container', if they click "Remember my choice" and then "Open in current tab" (default container), this is not remembered. i.e. The next time they open the site, they are prompted to this screen again.
This PR fixes that.
How to test
(Remember choice for default container)
(Switching between two containers)
Type of change
Select all that apply.
Tag issues related to this pull request: