feat: store BaseHeader height in a CSS variable#675
Open
SupaSeeka wants to merge 1 commit intoUTDNebula:developfrom
Open
feat: store BaseHeader height in a CSS variable#675SupaSeeka wants to merge 1 commit intoUTDNebula:developfrom
SupaSeeka wants to merge 1 commit intoUTDNebula:developfrom
Conversation
|
@SupaSeeka is attempting to deploy a commit to the Nebula Labs Team on Vercel. A member of the Team first needs to authorize it. |
Isoscelestial
requested changes
Apr 6, 2026
Contributor
Isoscelestial
left a comment
There was a problem hiding this comment.
I wasn't expecting the issue to be done so fast lol, nice
I forgot to put this in the original issue, but I want to merge the most recent version of BaseHeader from UTD Trends into this file. Would you like to do this, or would you be comfortable with me adding a commit to this PR?
Also this PR is waiting on #651
|
|
||
| const observer = new ResizeObserver(([entry]) => { | ||
| const height = | ||
| entry.borderBoxSize[0]?.blockSize ?? entry.contentRect.height; |
Contributor
There was a problem hiding this comment.
TypeScript complains about entry possibly being undefined, add optional chaining to entry
Suggested change
| entry.borderBoxSize[0]?.blockSize ?? entry.contentRect.height; | |
| entry?.borderBoxSize[0]?.blockSize ?? entry?.contentRect.height; |
| const [openCompactSearchBar, setOpenCompactSearchBar] = useState(false); | ||
|
|
||
| const headerRef = useRef<HTMLDivElement>(null); | ||
|
|
Contributor
There was a problem hiding this comment.
Add comment here to explain what this does
Suggested change
| // Dynamically stores header height into a CSS variable called `--base-header-height`. | |
| // Useful for elements that need top offsets with `position: fixed` or `scroll-margin-top`. |
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.
Closes #671
Added the ResizeObserver in BaseHeader.tsx.