Commit graph

510 commits

Author SHA1 Message Date
brahim
5020e59f8e Fix splitview wrong size bug 2024-10-04 10:40:23 +02:00
brahim
28baa2f9d4 Reimplement splitview resize for treelayout splitview. 2024-10-04 10:40:23 +02:00
brahim
a102dd4c37 Insert splitters in right location for splitview. 2024-10-04 10:40:23 +02:00
brahim
d853a8d08d Fixes for splitview with layoutTree, working gridmode 2024-10-04 10:40:23 +02:00
brahim
966ada7f0d Use layoutTree to construct splitview. No longer make use of a grid. 2024-10-04 10:40:23 +02:00
brahim
9eb42269de Add split view rearrangement mode 2024-10-04 10:40:23 +02:00
brahim
fd61d7d1f1 Refactor: don't combine horizontal splitters 2024-10-04 10:40:23 +02:00
brahim
04a46912ea Refactor: calculate splitter template using templateAreas without splitters 2024-10-04 10:40:23 +02:00
mauro-balades
5822df61e5
Refactor: Migrate workspaces from JSON to new storage system 2024-10-03 22:31:07 +02:00
mauro-balades
c67cca9c70
Save only height and width for the sidebar 2024-10-03 20:49:55 +02:00
mauro-balades
1ed9227c01
Added workspaces migration system 2024-10-03 19:38:51 +02:00
mauro 🤙
a4a77f4dc0
Merge pull request #36 from kristijanribaric/save-workspaces-in-places-db
feat(workspaces): Store workspaces in a database
2024-10-03 19:13:02 +02:00
Kristijan Ribarić
05acfdb27e Fix: Prevent potential crash when workspace doesn't exist
This commit addresses a potential crash that could occur when the active workspace no longer exists. The issue was that the code attempted to access the `uuid` property of the first workspace in the list even if the list was empty.

This commit fixes the issue by using optional chaining (`?.`) to safely access the `uuid` property, ensuring the code doesn't crash if the workspace list is empty.
2024-10-03 11:52:18 +02:00
Kristijan Ribarić
9bcb66c768 feat(workspaces): Use preferences to manage active workspace
This commit updates the workspaces system to use preferences to manage the active workspace, instead of storing the active state in each workspace object.

The following changes were made:

- **ZenWorkspaces.mjs:**
    - Removed the `used` property from workspace objects and replaced it with a preference (`zen.workspaces.active`) to store the active workspace ID.
    - Modified the `getActiveWorkspace` and `changeWorkspace` methods to use preferences instead of the `used` property.
    - Added a new `isWorkspaceActive` method to check if a workspace is active.
- **ZenWorkspacesStorage.mjs:**
    - Removed the `is_active` column from the `zen_workspaces` table.
    - Removed the `setActiveWorkspace` method as the active workspace is now managed by preferences.

This change simplifies the code and makes it easier to manage the active workspace across multiple browser windows and doesn't write to the database on every workspace change. Additionaly, it enables local active workspace selection when workspace sync is implemented.
2024-10-03 10:19:18 +02:00
Kristijan Ribarić
511281c688 feat(db): rename workspace table to zen_workspaces
Renames the `moz_workspaces` table to `zen_workspaces` for consistency and better organization.
2024-10-02 15:32:47 +02:00
Kristijan Ribarić
62be9d1fdd Refactor: Remove unused workspace storage logic 2024-10-02 14:44:48 +02:00
Kristijan Ribarić
de8a857549 feat(workspaces): Store workspaces in a database
This commit introduces a new `ZenWorkspacesStorage` class to handle the persistence of workspaces in a database. The previous implementation used JSON files, but this approach brings several advantages, including:

- Improved performance and scalability
- Easier data management and synchronization
- Enhanced security and data integrity

