Skip to content

Commit

Permalink
Merge pull request #3225 from vraravam/formatting
Browse files Browse the repository at this point in the history
Incorporate '.editorconfig' as a cross-editor configuration to ensure  uniformity in code
  • Loading branch information
mauro-balades authored Nov 28, 2024
2 parents 6ee110b + a02ae26 commit 98456b8
Show file tree
Hide file tree
Showing 33 changed files with 118 additions and 106 deletions.
12 changes: 12 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
root = true

[*]
indent_style = space
indent_size = 2
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true

[*.md]
trim_trailing_whitespace = false
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
blank_issues_enabled: false
blank_issues_enabled: false
contact_links:
- name: Feature Request
url: https://github.com/zen-browser/desktop/discussions
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/linux-release-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ on:

jobs:
build-linux:

permissions:
contents: write
runs-on: ubuntu-latest
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/macos-release-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ on:
jobs:
mac-build:
name: Build macOS - ${{ matrix.arch }}

runs-on: macos-14
strategy:
fail-fast: false
Expand Down Expand Up @@ -98,7 +98,7 @@ jobs:
- name: Install dependencies
run: |
pnpm install
- name: Load surfer CI setup
run: pnpm surfer ci --brand ${{ inputs.release-branch }} --display-version ${{ inputs.build-version }}

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pr-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
pull_request:
branches:
- dev

jobs:
pr-test:
runs-on: ubuntu-latest
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/windows-profile-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,13 +61,13 @@ jobs:
C:\MozillaBuildSetup-Latest.exe /S | out-null
- name: Download firefox
run: |
git config --global core.safecrlf false
git config --global core.safecrlf false
pnpm surfer download
- name: Import patches
env:
SURFER_NO_BRANDING_PATCH: true
run: pnpm surfer import
run: pnpm surfer import

- name: Generate
run: |
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/windows-release-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
fail-fast: false
matrix:
arch: [x86_64, x86_64-v3, aarch64]

