Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Enhancement] support pref "browser.tabs.cardPreview.enabled" #3560

Open
bege10 opened this issue May 27, 2024 · 5 comments
Open

[Enhancement] support pref "browser.tabs.cardPreview.enabled" #3560

bege10 opened this issue May 27, 2024 · 5 comments
Labels
enhancement Firefox-issue bug of Firefox itself

Comments

@bege10
Copy link

bege10 commented May 27, 2024

Abstract

Firefox allows to change the view of tab tool tips to card view. Please, support this preference.

Steps to see the situation

  1. Change "browser.tabs.cardPreview.enabled" to "true"
  2. On horizontal tabs the tool tip changes to card view

Expected result

The tabs tool tips of TST also change the view

Actual (present) result

The tabs tool tips of TST don't change the view

Environment

  • Platform (OS): Windows 11
  • Version of Firefox: 126.0 (64 bit)
  • Version (or revision) of Tree Style Tab: 4.0.15
@piroor
Copy link
Owner

piroor commented May 28, 2024

Firefox does not allow WebExtensions addons to show arbitrary popup, so we only have three choices:

  • A: Show preview popup inside the sidebar.
    • Pros: Easy to implement, secure.
    • Cons: Preview popup over vertical tabs will annoying (because it blocks access to tabs covered by it.)
  • B: Embed preview popup inside the contents (the Web page you are currently see.)
    • Pros: Popup won't cover vertical tabs so useful.
    • Cons: Insecure. The active Web page can know you are using TST by tracking DOM events around elements embedded to the Web page by TST.
  • C: Show preview popup as a regular window (like windows opened by window.open())
    • Pros: Popup won't cover vertical tabs so useful. Easy to implement, secure.
    • Cons: Visually annoying. The preview popup will have its own window decorations including titlebar.

All possible plans have serious cons, so currently I'm negative to implement preview popup from these choices.

Waterfox Sidebar (it is an extended version of TST) supports preview popup with native appearance. Waterfox itself is currently based on Firefox 115, so you'll see preview popup for tabs sidebar after its base version is updated to 128.

@piroor piroor added Firefox-issue bug of Firefox itself and removed needs-triage labels May 28, 2024
@bege10
Copy link
Author

bege10 commented May 28, 2024

Do we talk about the same things?
I don't mean the thumbnails. That is an option in the settings page of Firefox independent from the normal or card view of the tooltip.
Because the tooltip without thumbnail looks the same with or without TST when the mentioned pref is set to false I thought it might be possible to have it look the same with and without TST with this pref set to true.
Screenshot_348

@piroor
Copy link
Owner

piroor commented May 30, 2024

Oh sorry I misunderstood that you meant both browser.tabs.cardPreview.enabled and browser.tabs.cardPreview.showThumbnails are true. I've realized that you meant browser.tabs.cardPreview.enabled=true and browser.tabs.cardPreview.showThumbnails=false case.

I've created mock images for A, B and C.

A:
image

B:
image

C:
image

@piroor
Copy link
Owner

piroor commented May 30, 2024

As those mocks described, such a rich popup has problems regardless it has a preview image or doesn't. This is the reason why I'm negative to simulate "browser.tabs.cardPreview.enabled" by TST.

@bege10
Copy link
Author

bege10 commented May 30, 2024

I wouldn't mind A without thumbnail but I understand your opinion.
Am I correct that the normal tool tip in TST is from Firefox and not simulated by TST? And that Firefox changes the tool tips to card view only for the normal Firefox tabs? So the only way to have card view tool tips in TST is by simulating them with extra code?

And thank you for this valuable add-on!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Firefox-issue bug of Firefox itself
Projects
None yet
Development

No branches or pull requests

2 participants