This change removes the reliance on JSON files and streamlines workspace management, leading to a more robust and reliable system.
2024-10-02 09:37:09 +02:00
mauro-balades
2ea7024eea
Synced workspaces across windows and also implemented MultiWindowFeatures 2024-10-01 23:21:38 +02:00
mauro-balades
fbe5727705
Updated firefox mobile user agent 2024-10-01 20:11:31 +02:00
mauro-balades
9ed3468118
Updates patches for firefox 131.0! 2024-10-01 20:05:10 +02:00
mauro 🤙
42aba602ca
Merge pull request #34 from BrhmDev/fix/change-on-hover-not-using-pref
Fix splitView change on hover not listening to pref.
2024-10-01 07:25:46 +02:00
mauro 🤙
7c43f7943f
Merge pull request #33 from BrhmDev/fix/web-panel-back-and-forward-disable
Disable back and forward button inside web panel when they can't be used.
2024-10-01 07:24:42 +02:00
brahim
0d4bca3ef5 Make splitview change on hover only work when pref true. 2024-10-01 02:19:52 +02:00
brahim
921402f7a1 Disable back and forward button inside web panel when they can't be used. 2024-10-01 01:15:43 +02:00
mauro 🤙
1dd4160831
Merge pull request #32 from skara9/emoji-first-char
Fix display of ZWJ Emojis as Workspace Icons
2024-09-30 19:35:19 +02:00
Sátvik Karanam
65a07ce1c7
use intl segmenter 2024-09-30 02:06:27 -04:00
mauro-balades
e26ea1f4f0 Refactor KeyShortcutModifiers to fix control key behavior and improve consistency 2024-09-30 00:41:14 +02:00
Mauro Baladés
89b572e8fe Refactor KeyShortcutModifiers to fix control key behavior 2024-09-29 22:26:54 +03:00
mauro-balades
f108074b81 Refactor KeyShortcutModifiers to remove unnecessary parameter and improve consistency 2024-09-29 20:18:32 +02:00
mauro-balades
cc4f1a3eb2 Fixed workspace cycling with shortcuts 2024-09-29 19:03:26 +02:00
mauro-balades
50afebec5f Fixed workspace cycle using shortcuts 2024-09-29 19:01:54 +02:00
mauro-balades
2a6755d9ba Fixed duplicate keys on settings page (closes #https://github.com/zen-browser/desktop/issues/1784) 2024-09-29 12:51:37 +02:00
mauro-balades
37804deef0 Refactor ZenSidebarManager to associate browser with tab 2024-09-29 12:18:05 +02:00
mauro-balades
5df1298bfd Refactor keyboard shortcuts to use "Cmd" instead of "Meta" for macOS 2024-09-28 22:10:35 +02:00
mauro-balades
7147fd2dfc Refactor ZenTabUnloader to optimize tab unloading and add context menu options 2024-09-27 20:34:37 +02:00
mauro-balades
3681f71acf Refactor ZenTabUnloader to exclude tabs with sound playing or marked for ignore 2024-09-27 20:09:06 +02:00
mauro-balades
65782ccf69 Refactor ZenSidebarManager to comment out unused code for fetching web panel icons 2024-09-27 19:25:33 +02:00
mauro-balades
8efd7fecbe Refactor ZenSidebarManager to reload browser with default mobile user agent 2024-09-27 19:17:16 +02:00
mauro-balades
7af14f1484 Refactor ZenWorkspaces to fix icon mapping issue 2024-09-27 18:56:37 +02:00
mauro-balades
9ae3de71e7 Refactor ZenTabUnloader to remove unused code and optimize tab unloading timeout 2024-09-27 18:12:49 +02:00
mauro-balades
1fa61f4349 Refactor ZenTabUnloader to simplify tab unloading condition 2024-09-26 18:58:59 +02:00
mauro-balades
cb24052969 Do not show default container context menu if disabled 2024-09-26 18:58:04 +02:00
mauro-balades
9cce473af8 Refactor ZenTabUnloader to remove debug logging and optimize tab unloading 2024-09-26 18:50:28 +02:00
mauro-balades
d840faf90d Merge branch 'main' of https://github.com/zen-browser/components 2024-09-26 18:47:38 +02:00
mauro-balades
5b2e0030ed Refactor ZenTabUnloader to remove unused code and optimize tab handling 2024-09-26 18:47:35 +02:00
mauro 🤙
496ee293b5
Merge pull request #30 from BrhmDev/fix/make-web-panel-dragging-more-responsive
Make web panel dragging way more responsive by using requestAnimationFrame
2024-09-26 18:45:09 +02:00
mauro-balades
a615de5b6f Refactor ZenTabUnloader to add support for unloading inactive tabs
This commit refactors the ZenTabUnloader class to add support for unloading inactive tabs. It introduces a new class called ZenTabsIntervalUnloader, which periodically checks for inactive tabs and discards them if they meet certain criteria. The criteria include being inactive for a specified timeout period and not meeting any exclusion URLs.

The commit also adds a new class called ZenTabsObserver, which listens to various tab events and notifies the ZenTabUnloader when a tab's activity changes.

These changes improve the efficiency of tab management and help reduce resource usage by unloading tabs that are not actively being used.
2024-09-26 18:44:22 +02:00
brahim
65f32f3784 Make web panel dragging way more responsive by using requestAnimationFrame. 2024-09-25 19:25:55 +02:00
mauro 🤙
b63df576e3
Merge pull request #29 from BrhmDev/fix/expand-on-hover-flicker-when-mouse-overshoot
Fix flicker when mouse overshoot for expand on hover
2024-09-25 17:50:06 +02:00
mauro 🤙
88c5f7be14
Merge pull request #28 from BrhmDev/feature/make-zen-sidebar-draggable
Make zen sidebar draggable
2024-09-25 17:16:55 +02:00