Commit graph

542 commits

Author SHA1 Message Date
Kristijan Ribarić
410264c9c6 Fix: Create new tab when closing last unpinned tab. 2024-10-18 20:45:16 +02:00
mr. M
cfa0d1c8f4
Merge branch 'main' of https://github.com/zen-browser/components 2024-10-18 18:19:59 +02:00
mr. M
ed83f5952e
Refactor ZenKeyboardShortcuts.mjs to rebuild shortcuts if data is missing 2024-10-18 18:19:53 +02:00
mr. m 🤙
301fec9557
Merge pull request #59 from GunGunGun/patch-1
Recreate shortcuts file if not exist/deleted -  ZenKeyboardShortcuts.mjs
2024-10-18 19:19:32 +03:00
mr. M
d567e18216
Fixed shortcuts on startup 2024-10-18 17:30:50 +02:00
mr. M
e13fa2315e
Refactor workspace icon picker element IDs 2024-10-18 17:09:13 +02:00
mr. m 🤙
cb51987dc2
Merge pull request #58 from JosueGalRe/main
 Added disable all component handling
2024-10-18 17:49:21 +03:00
Gun
e6d144879c
Recreate shortcuts file if not exist/deleted - ZenKeyboardShortcuts.mjs
Recreate shortcuts file if not exist/deleted -  ZenKeyboardShortcuts.mjs
2024-10-18 19:59:41 +07:00
Bryan Galdámez
2f2881814e Added disable all component handling 2024-10-17 22:57:55 -06:00
mr. m 🤙
d853fa8de4
Merge pull request #57 from HarryHeres/fix/workspaces-icon-picker
Fixing workspaces icon picker
2024-10-18 01:40:31 +03:00
HarryHeres
6b4d3f54f3
Fixing workspaces icon picker 2024-10-18 00:27:56 +02:00
mr. m 🤙
d569f48bb2
Merge pull request #56 from gunir/patch-2
Better placement for Open In Split View
2024-10-17 20:31:48 +03:00
mr. m 🤙
a7eecc0d9c
Merge pull request #55 from HarryHeres/fix/macos-window-buttons-hover
Fixed MacOS window buttons hover in compact mode
2024-10-17 20:31:06 +03:00
mr. m 🤙
ec791a3ea1
Merge pull request #54 from kristijanribaric/feature/workspace-reordering
Feature:  Workspace reordering
2024-10-17 20:29:44 +03:00
Gunir
2bb41daebe
Better placement for Open In Split View 2024-10-17 09:35:03 +07:00
HarryHeres
624eb62453
Fixed MacOS window buttons hover in compact mode 2024-10-16 21:19:58 +02:00
Kristijan Ribarić
c8deb36100 Re-implemented workspace reordering to be based on dragging. 2024-10-16 10:08:45 +02:00
Kristijan Ribarić
17cace3097 feat: Allow workspace reordering
This commit introduces the ability to reorder workspaces in the workspace manager. This adds functionality to move workspaces up and down within the list, allowing users to customize the order in which they appear.

- Added new buttons for moving workspaces up and down.
- Implemented `moveWorkspaceUp` and `moveWorkspaceDown` methods in `ZenWorkspacesStorage` to handle workspace reordering.
- Updated `ZenWorkspaces` to handle the new reorder mode and button events.
- Modified the workspace list UI to display reorder buttons and indicate when reorder mode is active.

