Merge remote-tracking branch 'origin/main' into feature/rearrange-split-view

This commit is contained in:
brahim
2024-10-05 17:54:09 +02:00
10 changed files with 209 additions and 43 deletions

128
CODE_OF_CONDUCT.md Normal file
View File

@@ -0,0 +1,128 @@
# Contributor Covenant Code of Conduct
## Our Pledge
We as members, contributors, and leaders pledge to make participation in our
community a harassment-free experience for everyone, regardless of age, body
size, visible or invisible disability, ethnicity, sex characteristics, gender
identity and expression, level of experience, education, socio-economic status,
nationality, personal appearance, race, religion, or sexual identity
and orientation.
We pledge to act and interact in ways that contribute to an open, welcoming,
diverse, inclusive, and healthy community.
## Our Standards
Examples of behavior that contributes to a positive environment for our
community include:
* Demonstrating empathy and kindness toward other people
* Being respectful of differing opinions, viewpoints, and experiences
* Giving and gracefully accepting constructive feedback
* Accepting responsibility and apologizing to those affected by our mistakes,
and learning from the experience
* Focusing on what is best not just for us as individuals, but for the
overall community
Examples of unacceptable behavior include:
* The use of sexualized language or imagery, and sexual attention or
advances of any kind
* Trolling, insulting or derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or email
address, without their explicit permission
* Other conduct which could reasonably be considered inappropriate in a
professional setting
## Enforcement Responsibilities
Community leaders are responsible for clarifying and enforcing our standards of
acceptable behavior and will take appropriate and fair corrective action in
response to any behavior that they deem inappropriate, threatening, offensive,
or harmful.
Community leaders have the right and responsibility to remove, edit, or reject
comments, commits, code, wiki edits, issues, and other contributions that are
not aligned to this Code of Conduct, and will communicate reasons for moderation
decisions when appropriate.
## Scope
This Code of Conduct applies within all community spaces, and also applies when
an individual is officially representing the community in public spaces.
Examples of representing our community include using an official e-mail address,
posting via an official social media account, or acting as an appointed
representative at an online or offline event.
## Enforcement
Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported to the community leaders responsible for enforcement at
hello@zen-browser.app.
All complaints will be reviewed and investigated promptly and fairly.
All community leaders are obligated to respect the privacy and security of the
reporter of any incident.
## Enforcement Guidelines
Community leaders will follow these Community Impact Guidelines in determining
the consequences for any action they deem in violation of this Code of Conduct:
### 1. Correction
**Community Impact**: Use of inappropriate language or other behavior deemed
unprofessional or unwelcome in the community.
**Consequence**: A private, written warning from community leaders, providing
clarity around the nature of the violation and an explanation of why the
behavior was inappropriate. A public apology may be requested.
### 2. Warning
**Community Impact**: A violation through a single incident or series
of actions.
**Consequence**: A warning with consequences for continued behavior. No
interaction with the people involved, including unsolicited interaction with
those enforcing the Code of Conduct, for a specified period of time. This
includes avoiding interactions in community spaces as well as external channels
like social media. Violating these terms may lead to a temporary or
permanent ban.
### 3. Temporary Ban
**Community Impact**: A serious violation of community standards, including
sustained inappropriate behavior.
**Consequence**: A temporary ban from any sort of interaction or public
communication with the community for a specified period of time. No public or
private interaction with the people involved, including unsolicited interaction
with those enforcing the Code of Conduct, is allowed during this period.
Violating these terms may lead to a permanent ban.
### 4. Permanent Ban
**Community Impact**: Demonstrating a pattern of violation of community
standards, including sustained inappropriate behavior, harassment of an
individual, or aggression toward or disparagement of classes of individuals.
**Consequence**: A permanent ban from any sort of public interaction within
the community.
## Attribution
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
version 2.0, available at
https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
Community Impact Guidelines were inspired by [Mozilla's code of conduct
enforcement ladder](https://github.com/mozilla/diversity).
[homepage]: https://www.contributor-covenant.org
For answers to common questions about this code of conduct, see the FAQ at
https://www.contributor-covenant.org/faq. Translations are available at
https://www.contributor-covenant.org/translations.

2
l10n

Submodule l10n updated: 0bd8f65ca3...fc5116138c

View File

@@ -97,6 +97,7 @@ pref('zen.view.sidebar-expanded.on-hover', false);
pref('zen.view.sidebar-expanded.show-button', true);
pref('zen.view.sidebar-expanded.max-width', 400);
pref('zen.view.show-bottom-border', false);
pref('zen.view.sidebar-collapsed.hide-mute-button', true);
pref('zen.tabs.dim-pending', true);

View File

@@ -16,7 +16,7 @@
}
#browser {
--zen-toolbox-padding: 4px;
--zen-toolbox-padding: 5px;
}
#navigator-toolbox {
@@ -49,7 +49,7 @@
content: '';
display: block;
height: 1px;
background: color-mix(in srgb, var(--zen-colors-border) 70%, transparent 30%);
margin: 0 auto;
width: 80%;
left: 50%;
@@ -58,6 +58,13 @@
bottom: calc(-1 * var(--zen-toolbox-padding));
}
@media (-moz-bool-pref: 'zen.view.show-bottom-border') {
&::after {
background: color-mix(in srgb, var(--zen-colors-border) 70%, transparent 30%);
}
}
& > * {
border-top-width: 0 !important;
}
@@ -140,12 +147,14 @@
#vertical-pinned-tabs-container {
padding-inline-end: 0 !important;
gap: 3px !important;
column-gap: 5px !important;
row-gap: 3px !important;
max-height: unset !important;
overflow: visible !important;
& .tab-background:not(:hover):not([selected]):not([multiselected]) {
background: color-mix(in srgb, var(--zen-colors-secondary) 20%, transparent 80%) !important;
background: color-mix(in srgb, var(--zen-colors-secondary) 10%, transparent 90%) !important;
backdrop-filter: blur(5px);
}
& .tabbrowser-tab .tab-content {
@@ -182,6 +191,23 @@
}
}
& #vertical-pinned-tabs-container {
margin-bottom: 12px;
position: relative;
&:has(tab:not([hidden]))::after {
bottom: -6px;
content: '';
display: block;
height: 1px;
background: color-mix(in srgb, var(--zen-colors-border) 80%, transparent 20%);
width: 99%;
left: 50%;
transform: translateX(-50%);
position: absolute;
}
}
& #zen-sidebar-icons-wrapper {
display: flex;
/* Make sure the icons take most of the space, smartly */
@@ -314,11 +340,11 @@
}
& #vertical-pinned-tabs-container:has(tab:not([hidden])) {
margin-bottom: 8px;
margin-bottom: 12px;
position: relative;
&::after {
bottom: -4px;
bottom: -6px;
content: '';
display: block;
height: 1px;
@@ -477,7 +503,6 @@
background-size: cover !important;
border-top: 1px solid transparent;
border-right: 1px solid transparent;
height: 100%;
@@ -506,7 +531,6 @@
width: 250px !important;
background-color: var(--zen-dialog-background);
border-top-color: var(--zen-colors-border);
border-right-color: var(--zen-colors-border);
position: absolute;
padding: var(--zen-toolbox-padding);
padding-top: 0;
@@ -515,6 +539,7 @@
-moz-window-dragging: no-drag;
overflow: hidden;
transition: width 0.2s !important;
border-right: 1px solid var(--zen-colors-border);
& .tab-throbber,
& .tab-icon-pending,
@@ -531,21 +556,8 @@
flex-direction: column;
gap: 0 !important;
margin-bottom: 8px;
position: relative;
&:has(tab:not([hidden]))::after {
bottom: -4px;
content: '';
display: block;
height: 1px;
background: color-mix(in srgb, var(--zen-colors-border) 80%, transparent 20%);
width: 99%;
left: 50%;
transform: translateX(-50%);
position: absolute;
}
& .tabbrowser-tab {
& .tab-label-container {
display: flex;
@@ -559,19 +571,11 @@
margin-inline-end: var(--toolbarbutton-inner-padding) !important;
}
&:hover .tab-close-button {
display: block !important;
}
& .tab-background {
&:not(:hover):not([selected]):not([multiselected]) .tab-background {
box-shadow: none;
background: transparent !important;
}
&:hover .tab-background {
background-color: var(--tab-hover-background-color) !important;
}
}
}

View File

@@ -6,7 +6,7 @@
position: relative;
&:not([as-button='true']) {
--zen-workspaces-strip-background-color: color-mix(in srgb, var(--zen-colors-border) 50%, transparent 50%);
--zen-workspaces-strip-background-color: color-mix(in srgb, var(--zen-colors-border) 20%, transparent 80%);
--toolbarbutton-hover-background: var(--toolbarbutton-hover-background) !important;
border-radius: var(--zen-button-border-radius) !important;
background: var(--zen-workspaces-strip-background-color) !important;
@@ -125,7 +125,6 @@
white-space: nowrap;
text-overflow: ellipsis;
display: flex;
width: calc(100% - var(--zen-tabbrowser-padding) * 6) !important;
gap: 0.5ch;
}
}

