-
Notifications
You must be signed in to change notification settings - Fork 4
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
feat: support split-view in Edge, tab-tiling in Vivaldi #608
Conversation
Extension builds preview
|
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as outdated.
This comment was marked as outdated.
59b2818
to
fadaa16
Compare
fadaa16
to
a9758b2
Compare
Demo with Edge split view: Screencast.from.18-09-24.06.24.06.PM.IST.webm |
Demo with Vivaldi tab-tiling! Screencast.from.18-09-24.06.53.57.PM.IST.webm |
edb6564
to
98e3868
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
While I wasn't able to actually run this right now to see the split view on Edge (nothing to do with you, but with my local current setup), the code looks good to me.
…frames)" This reverts commit f2ec374. Oops, clicking in iframe directly won't focus tab if we did this.
(looking at you, Vivaldi tab-tiling) nits
@sidvishnoi I have to ask, is this story ready to review? Since I reviewed it and gave approval, you pushed at least 5 new commits. I am asking so that we know when to actually review? |
@Tymmmy The commits I pushed are things I found with more testing, and apparently, there's enough edge cases that can cause problems with Edge (Vivaldi is fine). I'll ask for a re-review tomorrow after more testing. I would have written E2E tests for this, but there's no APIs to trigger the behavior I'm developing for here. (7c57663 was a realization that I was thinking I'd do as a follow-up PR, but decided to add to this only as two reviews are still pending) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, surprised we support Edge :)
Context
Closes #67
Why:
browser.tabs.query()
skips tabs in right-pane of split-view, as if it don't exist. So, we need to keep track of existing tabs in a window ourselves.Changes proposed in this pull request
TAB_FOCUSED
event from content script, on load (if focused) and on focus change (if focused).sender.tab.id
from above event to store last focused tabId for given window.WindowState
service.browser.action.setIcon()
with a tabId, it'll only update the icon for the left pane. So, added abrowserName
value, and skip usingtabId
for Edge when setting icon. This will set a global icon for Edge, but other browsers stay like before.onActivatedTab
which is buggy in Edge with split-view, rely onTAB_FOCUSED
events'sender.tab.id
to update icon state. Also use this last focused tab to show popup content.visibilitychange
, which works like before), we sendIS_TAB_IN_VIEW
message to content script (top frame only) to know if tab is currently visible. This way, we get all visible tabs in current window.IS_WM_ENABLED
message as unused.For reviewers: Radu is on vacation so I was asked to ask you good folks instead.
To be decided
Right now, the rate of pay is decided per tab, using the global rate of pay. Now we have multiple active visible tabs getting monetized, so the effective global rate of pay is multiplied by number of active visible tabs - user is paying more than they initially set to as they're paying multiple websites at once. In future, we'll have exception lists (#146), which will again make rate of pay per site/tab.