These changes provide users with more control over their workspace organization and improve the overall usability of the workspace manager.
2024-10-15 20:05:07 +02:00
mr. M
686c364b59
Refactor ZenSidebarManager to use dynamic Firefox version in default mobile user agent 2024-10-15 17:06:43 +02:00
mr. M
83a612c6e5
Fix issue with corrupted themes data file 2024-10-15 16:10:25 +02:00
mr. M
3dc7738737
Refactor ZenKeyboardShortcuts to remove event listener duplication 2024-10-15 15:38:30 +02:00
mr. M
cdc9fb4980
Refactor ZenKeyboardShortcuts to migrate from version 2 to 3 2024-10-15 15:05:27 +02:00
mr. M
ecdc196752
Fixed MacOS native shortcuts 2024-10-15 14:05:02 +02:00
mr. M
d66477ba43
Refactor ZenWorkspaces to fix issue with workspace icon picker positioning 2024-10-15 12:09:09 +02:00
mr. M
53317969bf
Refactor ZenWorkspaces to fix issue with workspace icon picker positioning 2024-10-15 09:38:48 +02:00
mr. M
612abc81e7
Refactor ZenKeyboardShortcuts to handle null key values 2024-10-15 08:28:16 +02:00
mr. M
cfdac01690
Refactor ZenWorkspaces to remove unnecessary then call and return an array 2024-10-14 20:55:32 +02:00
mr. M
2d43df747d
Fixed workspaces not rendering properly 2024-10-14 19:55:01 +02:00
mr. M
6031981acd
Refactor ZenSidebarManager and ZenWorkspaces
This commit refactors the ZenSidebarManager and ZenWorkspaces classes. In ZenSidebarManager, the _createWebPanelBrowser method now includes the userContextId when creating a new browser. Additionally, a new method createContainerTabMenu is added to handle the creation of a context menu for container tabs. The contextChangeContainerTab method is also added to handle changing the userContextId for a container tab.

In ZenWorkspaces, the ownerWindow property is now set to the window object. The _contextMenuId property is now bound to the ZenWorkspaces instance. The onclick event handler is modified to use the ownerWindow property and the changeWorkspace method is now called on the ZenWorkspaces instance.

These changes improve the functionality and maintainability of the ZenSidebarManager and ZenWorkspaces classes.
2024-10-14 18:31:05 +02:00
mr. M
b645656e6f
Fixed workspaces syncing across windows 2024-10-14 17:45:09 +02:00
mr. m 🤙
41193b2050
Merge pull request #53 from kristijanribaric/feature/force-container-tabs-to-open-in-assigned-workspace
Feature: Force container tabs to a workspace where that container is set as default
2024-10-14 17:24:07 +02:00
Kristijan Ribarić
c9adec30cb Fix: Remove unnecessary then call in ZenWorkspaces and return an array. 2024-10-14 16:21:40 +02:00
Kristijan Ribarić
74bd43f9c9 Add lazy pref getter for zen.workspaces.force-container-workspace 2024-10-14 10:43:14 +02:00
Kristijan Ribarić
b66af853f2 feat(workspaces): Force container tab to open in workspace where it's assigned as default
This commit introduces a new preference, `zen.workspaces.force-container-workspace`, which allows users to automatically switch to the workspace associated with a specific tab's container.
2024-10-14 10:33:09 +02:00
mr. m 🤙
232cb69ccf
Merge pull request #52 from kristijanribaric/fix/workspaces-open-external-links-in-default-container
Fix: Open external links in workspace's default container
2024-10-13 23:48:21 +02:00
Kristijan Ribarić
ca0e6030d5 This commit introduces a new parameter allowInheritPrincipal to the getContextIdIfNeeded function in ZenWorkspaces.mjs. This allows recognition of opening bookmarks in new tab so that they can be opened in a default container. 2024-10-13 22:41:37 +02:00
Kristijan Ribarić
893ebcd0f7 fix(workspaces): Use active workspace context ID for external calls
This commit modifies the `getContextIdIfNeeded` method to automatically use the active workspace context ID for external calls.

