fix(ObjectPage): re-expand header on tab switch in IconTabBar mode - #8817
fix(ObjectPage): re-expand header on tab switch in IconTabBar mode#8817DougDK wants to merge 1 commit into
Conversation
In IconTabBar mode, switching tabs while the header was collapsed by
scrolling left the header permanently stuck — scrollTop was reset to 0
but headerCollapsed remained true with no scroll room to trigger
re-expansion.
Reset headerCollapsedInternal to false on tab switch so the header
expands naturally alongside scrollTo({ top: 0 }). The existing
scrollTimeout guard in useObserveHeights already prevents the
programmatic scroll from immediately re-collapsing it.
Also removes the redundant scrollTimeout clause from the spacer height
condition, which was suppressing scroll room during the tab switch
window.
|
Thanks @DougDK, nice work on this. Your root-cause analysis was solid, and you flagged the Quick process note: per our contribution guidelines, we ask that contributors comment on the issue and get assigned before opening a PR, so we can give guidance up front. That's especially handy on We can't merge it as-is, though. The collapse/expand logic has to stay consistent across a lot of paths: pinned/unpinned, Default vs. IconTabBar mode, programmatic The specific snag: "section flush at top" and the scroll-up expand threshold are the same scroll coordinate, so resetting to the top while collapsed always re-expands. We're keeping the header state preserved and landing just past that threshold instead, so scroll-up can still re-expand, with regression tests across both paths. I've opened #8837 with that approach and added you as co-author, since your repro and the spacer-clause catch fed right into the fix. Going to close this one in favor of that PR. Thanks again for digging in! 🙂 |
|
Superseded by #8837 |
Thank you for your contribution! 👏
To get it merged faster, kindly review the checklist below:
Pull Request Checklist
Problem
In
IconTabBarmode, if the user scrolled down far enough to collapse the header and then switched tabs, the header could not be re-expanded. AfterscrollTo({ top: 0 }),scrollTopwas0andheaderCollapsedwas stilltrue, leaving the user with no way to scroll further up to trigger re-expansion.Solution
Reset
headerCollapsedInternaltofalseon tab switch so the header expands alongsidescrollTo({ top: 0 }). The existingscrollTimeoutguard inuseObserveHeightsalready prevents the programmatic scroll from immediately re-collapsing it.Also removes the redundant
scrollTimeoutclause from the spacer height condition introduced in #8582, which was suppressing scroll room during the tab switch window and had the same root problem.Fixes #8803