View File

@@ -616,9 +616,19 @@ var gZenLooksAndFeel = {
var gZenWorkspacesSettings = {
init() {
var tabsUnloaderPrefListener = {
async observe(subject, topic, data) {
let buttonIndex = await confirmRestartPrompt(true, 1, true, true);
if (buttonIndex == CONFIRM_RESTART_PROMPT_RESTART_NOW) {
Services.startup.quit(Ci.nsIAppStartup.eAttemptQuit | Ci.nsIAppStartup.eRestart);
}
}
}
Services.prefs.addObserver('zen.workspaces.enabled', this);
Services.prefs.addObserver('zen.tab-unloader.enabled', tabsUnloaderPrefListener);
window.addEventListener('unload', () => {
Services.prefs.removeObserver('zen.workspaces.enabled', this);
Services.prefs.removeObserver('zen.tab-unloader.enabled', tabsUnloaderPrefListener);
});
},
@@ -981,4 +991,9 @@ Preferences.addAll([
type: 'int',
default: 10,
},
{
id: 'zen.view.show-bottom-border',
type: 'bool',
default: false,
}
]);

View File

@@ -285,21 +285,26 @@
<checkbox id="zenLooksAndFeelShowTabExpandButton"
data-l10n-id="zen-vertical-tabs-show-expand-button"
preference="zen.view.sidebar-expanded.show-button"/>
<hbox class="indent">
<checkbox id="zenLooksAndFeelShowBottomBorder"
data-l10n-id="zen-vertical-tabs-show-bottom-border"
preference="zen.view.show-bottom-border"/>
</hbox>
<label><html:h2 data-l10n-id="zen-vertical-tabs-expand-tabs-header"/></label>
<description class="description-deemphasized" data-l10n-id="zen-vertical-tabs-expand-tabs-description" />
<form xmlns="http://www.w3.org/1999/xhtml" id="zen-expand-tabbar-strat" autocomplete="off" class="indent">
<hbox>
<input type="radio" name="zen-expand-tabbar-value" value="expand" data-l10n-id="zen-vertical-tabs-expand-tabs-by-default" />
<span data-l10n-id="zen-vertical-tabs-expand-tabs-by-default" />
<input id="zenVerticalTabsExpandDefault" type="radio" name="zen-expand-tabbar-value" value="expand" data-l10n-id="zen-vertical-tabs-expand-tabs-by-default" />
<label for="zenVerticalTabsExpandDefault" data-l10n-id="zen-vertical-tabs-expand-tabs-by-default" />
</hbox>
<hbox>
<input type="radio" name="zen-expand-tabbar-value" value="hover" data-l10n-id="zen-vertical-tabs-expand-tabs-on-hover" />
<span data-l10n-id="zen-vertical-tabs-expand-tabs-on-hover" />
<input id="zenVerticalTabsExpandOnHover" type="radio" name="zen-expand-tabbar-value" value="hover" data-l10n-id="zen-vertical-tabs-expand-tabs-on-hover" />
<label for="zenVerticalTabsExpandOnHover" data-l10n-id="zen-vertical-tabs-expand-tabs-on-hover" />
</hbox>
<hbox>
<input type="radio" name="zen-expand-tabbar-value" value="none" data-l10n-id="zen-vertical-tabs-dont-expand-tabs-by-default" />
<span data-l10n-id="zen-vertical-tabs-dont-expand-tabs-by-default" />
<input id="zenVerticalTabsExpandDontExpand" type="radio" name="zen-expand-tabbar-value" value="none" data-l10n-id="zen-vertical-tabs-dont-expand-tabs-by-default" />
<label for="zenVerticalTabsExpandDontExpand" data-l10n-id="zen-vertical-tabs-dont-expand-tabs-by-default" />
</hbox>
</form>
</groupbox>

View File

@@ -1,5 +1,5 @@
diff --git a/toolkit/mozapps/extensions/internal/XPIDatabase.sys.mjs b/toolkit/mozapps/extensions/internal/XPIDatabase.sys.mjs
index 17219a88b42b0954f7bd7f7ea7ae8dcad55cc77c..e59373c2cac68fb3075e32143bb8940749c20a8a 100644
index 17219a88b42b0954f7bd7f7ea7ae8dcad55cc77c..a059e2af3851cdfc697f7f2584bcfc2124b996a9 100644
--- a/toolkit/mozapps/extensions/internal/XPIDatabase.sys.mjs
+++ b/toolkit/mozapps/extensions/internal/XPIDatabase.sys.mjs
@@ -138,7 +138,7 @@ const KEY_APP_GLOBAL = "app-global";
@@ -11,3 +11,17 @@ index 17219a88b42b0954f7bd7f7ea7ae8dcad55cc77c..e59373c2cac68fb3075e32143bb89407
// Properties to cache and reload when an addon installation is pending
const PENDING_INSTALL_METADATA = [
@@ -1720,8 +1720,11 @@ const updatedAddonFluentIds = new Map([
updatedAddonFluentIds.get(defaultFluentId) || defaultFluentId;
[formattedMessage] = l10n.formatMessagesSync([{ id: fluentId }]);
}
-
- return formattedMessage.value;
+ try {
+ return formattedMessage.value;
+ } catch (e) {
+ return addon.defaultLocale[aProp];
+ }
}
let [result, usedRepository] = chooseValue(

View File

@@ -1,6 +1,6 @@
{
"name": "Zen Browser",
"vendor": "Zen HQ",
"vendor": "Zen OSS Team",
"appId": "com.zen.browser",
"binaryName": "zen",
"version": {