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

fix(tabs): handle tab close events that remove the associated tab-title and tab elements from the DOM #9768

Merged
merged 36 commits into from
Jul 23, 2024
Merged
Changes from 1 commit
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
1b883db
fix(tabs): fix closing behavior when tabs are removed from the DOM
eriklharper Jun 12, 2024
33a7897
Merge branch 'dev' of github.com:Esri/calcite-design-system into erik…
eriklharper Jul 1, 2024
f5bb30c
moving lifecycle members to the bottom of the tabs file
eriklharper Jul 1, 2024
7ae928b
refactoring tab-nav's slotchange handler to use slotChangeGetAssigned…
eriklharper Jul 1, 2024
04dcc8d
Refactoring registryHandler to query for the default slot element's a…
eriklharper Jul 5, 2024
2baeda4
adding tab identifier logs for debugging
eriklharper Jul 12, 2024
8b61305
relocating selectedTitle and selectedTabId watchers to be adjacent to…
eriklharper Jul 15, 2024
575dfb6
removing unused internalTabRegister event
eriklharper Jul 15, 2024
a8a08e8
removing logs
eriklharper Jul 15, 2024
69e59fd
emitting internalTabChange event from selectedTitle watcher for now t…
eriklharper Jul 15, 2024
361eb54
remove redundant setting of selectedTitle from inside the selectedTab…
eriklharper Jul 15, 2024
73db0ff
removing comment
eriklharper Jul 15, 2024
e812bbd
reverting tab-title change no longer needed
eriklharper Jul 15, 2024
a4df2e7
fixing highlight selected title on initial load
eriklharper Jul 15, 2024
59a7d64
Merge branch 'dev' of github.com:Esri/calcite-design-system into erik…
eriklharper Jul 15, 2024
45ce9dd
Merge branch 'dev' of github.com:Esri/calcite-design-system into erik…
eriklharper Jul 16, 2024
4d92c18
removing select-none
eriklharper Jul 16, 2024
9b1a53c
Merge branch 'eriklharper/7155-closable-tab-bug' of github.com:Esri/c…
eriklharper Jul 16, 2024
58384cd
adding dom removal test
eriklharper Jul 16, 2024
e00a764
adding closable tabs to demo page
eriklharper Jul 16, 2024
a001a0a
Merge branch 'eriklharper/7155-closable-tab-bug' of github.com:Esri/c…
eriklharper Jul 16, 2024
3e7f77b
Merge branch 'dev' of github.com:Esri/calcite-design-system into erik…
eriklharper Jul 16, 2024
1a023c5
Merge branch 'dev' of github.com:Esri/calcite-design-system into erik…
eriklharper Jul 16, 2024
cfb1626
component types
eriklharper Jul 16, 2024
81268fd
refactored new dom utils to use a css matches selector instead of jus…
eriklharper Jul 17, 2024
91f7cbb
stop propagating new slot change event
eriklharper Jul 17, 2024
a8dbcdb
renaming registryHandler to updateAriaSettings
eriklharper Jul 17, 2024
c27ccf1
removing need to data-name attributes in e2e test
eriklharper Jul 17, 2024
ce4c4ee
replacing mutation observer logic with slot change handler
eriklharper Jul 18, 2024
568bd7b
Merge branch 'dev' into eriklharper/7155-closable-tab-bug
eriklharper Jul 18, 2024
3243cf9
updating to use generic types where possible
eriklharper Jul 19, 2024
d8b524b
renaming function
eriklharper Jul 19, 2024
2110d0a
Merge branch 'dev' of github.com:Esri/calcite-design-system into erik…
eriklharper Jul 19, 2024
3db06f4
adding spec unit tests for getSlotAssignedElements
eriklharper Jul 23, 2024
376dd40
Merge branch 'dev' into eriklharper/7155-closable-tab-bug
eriklharper Jul 23, 2024
5afaf2e
adding one more test for empty results
eriklharper Jul 23, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
removing comment
eriklharper committed Jul 15, 2024
commit 73db0ff2f5076cb4f335cce14dde261850df69a0
Original file line number Diff line number Diff line change
@@ -650,8 +650,6 @@ export class TabNav implements LocalizedComponent, T9nComponent {
};

async getTabTitleById(id: TabID): Promise<HTMLCalciteTabTitleElement | null> {
// this.tabTitles is not always a correct reflection of the titles in the DOM at this point, because they can be removed in the calciteTabsClose handler
// after this function has already fired, and because it is async, it will try to get the tab info from a removed dom node that happens before this promise is resolved.
return Promise.all(this.tabTitles.map((el) => el.getTabIdentifier())).then((ids) => {
return this.tabTitles[ids.indexOf(id)];
});