Flashing the sidebar when opening glance is unnecessary, as the user explicitly opens the glance tab so there are no new information presented to the user in the sidebar.
On the other hand, the sidebar partially covers the glance tab, meaning that the user has to wait for a while before seeing the tab content, which breaks the flow.
Closes#3351
Signed-off-by: Pavel Zolotarevskiy <code@fxgn.dev>
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.
This commit introduces a "Reset" button to pinned tabs, allowing
users to quickly revert a tab to its stored base URL. The button
is visible on hover for non-essential pinned tabs and hidden
for essentials. Clicking the button triggers a
reset action managed by `gZenPinnedTabManager`.
The visual style of the button is defined using the "reload"
icon and follows the styling of other tab buttons.
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.
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.