Repository navigation
fix: update useIsStuck to useEffect for prerendering, improve sticky tabs - #5119
Merged
Merged
Conversation
Collaborator
kmcfaul
approved these changes
Oct 22, 2026
wise-king-sullyman
approved these changes
Oct 22, 2026
wise-king-sullyman
approved these changes
Oct 22, 2026
Collaborator
|
Your changes have been released in:
Thanks for your contribution! 🎉 |
wise-king-sullyman
added a commit
that referenced
this pull request
Nov 10, 2026
* feat(ver): update to 6.7 prereleases (#5113) * feat(ver): bump to 6.7 prerelease * update screenshots * chore(release): releasing packages [ci skip] - @patternfly/ast-helpers@1.4.0-alpha.421 - @patternfly/documentation-framework@6.53.0 * Chatbot bump (#5114) * fix(deps): Update ChatBot * Add screenshots * Fix lock file * Fix latest vs hidden * chore(release): releasing packages [ci skip] - @patternfly/ast-helpers@1.4.0-alpha.422 - @patternfly/documentation-framework@6.53.1 * fix(docs): Update featured blog posts (#5115) * chore(release): releasing packages [ci skip] - @patternfly/ast-helpers@1.4.0-alpha.423 - @patternfly/documentation-framework@6.53.2 * fix(deps): Update ChatBot version (#5116) Fixed a couple of regressions. * chore(release): releasing packages [ci skip] - @patternfly/ast-helpers@1.4.0-alpha.424 - @patternfly/documentation-framework@6.53.3 * docs (release-highlights): Adds 6.7 highlights (#5111) * docs(release-highlights): add 6.7 highlights Assisted-by: OpenAI Codex * Apply suggestion from @phcox * Apply suggestion from @rebeccaalpert Co-authored-by: Rebecca Alpert <ralpert@redhat.com> * Apply suggestion from @rebeccaalpert Co-authored-by: Rebecca Alpert <ralpert@redhat.com> * Apply suggestion from @phcox * Apply suggestion from @phcox * Apply suggestion from @phcox * Revise release highlights for component updates Added codeblock formatting to some content in the Chatbot section * docs (release-highlights): Remove 6.7 prerelease suffixes Assisted-by: OpenAI Codex * docs (release-highlights): Date 6.7 release October 2026 Assisted-by: OpenAI Codex --------- Co-authored-by: Patrick Cox <26148021+phcox@users.noreply.github.com> Co-authored-by: Rebecca Alpert <ralpert@redhat.com> * chore(release): releasing packages [ci skip] - @patternfly/ast-helpers@1.4.0-alpha.425 - @patternfly/documentation-framework@6.53.4 * chore(release): added modal test verbiage (#5117) * chore(release): releasing packages [ci skip] - @patternfly/ast-helpers@1.4.0-alpha.426 - @patternfly/documentation-framework@6.53.5 * feat(ver): update to 6.7 release (#5120) * feat(ver): update to 6.7 release * updated screenshots * chore(release): releasing packages [ci skip] - @patternfly/ast-helpers@1.4.0-alpha.427 - @patternfly/documentation-framework@6.54.0 * fix(docs): Update featured posts (#5121) * chore(release): releasing packages [ci skip] - @patternfly/ast-helpers@1.4.0-alpha.428 - @patternfly/documentation-framework@6.54.1 * deps(react-core): update react-core version to fix broken page demos (#5122) * deps(react-core): update react-core version to fix broken page demos * Update yarn lock * docs(Page): Update broken demo screenshots * chore(release): releasing packages [ci skip] - @patternfly/ast-helpers@1.4.0-alpha.429 - @patternfly/documentation-framework@6.54.2 * fix: update useIsStuck to useEffect for prerendering, improve sticky tabs (#5119) * fix: update useIsStuck to useEffect for prerendering * chore: fix sticky tabs scroll bugs * chore(release): releasing packages [ci skip] - @patternfly/ast-helpers@1.4.0-alpha.430 - @patternfly/documentation-framework@6.54.3 * chore(deps): Update patternfly-doc-core with API fixes (#5123) * chore(deps): Update patternfly-doc-core with API fixes * Update doc-core to 1.24.2 * chore(release): releasing packages [ci skip] - @patternfly/ast-helpers@1.4.0-alpha.431 - @patternfly/documentation-framework@6.54.4 * chore(deps): update doc-core to 1.24.3 (#5124) * chore(release): releasing packages [ci skip] - @patternfly/ast-helpers@1.4.0-alpha.432 - @patternfly/documentation-framework@6.54.5 --------- Co-authored-by: kmcfaul <45077788+kmcfaul@users.noreply.github.com> Co-authored-by: patternfly-build <patternfly-build@redhat.com> Co-authored-by: Rebecca Alpert <ralpert@redhat.com> Co-authored-by: Patrick Cox <pcox@redhat.com> Co-authored-by: Patrick Cox <26148021+phcox@users.noreply.github.com> Co-authored-by: Eric Olkowski <70952936+thatblindgeye@users.noreply.github.com> Co-authored-by: Michael Coker <35148959+mcoker@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
fixes #5118
Updates
useIsStuck.jsto useuseLayoutEffectwhen there is a browser window anduseEffectwhen there isn't (for the prerendering step of the build), which suppresses all of the warnings the build was throwing.Also took a stab at improving the dynamic sticky tabs behavior. The existing behavior is often flaky. It doesn't always make the tabs sticky when scrolling fast, landing on/going to page anchors, and other random times.
From the robots, this PR updates
useIsStuck.jsto:scrollElement.scrollTopwithstickyElement.offsetTop.scrollTopis relative to the scrolling container, whileoffsetTopis relative to the element’s offset parent; those aren’t necessarily the same coordinate system. The hook now compares the tabs’ rendered top with the scrollport’s rendered top, so it checks whether the tabs are actually stuck at the container’s edge.resizeevent listener to handle sticky behavior when the window resizes, which is most relevant on pages with a lot of content (that wraps differently on resize) above the tabs.