steps:
- name: Free Disk Space (Ubuntu)
uses: jlumbroso/free-disk-space@main
Expand Down Expand Up @@ -223,7 +223,7 @@ jobs:
find engine/obj-x86_64-pc-windows-msvc/ -mindepth 1 -maxdepth 1 -type d -not -name 'dist' -exec rm -rf {} \;
find engine/obj-x86_64-pc-windows-msvc/ -mindepth 1 -maxdepth 1 -type f -not -name 'dist' -exec rm -f {} \;
fi
- name: Upload dist object
if: ${{ !inputs.generate-gpo }}
uses: actions/upload-artifact@v4
Expand Down
2 changes: 1 addition & 1 deletion src/browser/base/content/ZenCustomizableUI.sys.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export var ZenCustomizableUI = new (class {
_addSidebarButtons(window) {
const sidebarBox = window.MozXULElement.parseXULToFragment(`
<toolbar id="zen-sidebar-top-buttons"
fullscreentoolbar="true"
fullscreentoolbar="true"
class="browser-toolbar customization-target zen-dont-hide-on-fullscreen"
brighttext="true"
data-l10n-id="tabs-toolbar"
Expand Down
2 changes: 1 addition & 1 deletion src/browser/base/content/ZenUIManager.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ var gZenUIManager = {
'zen.theme.content-element-separation',
0
);

function throttle(f, delay) {
let timer = 0;
return function (...args) {
Expand Down
4 changes: 2 additions & 2 deletions src/browser/base/content/zen-popupset.inc.xhtml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
role="document"
mainview-with-header="true"
has-custom-header="true">
<box id="zenSplitViewModifierHeader"
<box id="zenSplitViewModifierHeader"
class="panel-header panel-header-with-additional-element panel-header-with-info-button">
<html:h1>
<html:span data-l10n-id="zen-split-view-modifier-header"></html:span>
Expand Down Expand Up @@ -96,7 +96,7 @@
<toolbarbutton id="PanelUI-zen-profiles-privateWin" command="Tools:PrivateBrowsing" data-l10n-id="appmenuitem-new-private-window" class="subviewbutton"></toolbarbutton>
<toolbarbutton id="PanelUI-zen-profiles-newProfile" oncommand="ZenProfileDialogUI.createProfileWizard();" data-l10n-id="appmenu-create-profile" class="subviewbutton"></toolbarbutton>
</hbox>
<vbox id="PanelUI-zen-profiles-list">
<vbox id="PanelUI-zen-profiles-list">
</vbox>
</vbox>
</panelview>
Expand Down
8 changes: 4 additions & 4 deletions src/browser/base/content/zen-sidebar-icons.inc.xhtml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<toolbar brighttext="true"
id="zen-sidebar-icons-wrapper"
fullscreentoolbar="true"
<toolbar brighttext="true"
id="zen-sidebar-icons-wrapper"
fullscreentoolbar="true"
class="browser-toolbar customization-target zen-dont-hide-on-fullscreen"
data-l10n-id="tabs-toolbar"
customizable="true"
skipintoolbarset="true"
context="toolbar-context-menu"
mode="icons">
<toolbarbutton id="zen-profile-button"
<toolbarbutton id="zen-profile-button"
class="zen-sidebar-action-button toolbarbutton-1 chromeclass-toolbar-additional"
delegatesanchor="true"
onmousedown="ZenProfileDialogUI.showSubView(this, event)"
Expand Down
2 changes: 1 addition & 1 deletion src/browser/base/content/zen-sidebar-panel.inc.xhtml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
</vbox>
<toolbar mode="icons" flex="1" id="zen-sidebar-panels-wrapper" fullscreentoolbar="true">
<toolbar mode="icons" flex="1" id="zen-sidebar-panels-sites" fullscreentoolbar="true">

</toolbar>
<toolbarbutton id="zen-sidebar-add-panel-button" class="zen-sidebar-panel-button toolbarbutton-1 chromeclass-toolbar-additional" onclick="gZenBrowserManagerSidebar._openAddPanelDialog();"/>
</toolbar>
Expand Down
2 changes: 1 addition & 1 deletion src/browser/base/content/zen-styles/zen-animations.css
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,7 @@
}

90% {
width: 100%;
width: 100%;
}

100% {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
box-shadow: 0 0 1px 1px light-dark(rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.5));
overflow: hidden;
margin: 1px;

:root[zen-right-side='true'] & {
margin-right: 0;
margin-left: var(--zen-element-separation);
Expand Down
2 changes: 1 addition & 1 deletion src/browser/base/content/zen-styles/zen-browser-ui.css
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
#zen-main-app-wrapper {
background: transparent;
overflow: hidden;

& > * {
z-index: 1;
}
Expand Down
2 changes: 1 addition & 1 deletion src/browser/base/content/zen-styles/zen-sidebar-panels.css
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@
z-index: 1;
width: calc(100% - var(--zen-sidebar-web-panel-spacing) * 3);
margin: var(--zen-sidebar-web-panel-spacing);
/* Why times 3?
/* Why times 3?
* + 1 for the top margin, making the element overflow the view.
* + 1 for the margin we want to add at the bottom
* + 1 so that the panel can be correctly spaced from the border of the webview
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
height: var(--zen-toolbar-height);

@media (-moz-bool-pref: 'zen.view.hide-window-controls') {
@media (-moz-bool-pref: 'zen.view.hide-window-controls') {
& {
transition: height 0.2s ease-out, opacity 0.2s ease-out;
transition-delay: 0.05s;
Expand Down
14 changes: 7 additions & 7 deletions src/browser/base/content/zen-styles/zen-tabs/vertical-tabs.css
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
& #zen-sidebar-top-buttons {
--zen-toolbar-height: 32px;
height: var(--zen-toolbar-height);
}
}

& #zen-sidebar-top-buttons .toolbarbutton-1 {
& > .toolbarbutton-icon {
padding: 5px;
Expand Down Expand Up @@ -138,8 +138,8 @@
& #PersonalToolbar {
width: -moz-available;
}
/* We enable this trick IF we follow any of theses conditions:

/* We enable this trick IF we follow any of theses conditions:
* - We are on a Mac
* - We are on a Linux with reversed CSD
* - If we are not in any of the above, we can still enable it if the user has bookmarks toolbar enabled
Expand Down Expand Up @@ -269,8 +269,8 @@
}
& label { display: none !important; }
& .tab-close-button,
& .tab-reset-button {
display: none !important;
& .tab-reset-button {
display: none !important;
}

& .tab-icon-image {
Expand Down Expand Up @@ -366,7 +366,7 @@
padding-left: 4px;
padding-right: 4px;
}

:root[zen-right-side='true'] & {
margin-left: 0;
margin-right: var(--zen-toolbox-padding);
Expand Down
8 changes: 4 additions & 4 deletions src/browser/base/content/zen-styles/zen-urlbar.css
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
outline-color: none !important;
}

#identity-box.chromeUI:not([pageproxystate="invalid"]) {
#identity-box.chromeUI:not([pageproxystate="invalid"]) {
& #identity-icon-box {
background: light-dark(rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0.1)) !important;
}
Expand All @@ -65,7 +65,7 @@

#identity-permission-box:not(:hover):not(:focus-within) {
background: transparent !important;
}
}

#urlbar:is([focused], [open]) > #urlbar-background,
#searchbar:focus-within {
Expand Down Expand Up @@ -166,7 +166,7 @@
padding: 0;
margin-top: auto;
margin-bottom: auto;
}
}
}
}

Expand Down Expand Up @@ -284,7 +284,7 @@ button.popup-notification-dropmarker {
align-items: center;
}

:root:not([zen-single-toolbar='true']) #nav-bar {
:root:not([zen-single-toolbar='true']) #nav-bar {
margin-bottom: -1px;
}

Expand Down
4 changes: 2 additions & 2 deletions src/browser/base/content/zen-styles/zen-workspaces.css
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
filter: grayscale(1);
transition: opacity 0.2s;
}

&[active='true'] {
filter: none;
opacity: 1;
Expand Down Expand Up @@ -401,7 +401,7 @@
font-weight: 600;
align-items: center;
position: relative;

& #zen-current-workspace-indicator-icon {
font-size: 14px;
}
Expand Down
10 changes: 5 additions & 5 deletions src/browser/base/zen-components/ZenGlanceManager.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -192,18 +192,18 @@

this.lastCurrentTab.removeAttribute("zen-glance-tab");
this.lastCurrentTab._closingGlance = true;

gBrowser.tabContainer._invalidateCachedTabs();
gBrowser.removeTab(this.lastCurrentTab, { animate: true });

this.#currentTab = null;
this.#currentBrowser = null;

this.lastCurrentTab = null;
this._duringOpening = false;
this._duringOpening = false;
}, 400);
});
});
});
}

quickOpenGlance() {
Expand Down Expand Up @@ -231,7 +231,7 @@

quickCloseGlance({ closeCurrentTab = true, closeParentTab = true, justAnimateParent = false } = {}) {
const parentHasBrowser = !!(this.currentParentTab.linkedBrowser);
if (!justAnimateParent) {
if (!justAnimateParent) {
if (parentHasBrowser) {
if (closeParentTab) {
this.currentParentTab.linkedBrowser.closest(".browserSidebarContainer").classList.remove("deck-selected");
Expand Down Expand Up @@ -277,7 +277,7 @@
}
}

fullyOpenGlance() {
fullyOpenGlance() {
gBrowser._insertTabAtIndex(this.#currentTab, {
index: this.#currentTab._tPos + 1,
});
Expand Down
Loading

0 comments on commit 98456b8

Please sign in to comment.