Repository navigation
Conversation
|
Thanks for the PR. Actually this is best done in the init function after mounting the widget: The reason is that :has() selectors are very heavy so we avoid where possible. The CSS should stay unchanged, it's already slate for removal in 2027 |
c670ae8 to
5fed705
Compare
|
Reworked as suggested: the CSS is back to its original state and the superseded default actions are now hidden imperatively in Verification: |
|
Please don't force-push to this PR, it makes it harder to see what changed since the last review. We merge commits rather than squash, so we care more about reviewability than a clean history. Feel free to push dirty commits. |
…ter mounting the widget Move the fix from CSS to the widget mount site as suggested in the review: `:has()` selectors are heavy, so the default "go to" actions are now hidden imperatively. The CSS stays unchanged. Fixes the selector regression after the 2026 blank slate redesign, where the buttons lost their aria-label.
5fed705 to
ba8fc0a
Compare
useful-not-found-page - Fix the selector after the 2026 blank slate redesignuseful-not-found-page - Hide redundant buttons again


Description
GitHub's redesigned 404 blank slate dropped the
go to Overview/go to default brancharia-labels, so both legacy selectors inuseful-not-found-page.cssstopped matching and the buttons are visible again (#10133).The new selector anchors on the stable
error-404-descriptiontest id (the 410 variant'seror-typo is kept, as observed in the feature's own selector list) and hides the blank slate's primary action, reusing the.Blankslate-Action > a:only-childpattern already present for the 301-file rule.Verified against the live DOM of both variants (logged-out fetch + rendered page): the old selectors match 0 elements, the new one matches exactly the one button on each page, and
display: noneapplies after injection.Test URLs
Screenshot
Missing branch, before / after:
Missing file, before / after:
(Screenshots taken by injecting the exact CSS rule of this PR into the live pages listed above.)
Closes #10133