`linkify-line-numbers` - Fix occasional layout break by SunsetTechuila · Pull Request #9532 · refined-github/refined-github · GitHub
Skip to content

linkify-line-numbers - Fix occasional layout break#9532

Merged
fregante merged 13 commits into
mainfrom
linkify-numbers-fix
May 20, 2026
Merged

linkify-line-numbers - Fix occasional layout break#9532
fregante merged 13 commits into
mainfrom
linkify-numbers-fix

Conversation

@SunsetTechuila

Copy link
Copy Markdown
Contributor

Fixes #9511

Closes #9531

Test URLs

#9510 (review)

Screenshot

@github-actions github-actions Bot added the bug label May 19, 2026

@fregante fregante left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Seeing the direction of this PR, I'm inclined to just go with #9531 instead, I just want a quick fix to merge for tomorrow morning's release

Comment thread source/features/github-bugs.css Outdated
Comment thread source/features/linkify-line-numbers.tsx Outdated
Comment thread source/features/linkify-line-numbers.tsx Outdated

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Element with the empty-cell class can also have the blob-num class, which sets the cursor to pointer. Having cursor: pointer on a non-interactive element doesn't make sense.

@SunsetTechuila SunsetTechuila marked this pull request as ready for review May 19, 2026 17:59
@SunsetTechuila

SunsetTechuila commented May 19, 2026

Copy link
Copy Markdown
Contributor Author

@fregante fregante left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I'm ok with the delegate + onAlteredClick combo for now. If we need more of such features, we should reorganize onAlteredClick to also handle non-altered clicks (in a separate helper).

The helper should probably be called linkify(element, callback), where the callback returns the URL to open in the current tab or in another tab, depending on alteredness

Anyway, future PR, this one is good to go.

Comment thread source/features/linkify-line-numbers.css Outdated
Comment thread source/features/linkify-line-numbers.css Outdated
Co-authored-by: fregante <me@fregante.com>
@fregante fregante merged commit 9cdf259 into main May 20, 2026
10 checks passed
@fregante fregante deleted the linkify-numbers-fix branch May 20, 2026 03:58
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.

linkify-line-numbers moving the number to the top

2 participants