-
Notifications
You must be signed in to change notification settings - Fork 969
18 Unbelievable ways to get rid of dead tabs on tab close #11311
Conversation
6fe07c9
to
d2ff410
Compare
488f414
to
dc7aedc
Compare
@@ -184,6 +211,7 @@ const tabsReducer = (state, action, immutableAction) => { | |||
tabs.setActive(nextActiveTabId) | |||
} | |||
}) | |||
tabs.forgetTab(tabId) |
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.
const tabsPerPage = Number(getSetting(settings.TABS_PER_PAGE)) | ||
const startTabIndex = tabPageIndex * tabsPerPage | ||
const pinnedTabsCount = tabState.getPinnedTabsByWindowId(state, windowId).size | ||
tabState.getTabsByWindowId(state, windowId) |
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.
There's a whole bunch happening here- would it make sense to follow up and move this logic into tabState? Like a tabState.getTabsForClose (or similar)
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.
I think it makes sense but I'm going to pass on it for now since I have other 0.19.x high priority things to focus on, but that's valid minor refactor for sure.
const index = tabValue.get('index') | ||
const windowId = tabValue.get('windowId') | ||
const pinnedTabsCount = tabState.getPinnedTabsByWindowId(state, windowId).size | ||
tabState.getTabsByWindowId(state, windowId) |
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.
same as above- the method chaining should work fine... it's just a lot to read
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.
😄 👌 I like this
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.
manual test plan pass, personal crazy stress test pass, automated test pass, LGTM
18 Unbelievable ways to get rid of dead tabs on tab close
18 Unbelievable ways to get rid of dead tabs on tab close
18 Unbelievable ways to get rid of dead tabs on tab close
Submitter Checklist:
git rebase -i
to squash commits (if needed).Test Plan:
Reviewer Checklist:
Tests