Commit Graph

65 Commits

Author SHA1 Message Date
mr. M
68cf549df3 Adjust tab rotation angle and enhance pinned tab loading logic for improved user experience 2025-02-21 16:50:16 +01:00
mr. M
16f242da13 Remove unnecessary wait for session store restoration in pinned tabs refresh 2025-02-21 16:07:40 +01:00
mr. M
12cc944728 Remove static label attribute from pinned tabs on unpinning 2025-02-21 15:41:02 +01:00
mr. M
f9656c16bf Refactor tab management and workspace state handling for improved functionality and consistency 2025-02-21 15:38:18 +01:00
mr. M
6771b137ea Enhance UI styles and functionality for gradient generator, vertical tabs, and URL bar; improve tab management logic 2025-02-21 11:32:48 +01:00
mr. M
9f8dfddfa8 Refactor ZenWorkspaces initialization and enhance pinned tab management for improved performance and layout 2025-02-20 23:17:52 +01:00
mr. M
fbe81666bf Enhance pinned tab management with reset functionality and location change handling 2025-02-20 22:30:49 +01:00
mr. M
41938191c7 Fixed trying to unload an about:* page rendering the browser useless 2025-02-19 17:50:48 +01:00
mr. M
ebdc9368da Added an Arc-like empty tab that represents no state. [zen.urlbar.replace-newtab to false to disable] 2025-02-19 17:26:30 +01:00
mr. M
cc52ec2b71 Refactor CSS styles for zen-theme and zen-welcome; improve responsiveness and adjust icon sizes 2025-02-19 10:09:00 +01:00
mr. M
c0d732da7c Fixed pinned tabs initialization when restoring 2 windows 2025-02-18 16:41:46 +01:00
mr. M
b8baca2100 Allowed renamed pinned tabs to persist across sessions 2025-02-17 21:43:30 +01:00
Kristijan Ribarić
57a33beb81 Fix: Properly update pinned tab titles after edit
This commit addresses an issue where edited pinned tab titles were not consistently updated across all windows and in storage.

The following changes were made:

- **ZenUIManager.mjs:** Removed redundant `pinId` variable and directly checked `zen-pin-id` attribute.
- **ZenPinnedTabsStorage.mjs:** Added `edited_title` column to the `zen_pins` table to track if a pin's title has been manually edited.  Also, the `updatePinTitle` function now accepts an `isEdited` flag (defaults to true) and updates the `edited_title` column accordingly.
- **ZenPinnedTabManager.mjs:**  The `updatePinTitle` function was added to handle the update of pin titles.  It updates the title in storage using `ZenPinnedTabsStorage.updatePinTitle`, refreshes the pinned tabs, and then iterates through all browser windows to update the labels of corresponding pinned tabs.  Also, a check was added to `_initializePinnedTabs` to set the `zen-has-static-label` attribute on tabs with `editedTitle` set to `true`.
- **ZenWorkspaces.mjs:** Added a null check for `activeWorkspaceStrip` to avoid errors when it's not available.

These changes ensure that when a pinned tab title is edited, the updated title is correctly persisted in storage and reflected across all open windows. The `edited_title` flag allows distinguishing between default titles and custom ones.
2025-02-17 17:22:44 +01:00
mr. m
4bc5e41c35 Trim more the urlbar on single toolbar, fixed pinned tabs issues and removed security indicator on the urlbar unless it's hovered 2025-02-16 13:17:36 +01:00
mr. M
697db429f6 Refactor zen-theme.css to improve toolbar background transparency handling 2025-02-15 00:45:07 +01:00
mr. M
1a293fc5ff Refactor initialization logic in ZenStartup and update tab toolbar handling in ZenUIManager and ZenPinnedTabManager 2025-02-14 19:32:56 +01:00
mr. M
786a377ada Invalidate cached tabs after inserting a new pinned tab in ZenPinnedTabManager 2025-02-14 17:01:28 +01:00
mr. M
c27a26eee4 Rename 'zen-browser-tabs-wrapper' to 'zen-tabs-wrapper' across multiple files for consistency 2025-02-14 11:38:00 +01:00
mr. M
869c2eb8b2 Refactor pinned tab management and improve event handling for workspace initialization 2025-02-14 11:29:25 +01:00
mr. M
e387652c8b HUGE: handle workspaces as individual containers instead of a single list of tabs 2025-02-11 22:01:41 +01:00
mr. M
da04a7a629 Enhance tab management by allowing drag-and-drop functionality with the workspace indicator and adjust URL bar primary adjustment timing 2025-02-07 23:36:07 +01:00
mr. m
4824404636 Fixed sidebar icons 2025-02-06 13:56:25 +01:00
mr. M
01d9fc31c1 Enhance ZenUIManager and ZenPinnedTabManager for improved tab drag-and-drop behavior and URL bar handling 2025-02-03 20:27:03 +01:00
mr. M
88fbae4bec Refactor ZenPinnedTabManager and ZenUIManager for improved tab closing behavior and URL bar handling 2025-02-03 19:42:28 +01:00
mr. M
61190233fc Enhance tab management by updating tab close handling and improving tab drag-and-drop functionality 2025-02-02 14:25:05 +01:00
mr. M
4975ff6fdc Add Linux-specific padding for toolbox and clean up drag indicator calculations 2025-01-31 23:54:26 +01:00
mr. M
7b41eb753d Refactor tab drag-and-drop functionality and enhance drag indicator styling 2025-01-31 23:02:13 +01:00
Kristijan Ribarić
384e268516 Fixes after rebase 2025-01-31 20:11:48 +01:00
Kristijan Ribarić
d3a04d043b Enhance Zen Tab Reordering: Add drag-and-drop between tab containers (normal tabs, pinned and essentials)
This commit enhances the drag-and-drop functionality in Zen, allowing users to seamlessly reorder tabs between the pinned tabs, essential tabs, and regular tab containers.  The changes include:

- Added `moveToAnotherTabContainerIfNecessary` and `applyDragoverClass` methods to `ZenPinnedTabManager` to handle tab movement and visual feedback during drag-and-drop.
- Updated `tabs.js` to integrate with the new methods, correctly handling tab pinning and unpinning, and essential tab toggling during reordering.
- Added CSS classes and styles to visually indicate the drop position (before or after) a target tab during the drag operation.  This improves user experience and clarity.
2025-01-31 17:57:46 +01:00
mr. M
d4dd298ef8 Enhance tab management by updating the toolbar on tab close and adjusting overflow behavior for the tab browser 2025-01-27 01:23:01 +01:00
mr. M
ca1e0ffdea Refactor tab unloading logic to use explicit unload method and remove linked panel attribute 2025-01-24 17:55:31 +01:00
mr. M
c44c63d5ce Add debug logging for pinned tab manager and ensure session store initialization 2025-01-18 21:38:12 +01:00
mr. M
9fb04e4f7c Add shutdown check to prevent closing pinned tabs during shutdown 2025-01-17 20:30:48 +01:00
mr. M
8e783f948f Fixed essentials and pinned tabs not being correctly restored and race conditions when starting multiple zen windows 2025-01-17 19:01:32 +01:00
mr. M
e26ff172c8 Add tab icon change handling and enhance tab background styles 2025-01-11 22:54:04 +01:00
mr. M
7dfa6d55ba Refactor CSS and JavaScript files for consistency; clean up whitespace and formatting 2025-01-04 02:21:45 +01:00
mr. M
2ce0eae82e Refactor pinned tab position handling to use cached pin objects for improved performance 2025-01-02 15:40:59 +01:00
mr. M
29e7df3575 Refactor ZenPinnedTabsStorage initialization and improve workspace handling 2024-12-19 20:43:07 +01:00
mr. M
947251534f Fixed reordering pinned tabs not saving their state 2024-12-18 19:27:23 +01:00
mr. M
d3421270b1 Added a fallback link in case we fail to fetch essentials favicon 2024-12-16 23:25:38 +01:00
mr. M
a84af82740 Fixed essentials not restoring the icons after startup 2024-12-16 19:37:54 +01:00
mr. M
c8e44703d5 Update watermark preference based on build type and enhance URL bar positioning 2024-11-30 18:59:47 +01:00
Kristijan Ribarić
01c8032f20 Fix: Handle essential tabs and container-specific essentials
Refactor workspace switching logic to correctly handle
essential tabs and introduce container-specific essentials.

This change addresses issues with essential tabs not being
handled correctly during workspace switches.

The `changeWorkspace` function is refactored to improve
clarity and maintainability.  The logic for showing and
hiding tabs is streamlined, and tab selection is handled
more robustly.  A new `_shouldShowTab` function is
introduced to centralize the logic for determining tab
visibility based on workspace and container settings.  The
logic also handles pinned essential tabs in the different workspace types.

The pinned tab manager is updated to support container-
specific essentials and to refresh pinned tabs on workspace
changes.  The `_shouldShowPin` function is introduced to
manage visibility of pinned tabs in different workspaces
considering essential tabs, pinned tabs and containers.

This change also fixes a bug where the selected tab would
sometimes be changed unexpectedly when switching
workspaces.
2024-11-20 10:05:07 +01:00
mr. m 🤙
2f79e110c4 Merge pull request #3113 from kristijanribaric/fix-pinned-tabs-showing-in-wrong-workspace
(feat) Hide pinned tabs not in active workspace
2024-11-19 22:06:59 +01:00
Kristijan Ribarić
38e09d84fd (feat) Hide pinned tabs not in active workspace
When a new pinned tab is opened and it does not belong to the
currently active workspace and is not marked as essential, it
will now be hidden.  This prevents pinned tabs from cluttering
the tab bar when switching between workspaces.

The global variable for the pinned tab manager has also been
renamed from `gZenPinnedTabManager` to
`_initializePinnedTabs`.
2024-11-19 22:06:23 +01:00
mr. m 🤙
44a4ce44d4 Merge pull request #3108 from zen-browser/toolbar-redesign
Toolbar redesign
2024-11-19 17:49:00 +01:00
mr. M
032954be2b feat: enhance zen styles for toolbar, sidebar, and tabs; adjust layout and padding 2024-11-18 23:14:50 +01:00
Kristijan Ribarić
62d5684435 Fix: Restore pinned tabs to their pinned URLs on startup if the option is checked
This change modifies the pinned tab initialization logic to restore
pinned tabs to their original pinned URLs when the browser starts.
Previously, pinned tabs would open to their last visited URL, even if the option for restoring them to the pinned URL was checked.
2024-11-15 13:35:10 +01:00
mr. m 🤙
ab7ae3f89a Merge pull request #2879 from kristijanribaric/fix/change-order-of-tab-context-menu-items
Display Add to Essentials tab context menu item before Pin Tab
2024-11-13 23:12:41 +01:00
kristijanribaric
b323333bd1 Prevent pins deletion from database on non explicit tab closes (window closing) (#2903)
Previously, if you had multiple windows opened and you closed one, it could trigger TabClose event and delete the pins from zen_pins table. With this change the pins are deleted only on explicit tab closing from tab context menu.
2024-11-11 20:51:46 +01:00