Commit graph

528 commits

Author SHA1 Message Date
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
mauro-balades
c86b344c17
Refactor _expandWorkspacesStrip function to handle undefined browser parameter 2024-10-11 17:52:18 +02:00
mauro 🤙
3fbe081350
Merge pull request #49 from kristijanribaric/fix(pinned-tabs)-pinned-tabs-with-no-base-url-fix
Fix: Update pinned tab resetting logic
2024-10-11 10:45:28 +02:00
Kristijan Ribarić
7f430568a8 Fix: Update pinned tab context menu visibility logic
This commit fixes an issue where weird stuff would happen if pinned tab didn't have a base url to reset to. If there is no base url, reset tab functionality won't work and it won't be visible in context menu until you click replace pinned url with current or unpin and repin the tab.
2024-10-11 10:35:32 +02:00
mauro-balades
d2296c0523
Refactor keyboard shortcuts and tab unloader logic 2024-10-10 19:01:13 +02:00
mauro 🤙
f7135c0f4a
Merge pull request #48 from BrhmDev/fix/floating-compact-mode
Fix floating compact mode
2024-10-10 18:59:12 +02:00
brahim
b0d8e8c484 Fix floating compact mode: revert logic in ZenCompactMode.mjs, use invisible padding. 2024-10-10 13:54:37 +02:00
mauro 🤙
88c647c8bd
Merge pull request #47 from BrhmDev/fix/web-panel-moving-splitview-splitters-when-pinned
Fix splitview splitters in wrong position when using web panel (pinned)
2024-10-10 13:27:20 +02:00
mauro 🤙
22fc3bf858
Merge pull request #46 from BrhmDev/fix/web-panel-docshell-becoming-inactive-when-using-splitivew
Fix web panel docShell becoming inactive when using splitview.
2024-10-10 12:30:42 +02:00
brahim
1077ce8705 Move web panel to tabbox wrapper when not pinned. 2024-10-10 11:46:24 +02:00
brahim
e9adb6606d Fix web panel docShell becoming inactive when using splitview. 2024-10-10 10:35:56 +02:00
mauro 🤙
f2921d75b4
Merge pull request #45 from kristijanribaric/fix(workspaces)-change-tab-to-different-workspace-fix
Fix(workspaces) performance optimizations
2024-10-09 20:06:50 +02:00
mauro-balades
5e657e93b3
Refactor ZenCompactMode to remove unused function _fixCrossedEdge and simplify _getCrossedEdge 2024-10-09 20:02:44 +02:00
mauro-balades
43ed740d69
Made compact mode float 2024-10-09 20:01:50 +02:00
Kristijan Ribarić
b296405a45 Fix: Use integer positions for workspaces
This commit changes the `position` column in the `workspaces` table to be an `INTEGER` instead of a `REAL` data type. This change is made to ensure that workspace positions are always whole numbers, which prevents issues with floating-point precision and ensures consistent ordering of workspaces.

Additionally, it updates the logic for calculating new workspace positions to use `Math.floor` to round down to the nearest integer, ensuring that positions are always integers.

This change also adjusts the `minGap` constant used in the `shouldReorderWorkspaces` function to `1`, which reflects the minimum allowed gap between workspace positions now that they are integers.
2024-10-09 19:49:45 +02:00