Compare commits
11 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 8b70aca184 | |||
| 0539c12ba2 | |||
| d6cb8f7707 | |||
| 89aa2ffe5b | |||
| f072ad478c | |||
| 91a92bd446 | |||
| f0274d1e45 | |||
| 0cf1e14731 | |||
| 1406ad34b4 | |||
| f377174bf2 | |||
| 6a5e48e8b3 |
Generated
+2325
-14553
File diff suppressed because it is too large
Load Diff
+2
-2
@@ -2,7 +2,7 @@
|
||||
"name": "testpilot-containers",
|
||||
"title": "Multi-Account Containers",
|
||||
"description": "Containers helps you keep all the parts of your online life contained in different tabs. Custom labels and color-coded tabs help keep different activities — like online shopping, travel planning, or checking work email — separate.",
|
||||
"version": "8.3.2",
|
||||
"version": "8.3.5",
|
||||
"author": "Andrea Marchesini, Luke Crouch, Lesley Norton, Kendall Werts, Maxx Crawford, Jonathan Kingston",
|
||||
"bugs": {
|
||||
"url": "https://github.com/mozilla/multi-account-containers/issues"
|
||||
@@ -26,7 +26,7 @@
|
||||
"stylelint": "^13.5.0",
|
||||
"stylelint-config-standard": "^20.0.0",
|
||||
"stylelint-order": "^4.0.0",
|
||||
"web-ext": "^7.5.0",
|
||||
"web-ext": "^8.10.0",
|
||||
"webextensions-jsdom": "^1.2.1"
|
||||
},
|
||||
"homepage": "https://github.com/mozilla/multi-account-containers#readme",
|
||||
|
||||
+1
-1
Submodule src/_locales updated: 0a88c3ecc6...30aab7b6d8
+70
-1
@@ -26,10 +26,18 @@
|
||||
src: url("/fonts/Inter-Medium.woff2") format("woff2");
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: "Inter-SemiBold";
|
||||
font-style: normal;
|
||||
font-weight: 700;
|
||||
src: url("/fonts/Inter-SemiBold.woff2") format("woff2");
|
||||
}
|
||||
|
||||
[data-theme="light"],
|
||||
:root {
|
||||
--fontInter: "Inter", sans-serif;
|
||||
--fontInterMedium: "Inter-Medium", sans-serif;
|
||||
--fontInterSemiBold: "Inter-SemiBold", sans-serif;
|
||||
--fontMetropolis: "Metropolis", sans-serif;
|
||||
--fontMetropolisLight: "Metropolis-Light", sans-serif;
|
||||
--iconArrowLeft: url("/img/arrow-icon-left.svg");
|
||||
@@ -1651,8 +1659,20 @@ input[type=text] {
|
||||
background-color: var(--button-bg-hover-color-primary);
|
||||
}
|
||||
|
||||
#survey-achievement-done-button {
|
||||
color: var(--button-bg-color-primary);
|
||||
transition: color 0.1s ease;
|
||||
font-size: 14px;
|
||||
padding-inline: 3px;
|
||||
padding-block: 1px;
|
||||
border-radius: 1px;
|
||||
text-align: center;
|
||||
margin-inline: auto;
|
||||
}
|
||||
|
||||
.onboarding-button:focus,
|
||||
.half-onboarding-button:focus {
|
||||
.half-onboarding-button:focus,
|
||||
#survey-achievement-done-button:focus {
|
||||
box-shadow:
|
||||
0 0 0 2px var(--button-bg-color-secondary),
|
||||
0 0 0 4px var(--button-bg-focus-color-primary);
|
||||
@@ -2409,3 +2429,52 @@ tr:hover > td > .reset-button {
|
||||
.searchbar input {
|
||||
inline-size: 100%;
|
||||
}
|
||||
|
||||
/* Survey Popup */
|
||||
|
||||
.survey-blurb,
|
||||
#survey-panel h3.onboarding-title {
|
||||
text-align: center;
|
||||
margin-inline: auto;
|
||||
}
|
||||
|
||||
#survey-panel h3.onboarding-title {
|
||||
max-inline-size: 100%;
|
||||
font-family: var(--fontInterSemiBold);
|
||||
line-height: 24px;
|
||||
margin-block-end: 12px;
|
||||
}
|
||||
|
||||
#survey-panel {
|
||||
padding-block: 40px;
|
||||
padding-inline: 0;
|
||||
}
|
||||
|
||||
.survey-blurb {
|
||||
margin-block-end: 16px;
|
||||
margin-inline: 24px;
|
||||
}
|
||||
|
||||
#survey-img {
|
||||
block-size: 180px;
|
||||
margin-block-end: 16px;
|
||||
}
|
||||
|
||||
#survey-button {
|
||||
padding-block: 4px;
|
||||
padding-inline: 16px;
|
||||
margin-block: 0 8px;
|
||||
min-block-size: 32px;
|
||||
}
|
||||
|
||||
.share-ctas.survey-back {
|
||||
margin-inline: auto;
|
||||
}
|
||||
|
||||
#survey-achievement-done-button:hover {
|
||||
color: var(--button-bg-hover-color-primary);
|
||||
}
|
||||
|
||||
#survey-achievement-done-button:active {
|
||||
color: var(--button-bg-active-color-primary);
|
||||
}
|
||||
|
||||
Binary file not shown.
File diff suppressed because one or more lines are too long
|
After Width: | Height: | Size: 23 KiB |
@@ -38,6 +38,7 @@ const backgroundLogic = {
|
||||
browser.runtime.onInstalled.addListener((details) => {
|
||||
this.updateTranslationInManifest();
|
||||
this._undoDefault820SortTabsKeyboardShortcut(details);
|
||||
this._removeSurveyAchievement();
|
||||
});
|
||||
browser.runtime.onStartup.addListener(this.updateTranslationInManifest);
|
||||
},
|
||||
@@ -68,6 +69,20 @@ const backgroundLogic = {
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* We left an achievement entry in storage during a user research study in
|
||||
* version 8.3.1. This method removes that entry to prevent broken logic in
|
||||
* the achievement views.
|
||||
*/
|
||||
async _removeSurveyAchievement() {
|
||||
const achievementsStorage = await browser.storage.local.get({ achievements: [] });
|
||||
const achievements = achievementsStorage.achievements;
|
||||
const filtered = achievements.filter(a => a.name !== "survey");
|
||||
if (filtered.length !== achievements.length) {
|
||||
await browser.storage.local.set({achievements: filtered});
|
||||
}
|
||||
},
|
||||
|
||||
updateTranslationInManifest() {
|
||||
for (let index = 0; index < 10; index++) {
|
||||
const ajustedIndex = index + 1; // We want to start from 1 instead of 0 in the UI.
|
||||
|
||||
@@ -257,6 +257,8 @@ const messageHandler = {
|
||||
browser.browserAction.setBadgeBackgroundColor({color: "rgba(0,217,0,255)"});
|
||||
browser.browserAction.setBadgeText({text: "NEW"});
|
||||
}
|
||||
|
||||
this.maybePrepareSurveyAchievementOnUpdate(countOfContainerTabsOpened);
|
||||
},
|
||||
|
||||
async onFocusChangedCallback(windowId) {
|
||||
@@ -273,7 +275,34 @@ const messageHandler = {
|
||||
}).catch((e) => {
|
||||
throw e;
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
async maybePrepareSurveyAchievementOnUpdate(countOpened) {
|
||||
if (countOpened < 10) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Show the survey only for English locales (en or en-*).
|
||||
const uiLang = browser.i18n.getUILanguage();
|
||||
const lang = (uiLang || "").toLowerCase();
|
||||
if (lang !== "en" && !lang.startsWith("en-")) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Check if already scheduled in the past; if so, do not show again.
|
||||
const achievementsStorage = await browser.storage.local.get({ achievements: [] });
|
||||
const achievements = achievementsStorage.achievements;
|
||||
const existing = achievements.find(a => a.name === "surveyFinal");
|
||||
if (existing) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Ensure the achievement exists and is pending.
|
||||
achievements.push({ name: "surveyFinal", done: false });
|
||||
browser.storage.local.set({ achievements });
|
||||
browser.browserAction.setBadgeBackgroundColor({color: "rgba(0,217,0,255)"});
|
||||
browser.browserAction.setBadgeText({text: "NEW"});
|
||||
},
|
||||
};
|
||||
|
||||
// Lets do this last as theme manager did a check before connecting before
|
||||
|
||||
+46
-9
@@ -31,6 +31,7 @@ const P_CONTAINER_INFO = "containerInfo";
|
||||
const P_CONTAINER_EDIT = "containerEdit";
|
||||
const P_CONTAINER_DELETE = "containerDelete";
|
||||
const P_CONTAINERS_ACHIEVEMENT = "containersAchievement";
|
||||
const P_SURVEY_ACHIEVEMENT = "surveyAchievement";
|
||||
const P_CONTAINER_ASSIGNMENTS = "containerAssignments";
|
||||
const P_CLEAR_CONTAINER_STORAGE = "clearContainerStorage";
|
||||
|
||||
@@ -137,19 +138,31 @@ const Logic = {
|
||||
},
|
||||
|
||||
async showAchievementOrContainersListPanel() {
|
||||
// Do we need to show an achievement panel?
|
||||
let showAchievements = false;
|
||||
const achievementsStorage = await browser.storage.local.get({ achievements: [] });
|
||||
for (const achievement of achievementsStorage.achievements) {
|
||||
if (!achievement.done) {
|
||||
showAchievements = true;
|
||||
const achievements = achievementsStorage.achievements;
|
||||
|
||||
let saveAchievements = false;
|
||||
for (const achievement of achievements.filter(a => !a.done)) {
|
||||
if (achievement.name === "manyContainersOpened") {
|
||||
this.showPanel(P_CONTAINERS_ACHIEVEMENT);
|
||||
return;
|
||||
}
|
||||
|
||||
if (achievement.name === "surveyFinal") {
|
||||
this.showPanel(P_SURVEY_ACHIEVEMENT);
|
||||
return;
|
||||
}
|
||||
|
||||
// We have found an unknown achievement. Let's mark it as done.
|
||||
achievement.done = true;
|
||||
saveAchievements = true;
|
||||
}
|
||||
if (showAchievements) {
|
||||
this.showPanel(P_CONTAINERS_ACHIEVEMENT);
|
||||
} else {
|
||||
this.showPanel(P_CONTAINERS_LIST);
|
||||
|
||||
if (saveAchievements) {
|
||||
browser.storage.local.set({ achievements });
|
||||
}
|
||||
|
||||
this.showPanel(P_CONTAINERS_LIST);
|
||||
},
|
||||
|
||||
// In case the user wants to click multiple actions,
|
||||
@@ -2376,6 +2389,30 @@ Logic.registerPanel(P_CONTAINERS_ACHIEVEMENT, {
|
||||
},
|
||||
});
|
||||
|
||||
// P_SURVEY_ACHIEVEMENT: A simple survey view.
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
Logic.registerPanel(P_SURVEY_ACHIEVEMENT, {
|
||||
panelSelector: ".survey-panel",
|
||||
|
||||
// This method is called when the object is registered.
|
||||
initialize() {
|
||||
Utils.addEnterHandler(document.querySelector("#survey-achievement-done-button"), async () => {
|
||||
await Logic.setAchievementDone("surveyFinal");
|
||||
Logic.showPanel(P_CONTAINERS_LIST);
|
||||
});
|
||||
Utils.addEnterHandler(document.querySelector("#survey-button"), async () => {
|
||||
await Logic.setAchievementDone("surveyFinal");
|
||||
window.close();
|
||||
});
|
||||
},
|
||||
|
||||
// This method is called when the panel is shown.
|
||||
prepare() {
|
||||
return Promise.resolve(null);
|
||||
},
|
||||
});
|
||||
|
||||
Logic.init();
|
||||
|
||||
window.addEventListener("resize", function () {
|
||||
|
||||
+5
-2
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"manifest_version": 2,
|
||||
"name": "Firefox Multi-Account Containers",
|
||||
"version": "8.3.2",
|
||||
"version": "8.3.5",
|
||||
"incognito": "not_allowed",
|
||||
"description": "__MSG_extensionDescription__",
|
||||
"icons": {
|
||||
@@ -33,7 +33,10 @@
|
||||
"browser_specific_settings": {
|
||||
"gecko": {
|
||||
"id": "@testpilot-containers",
|
||||
"strict_min_version": "91.1.0"
|
||||
"strict_min_version": "91.1.0",
|
||||
"data_collection_permissions": {
|
||||
"required": ["none"]
|
||||
}
|
||||
}
|
||||
},
|
||||
"commands": {
|
||||
|
||||
@@ -106,6 +106,19 @@
|
||||
<a href="#" id="achievement-done-button" class="onboarding-button keyboard-nav" data-i18n-message-id="done"></a>
|
||||
</div>
|
||||
|
||||
<div class="panel survey-panel hide" id="survey-panel">
|
||||
<img id="survey-img" alt="" src="/img/survey.svg" />
|
||||
|
||||
<h3 class="onboarding-title">Help Improve Containers</h3>
|
||||
<p class="survey-blurb">Please take 5 minutes to share your experiences with the add-on! This will help us effectively prioritize improvements.</p>
|
||||
<p class="survey-blurb">Learn more about the research here.</p>
|
||||
<br/><p class="survey-blurb">Thank you for using Multi-Account Containers!</p>
|
||||
<p class="share-ctas survey-back">
|
||||
<a class="cta-link onboarding-button keyboard-nav" href="https://mozilla.qualtrics.com/jfe/form/SV_2aSQMGyfp2DFLtI" id="survey-button" target="_blank">Take Survey</a>
|
||||
</p>
|
||||
<a href="#" id="survey-achievement-done-button">Back</a>
|
||||
</div>
|
||||
|
||||
<div class="panel menu-panel container-panel hide" id="container-panel">
|
||||
<span class="popup-notification-card"></span>
|
||||
<h3 class="title">Firefox Multi-Account Containers</h3>
|
||||
|
||||
Reference in New Issue
Block a user