Commit Graph

375 Commits

Author SHA1 Message Date
ricky
2214ab3a17 Refactor sidebar expanded on-hover functionality and fix sidebar expand/collapse behavior
- **Preferences**:
  - Added a new preference `zen.view.sidebar-expanded.on-hover.paused-for-expand` to manage the paused state of the sidebar hover functionality.
  - Updated `zen.view.sidebar-expanded.on-hover` preference handling to ensure proper behavior when toggling the sidebar.

- **ZenUIManager.mjs**:
  - Updated `_updateOnHoverVerticalTabs` method to handle the expanded state and remove hover attributes when the sidebar is expanded.
  - Refactored `_updateEvent` method to check and handle the expanded state of the sidebar, and to open or close the sidebar accordingly.
  - Added `openSidebar` and `closeSidebar` methods to manage the sidebar's expanded state and related attributes.
  - Refactored `toggleExpand` method to handle the new `paused-for-expand` preference and ensure proper toggling of the sidebar's expanded state.

- **zen-settings.js**:
  - Updated `setCompactModeStyle` method to handle the new `paused-for-expand` preference.
  - Ensured that the `paused-for-expand` preference is reset when the sidebar expand strategy is changed.

- **zen-browser.js**:
  - Added the new preference `zen.view.sidebar-expanded.on-hover.paused-for-expand` with a default value of `false`.

- **Submodule Updates**:
  - Updated `l10n` submodule to the latest commit `dd93803b84f398834049a3f650536fbdbd14cbca`.
  - Updated `zen-components` submodule to the latest commit `d853fa8de4167dfd4d1289f4f15792a698c738c3-dirty`.

- **Miscellaneous**:
  - Fixed indentation issues in `ZenUIManager.mjs`.
  - Removed commented-out code in `ZenUIManager.mjs`.
  - Ensured proper formatting and alignment of code blocks.

