Skip to content

Commit

Permalink
Enhance tab animations and transition effects for improved user exper…
Browse files Browse the repository at this point in the history
…ience
  • Loading branch information
mauro-balades committed Jan 29, 2025
1 parent cb9c7d5 commit d158472
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 15 deletions.
7 changes: 3 additions & 4 deletions src/browser/base/content/ZenUIManager.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -221,14 +221,13 @@ var gZenVerticalTabsManager = {
.animate(
aTab,
{
opacity: [0.7, 1],
transform: ['translateY(-20px)', 'translateY(0px)'],
opacity: [0, 1],
transform: ['translateY(-50px)', 'translateY(0px)'],
marginBottom: isLastTab ? [] : ['-20px', '0px'],
},
{
duration: 0.2,
type: 'spring',
bounce: 0,
easing: 'ease-out',
}
)
.then(() => {
Expand Down
4 changes: 2 additions & 2 deletions src/browser/base/content/zen-styles/zen-compact-mode.css
Original file line number Diff line number Diff line change
Expand Up @@ -228,8 +228,8 @@
1.003423 100%
);
transition:
left 0.3125s var(--zen-compact-mode-func),
right 0.3125s var(--zen-compact-mode-func);
left 0.3s var(--zen-compact-mode-func),
right 0.3s var(--zen-compact-mode-func);
opacity: 1;

left: -1px;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@
}

#browser {
--zen-toolbox-padding: max(5px, calc(var(--zen-element-separation) / 1.5));
--zen-toolbox-padding: max(.4rem, calc(var(--zen-element-separation) / 1.5));
}

:root[zen-single-toolbar='true'] {
Expand Down
4 changes: 2 additions & 2 deletions src/browser/components/tabbrowser/content/tabbrowser-js.patch
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
diff --git a/browser/components/tabbrowser/content/tabbrowser.js b/browser/components/tabbrowser/content/tabbrowser.js
index ce68c339f35416574b7bc7ebf8c93378f653242b..810b9c96bc26cc75e37c8b1ed6a61c1a51e123b8 100644
index ce68c339f35416574b7bc7ebf8c93378f653242b..751dfb93d39b9e066b8c2c0aabdebb5581606e12 100644
--- a/browser/components/tabbrowser/content/tabbrowser.js
+++ b/browser/components/tabbrowser/content/tabbrowser.js
@@ -409,11 +409,39 @@
Expand Down Expand Up @@ -204,7 +204,7 @@ index ce68c339f35416574b7bc7ebf8c93378f653242b..810b9c96bc26cc75e37c8b1ed6a61c1a
if (typeof index != "number") {
// Move the new tab after another tab if needed, to the end otherwise.
- index = Infinity;
+ index = Services.prefs.getBoolPref("zen.view.show-newtab-button-top") ? this.pinnedTabCount + 1 : Infinity;
+ index = Services.prefs.getBoolPref("zen.view.show-newtab-button-top") ? this.pinnedTabCount : Infinity;
if (
!bulkOrderedOpen &&
((openerTab &&
Expand Down
7 changes: 1 addition & 6 deletions src/browser/components/zen-welcome/welcome.css
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ body {
#welcome .zen-branding-title,
#thanks .zen-branding-title {
text-align: center;
font-size: 9rem;
font-size: 7rem;
}

#buttons-footer {
Expand All @@ -62,11 +62,6 @@ body {
}
}

body:has(#welcome:not([hidden='true'])) {
background: var(--zen-branding-coral);
color: var(--zen-branding-paper);
}

body:has(:is(#welcome, #thanks):not([hidden='true'])) {
& #buttons-footer {
justify-content: center;
Expand Down

0 comments on commit d158472

Please sign in to comment.