Previously, external calls would use the provided `userContextId` if it was different from the active workspace context ID. Now, if `fromExternal` is true and there's an active workspace, the method will return the active workspace context ID, ensuring consistency with the active workspace.
2024-10-13 22:07:30 +02:00
mr. M
1bc2cf53c8
Refactor KeyShortcutModifiers to handle platform-specific key modifiers consistently 2024-10-13 17:41:13 +02:00
mr. M
b991b42402
Refactor ZenKeyboardShortcuts to handle platform-specific key modifiers consistently 2024-10-13 14:42:20 +02:00
mr. M
59d8bdec89
Refactor KeyShortcutModifiers to handle platform-specific key modifiers consistently 2024-10-13 02:22:53 +02:00
mr. m 🤙
382466fcd7
Merge pull request #51 from kristijanribaric/fix/pinned-tabs-storing-the-whole-entry
Fix/pinned tabs storing the whole entry
2024-10-12 22:02:16 +02:00
Kristijan Ribarić
5e4ea9889c Fix: Update pinned tab entries to include triggering principal
This commit updates the pinned tab entries to include the triggering principal.

Previously, the pinned tab entries only included the URL and title of the tab. This caused issues when restoring pinned tabs, as the triggering principal was not being saved.

This commit adds the triggering principal to the pinned tab entries, ensuring that they can be restored correctly.

This fixes the issue where pinned tabs were not being restored correctly.
2024-10-12 21:52:07 +02:00
mr. M
600d0d7149
Refactor ZenWorkspaces to handle changing workspaces and update context menu 2024-10-12 21:15:34 +02:00
Kristijan Ribarić
7d8dde9269 Store all pinned tab data in single attribute
This commit updates the pinned tab manager to store all relevant data (URL, title, triggering principal, and icon) in a single JSON string attribute (`zen-pinned-entry`).

This simplifies the code by eliminating the need for multiple individual attributes and provides a more robust and organized approach to storing the pinned tab's state.

The following changes were made:

- Removed redundant attributes (`zen-pinned-url`, `zen-pinned-title`, `zen-pinned-triggering-principal`)
- Updated the pinned tab data structure to store all information in a single `zen-pinned-entry` attribute
- Adjusted the `resetPinnedTabData` function to handle the new data structure
- Modified the pinned tab context menu to reflect the changes in the attribute handling

This change provides a more efficient and streamlined way to manage pinned tab data, enhancing the overall maintainability and clarity of the codebase.
2024-10-12 20:43:26 +02:00
mr. M
1396523f3b
Refactor ZenWorkspaces to handle changing workspaces and update context menu 2024-10-12 19:08:58 +02:00
mr. m 🤙
c5b907ade6
Merge pull request #50 from kristijanribaric/fix/middle-mouse-clicking-pinned-tab-should-follow-shortcut-behavior
Fix: Add middle click listener to pinned tabs to follow the behavior of pinned tab close shortcut
2024-10-12 18:45:17 +02:00
Kristijan Ribarić
0183de5382 feat: Store triggering principal for pinned tabs
This commit adds the ability to store the triggering principal for pinned tabs in the session store. This allows us to correctly restore pinned tabs when a user has multiple profiles open, as the triggering principal will be used to determine which profile the pinned tab belongs to.

The following changes were made:

- Added a new attribute, "zen-pinned-triggering-principal", to pinned tabs to store the triggering principal.
- Updated the session store to store and restore the triggering principal for pinned tabs.
- Updated the `ZenPinnedTabManager` to set and get the triggering principal for pinned tabs.

This change is necessary to ensure that pinned tabs are correctly restored when reset to pinned URL.
2024-10-12 18:18:58 +02:00
Kristijan Ribarić
d51cb4f1e3 Fix: Add middle click to handle close pinned tab and handle tab switch
This commit fixes an issue where middle clicking a pinned tab would not follow the behavior of pinned tab close shortcut.
2024-10-12 18:18:58 +02:00
mr. M
9a1beadc03
Refactor ZenWorkspaces to handle changing workspaces and update context menu 2024-10-12 17:53:49 +02:00
mr. M
0a23df721e
Tried to fix " Closing Tabs opened from SidePanel renders the browser unusable" 2024-10-11 23:02:43 +02:00