ISSUE: #2156
2024-10-22 22:01:05 -04:00
mr. m 🤙
a6cbda63b1 Merge pull request #2251 from kristijanribaric/fix/open-new-tab-when-last-unpinned-tab-is-closed-in-workspace-and-no-pinned-tabs-are-loaded
Fix: Open new tab when last unpinned tab is closed in workspace and no pinned tabs are loaded
2024-10-20 19:05:01 +03:00
Kristijan Ribarić
15ddd0f680 Fix: Open new tab when last unpinned tab is closed in workspace and no pinned tabs are loaded
Added a preference to keep default behavior or apply the new one.
2024-10-20 17:44:14 +02:00
mr. M
841261a36e Fixed malformed XUL for some themes 2024-10-20 17:40:21 +02:00
mr. M
bbdd6684fe Fixed tabs moving not closing expand on hover sometimes 2024-10-19 20:14:11 +02:00
mr. M
07cd774619 Fixed keyboard shortcuts for Shift + [N] 2024-10-19 19:10:57 +02:00
mr. M
2cca7a8308 Fix display issues for shortcuts in macos for certain keybinds (closes https://github.com/zen-browser/desktop/issues/2189) 2024-10-18 23:27:14 +02:00
mr. M
aa0d1c27c8 Remove web appearence bug 2024-10-18 18:12:54 +02:00
Bryan Galdámez
8744d1a9ec Added new disable all button 2024-10-18 17:49:34 +03:00
mr. M
d6c4c3c66a Changed light theme and added new split view icon 2024-10-17 19:19:28 +02:00
mr. M
6e7a2e4c9e Hide deactivated workspaces are now an option 2024-10-15 10:57:09 +02:00
kristijanribaric
8ecbbd0719 feat: Add preference to force container tabs to a workspace with that container set as default (#2095)
This commit introduces a new preference, "zen.workspaces.force-container-workspace", that allows users to control whether container tabs are automatically placed in a dedicated workspace. When enabled, this feature ensures that all tabs from a container are grouped together within a specific workspace.

The following files were modified:

- `src/browser/components/preferences/zen-settings.js`: Added the new preference definition.
- `src/browser/app/profile/zen-browser.js`: Set the default value for the new preference.
- `src/browser/components/preferences/zenTabsManagement.inc.xhtml`: Added a checkbox to control the new preference in the settings UI.
2024-10-14 17:24:14 +02:00
kristijanribaric
0150e6d689 Fix: Open external links in workspace's default container (#2081)
* Fix: Pass `fromExternal` to `ZenWorkspaces.getContextIdIfNeeded`

* Add allowInheritPrincipal to ZenWorkspaces.getContextIdIfNeeded
2024-10-13 23:48:39 +02:00
kristijanribaric
1628b4ca3e feat(sessionstore): Store zen pinned entry in tab state (#2058)
This commit adds the `zenPinnedEntry` property to the `TabState` object, which stores the full zen pinned entry data. This information will be used to restore the pinned entry when a tab is restored from the session.

The following changes were made:

- Added `zenPinnedEntry` to `TabState`
- Removed `zenPinnedUrl`, `zenPinnedTitle`, `zenPinnedIcon`, and `zenPinnedTriggeringPrincipal` as they are now included in `zenPinnedEntry`.
- Updated the `TabState` serialization and deserialization logic to handle the new `zenPinnedEntry` property.
2024-10-12 22:07:53 +02:00
kristijanribaric
71a2646c5b Store pinned tab triggering principal in sessionstore (#2055) 2024-10-12 19:08:38 +02:00
brahim
54706e51af Fix change on hover not changing right pref. 2024-10-12 12:07:29 +02:00
Kristijan Ribarić
8c04cda18b feat: Replace close shortcut options for pinned tabs with a single menulist
This commit replaces the four separate checkboxes for close shortcut options for pinned tabs with a single menulist. This makes the UI more streamlined and user-friendly, as users can now easily select from a list of available options instead of having to check or uncheck multiple boxes.

The new menulist offers the following options:

- reset-unload-switch: Resets the tab if it was changed, otherwise unloads it.
- unload-switch: Unloads the tab if it was changed, otherwise does nothing.
- reset-switch: Resets the tab if it was changed, otherwise switches to it.
- switch: Switches to the tab.
- reset: Resets the tab.
- close: Closes the tab.

This provides a more comprehensive and flexible set of options for managing pinned tabs, making the experience more intuitive and customizable.
2024-10-08 21:07:06 +02:00
Kristijan Ribarić
948cfc4034 feat: Add new settings for close shortcut behavior of pinned tabs
This commit introduces new settings for the behavior of closing pinned tabs using the close shortcut.

The following options are now available:

- **Reset pinned tab on close shortcut**: Reset the tab to the pinned URL.
- **Unload pinned tab on close shortcut**: Unload the tab.
- **Change pinned tab on close shortcut**: Change the pinned tab.
- **Close pinned tab on close shortcut**: Close the tab.

This provides more granular control over how pinned tabs are handled when the close shortcut is used, allowing users to customize the behavior to their specific needs.
2024-10-08 17:47:19 +02:00
Kristijan Ribarić
fdd99cb8d6 Fix: Refactor pinned tab management and remove unnecessary attribute checks
This commit refactors the pinned tab management code to improve clarity and reduce redundant checks.

The following changes were made:

- Moved pinned tab logic to a dedicated `gZenPinnedTabManager` class.
- Removed unnecessary attribute checks for `zen-pinned-url`, `zen-pinned-title`, and `zen-pinned-icon` as these are now handled by the `gZenPinnedTabManager` class.
- Simplified session restore logic for pinned tabs.
- Updated the pinned tab context menu logic to utilize the `gZenPinnedTabManager` class.
- Removed unnecessary code blocks related to pinned tabs.

These changes improve the overall readability and maintainability of the pinned tab management code.
2024-10-08 15:00:11 +02:00
Kristijan Ribarić
8c42614427 feat(pinned-tab-manager): Add restore pinned tabs to pinned url option
This commit introduces a new option to the pinned tab manager that allows users to restore pinned tabs to their pinned URL and title, even if the current tab has a different URL.

- Adds a new preference `zen.pinned-tab-manager.restore-pinned-tabs-to-pinned-url` to control this behavior.
- Updates the tab browser, tab state, and preferences code to support the new option.
- Adds a new UI element in the settings to allow users to enable/disable this feature.

This feature enhances the pinned tab manager by providing more control over how pinned tabs are restored when the browser is restarted.
2024-10-08 15:00:10 +02:00
Kristijan Ribarić
6dcff571d2 feat(zen-pinned-tab-manager): Add pinned tab management functionality
This commit introduces a new feature: pinned tab management. It allows users to pin tabs and define whether to reset pinned tabs on close.

- Adds a new `ZenPinnedTabManager` component to manage pinned tabs.
- Updates `zen-assets.inc.xhtml` and `zen-assets.jar.inc.mn` to include the new component.
- Modifies the `ZenStartup.mjs` file to initialize the new manager.
- Introduces a new preference `zen.pinned-tab-manager.reset-pinned-tab-on-close-shortcut` to control the behavior of pinned tabs on close.
- Updates the settings UI to reflect the new pinned tab management functionality.
- Refactors related preferences from `zen.tab-unloader.*` to `zen.pinned-tab-manager.*`.

This feature enhances Zen's tab management capabilities by providing users with more control over their pinned tabs.
2024-10-08 15:00:10 +02:00
Kristijan Ribarić
43834e57f0 feat(sessionstore): Add pinned url, and pinned title to tab state
Adds `zenPinnedUrl`, and `zenPinnedTitle` attributes to the tab state to persist pinned tab information. This allows users to restore their previous Zen pinned base url configuration upon restarting the browser.
2024-10-08 15:00:10 +02:00
Kristijan Ribarić
b185773daf feat(pinned-tab-url-reset): add option to reset pinned tab to originally pinned url
Adds a new setting to enable or disable pinned tab url resetting on pressing close tab shortcut.

Persists pinned tab url and label on browser closing.
2024-10-08 15:00:10 +02:00
mauro-balades
a556454ced Add ZenGradientGenerator to zen-assets.jar and zen-styles
This commit adds the ZenGradientGenerator module to the zen-assets.jar and zen-styles directories. The ZenGradientGenerator is responsible for generating gradients used in the Zen theme. This addition will enhance the visual appearance of the theme.
2024-10-07 20:54:53 +02:00
mauro-balades
5e85f1025a Fix display issues on keyboard shortcuts settings on some keyboard layouts 2024-10-07 18:42:17 +02:00
mauro-balades
eebcb0cb6e Fixed keyboard shortcuts not being displayed correctly on the settings after a restart 2024-10-07 18:28:33 +02:00
mauro-balades
b323a92dbf Added zen workspaces for syncing 2024-10-05 23:27:25 +02:00
mauro 🤙
57f697975e Merge pull request #1899 from kristijanribaric/feature(workspace-sync)-load-workspace-sync-script
Feature: Add Zen Workspaces synchronization
2024-10-05 22:53:49 +02:00
Kristijan Ribarić
9a9171055c feat(sync): Removed patch files, placed the logic in zen files 2024-10-05 22:53:13 +02:00
mauro-balades
8de8f190ff Fixed internal keyboard shortcuts for macos (https://github.com/zen-browser/desktop/issues/1629) and bookmarks sidebar separation 2024-10-05 18:42:27 +02:00
Kristijan Ribarić
20f6dfafa1 feat: Add Workspaces to Sync options
This commit adds Workspaces to the list of data types that can be synced.

This introduces the following changes:

- Adds a new preference `services.sync.engine.workspaces` to control syncing of Workspaces.
- Updates the `syncChooseWhatToSync.js` and `syncChooseWhatToSync.xhtml` files to include the new Workspaces option in the UI.
- Adds relevant localization strings to `preferences-ftl`.
- Updates CSS styling for the Workspaces option.
- Updates `zen-browser.js` to disable Workspace syncing by default.

This change allows users to choose whether to sync their Workspaces across devices.
2024-10-05 15:11:14 +02:00
mauro-balades
c8391950cf Expanded on sidebar stylings and added option to disable border of bottom icons 2024-10-04 19:19:40 +02:00
mauro-balades
5d0ea6a2c3 Fixed tab unloader pref not being updated (closes https://github.com/zen-browser/desktop/issues/1835) 2024-10-04 18:29:44 +02:00
mauro-balades
e2792eecb5 Made the code look cleaner 2024-10-04 18:21:41 +02:00
mauro-balades
39caaf5caa Synced workspaces across windows and also implemented MultiWindowFeatures 2024-10-01 23:21:40 +02:00
mauro-balades
bd8501fd77 Updates patches for firefox 131.0! 2024-10-01 20:05:14 +02:00
Mauro Baladés
58fcbd9dfa Update zen-components submodule commit
``
2024-09-29 22:27:03 +03:00
mauro-balades
f7ebf48e49 Fixed not updating the theme list when spamming the disabled button 2024-09-29 20:54:18 +02:00
mauro-balades
bc03bc06c4 Fix issue with saving settings in Zen CKS preferences 2024-09-29 14:25:10 +02:00
mauro-balades
99569e4588 Fixed duplicate keys on settings page (closes #https://github.com/zen-browser/desktop/issues/1784) 2024-09-29 12:51:40 +02:00
mauro-balades
40890470fe Added preferences for split views and tabs unloader 2024-09-29 12:18:21 +02:00
mauro-balades
c29a81d710 Add warning for unsafed shortcuts 2024-09-29 11:36:23 +02:00
mauro-balades
d0b6f9489c Prevent KBS from being registrered if the view is hidden 2024-09-28 22:12:51 +02:00
mauro-balades
4d019067ef Refactor ZenCustomizableUI.sys.mjs and zen-sidebar-icons.inc.xhtml 2024-09-28 22:10:37 +02:00
mauro-balades
ffcf2a040c Added tab unloader to the settings page (WIP) 2024-09-28 08:30:03 +02:00
mauro-balades
c32c16d932 Fixed updating keyboard shortcuts on settings 2024-09-26 17:20:55 +02:00
mauro-balades
996c292916 Refactor tab width calculation in tabs.js 2024-09-25 21:37:39 +02:00
mauro-balades
71c20bdf98 Fixed extra width on right side compact mode and sidebar toolbar being hidden in fullscreen mode 2024-09-25 17:49:15 +02:00
mauro-balades
b1c90ceed2 Update subproject commit in l10n and zen-components 2024-09-24 21:30:34 +02:00
mauro-balades
863abd3a70 Update subproject commit in l10n and zen-components
Fix event handling for macOS in zen-settings.js
2024-09-24 21:20:50 +02:00