Skip to content

repo-header-info - Fix site header overlap#9489

Merged
fregante merged 4 commits into
mainfrom
fix-overlap
May 17, 2026
Merged

repo-header-info - Fix site header overlap#9489
fregante merged 4 commits into
mainfrom
fix-overlap

Conversation

@fregante

@fregante fregante commented May 16, 2026

Copy link
Copy Markdown
Member

Test URLs

Here

Before

Screenshot 24

After

Screenshot 25

@github-actions github-actions Bot added the bug label May 16, 2026
@fregante fregante marked this pull request as ready for review May 16, 2026 09:34
@SunsetTechuila

Copy link
Copy Markdown
Contributor

I don't understand how this fixes the overlap. And it doesn't seem like it does?

image

@fregante

fregante commented May 16, 2026

Copy link
Copy Markdown
Member Author

I don't understand how this fixes the overlap.

GitHub calculates the width of the repo name at load time. This makes it look like the repo name is longer than it really is.

Then when our feature is appended, we already have the reserved space for it.

And it doesn't seem like it does?

I posted a gif in the issue and screenshots here, so it most definitely does, unless I broke something at the last push.

As mentioned repo-avatars still does cause minimal overlap but nowhere near what it was, limited to like 30px (the added width of repo-avatars)

@fregante fregante left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, forgot to post

Comment thread source/features/repo-header-info.css Outdated
> a[class*='prc-Breadcrumbs-Item']:not(.rgh-repo-header-info-updated) {
/* Matches the `isSmallDevice` JS check */
@media (min-width: 500px) {
padding-right: 4em;

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The feature stays disabled on small devices because there just isn't any space for it.

@@ -1,3 +1,5 @@
import './repo-header-info.css';

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The PR only covers this feature. A minor overlap is still seen with the site logo due to repo-avatars

Image

@fregante

Copy link
Copy Markdown
Member Author

Yes, it most definitely still works, especially after disabling ci-link and repo-avatars

main

main.mov

This PR

Video goes in both directions:

  1. load large
  2. resize to small
  3. load small
  4. resize to large
after.mov

@fregante

Copy link
Copy Markdown
Member Author

The race condition of ci-link definitely still causes minor overlaps, but being 20px wide it's minor for now. You can see the ... being pushed too close to the logo here after a refresh:

bug

> a[class*='prc-Breadcrumbs-Item']:not(.rgh-repo-header-info-updated) {
/* Matches the `isSmallDevice` JS check */
@media (min-width: 500px) {
padding-right: 4em;

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixing the combined overlap of ci-link and repo-header-info will require some coordination between the two features, for example a shared selector that adds padding-right: calc(var(--rgh-repo-header-info-width) + var(--rgh-ci-link-width)) and just toggling these values as each feature loads. Very messy though

@fregante

Copy link
Copy Markdown
Member Author

Code-wise it's pretty straightforward. The selector comes straight from the feature (unfortunately so long). Merging, but it won't close the issue yet

@fregante fregante merged commit 9d3066c into main May 17, 2026
14 checks passed
@fregante fregante deleted the fix-overlap branch May 17, 2026 18:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Development

Successfully merging this pull request may close these issues.

2 participants