Skip to content

quick-comment-edit - Restore on issue pages - #9754

Merged
fregante merged 9 commits into
refined-github:mainfrom
SunsetTechuila:edit-issue-comment
Jun 25, 2026
Merged

fregante merged 9 commits into
refined-github:mainfrom
SunsetTechuila:edit-issue-comment

Conversation

@SunsetTechuila

Copy link
Copy Markdown
Contributor

Fixes #9123

Test URLs

#9123

Screenshot

@github-actions github-actions Bot added the bug label Jun 22, 2026
@SunsetTechuila

Copy link
Copy Markdown
Contributor Author

Ready for review. I'll keep it as a draft for a day in case I find any issues or think of any improvements

@Vangelis66

Copy link
Copy Markdown

in case I find any issues

Greetings; I installed the latest artifact with this PR merged,

https://github.com/refined-github/refined-github/actions/runs/27976624476?pr=9754

but I quickly stumbled upon a bug when using GitHub issue URLs with "comment" fragments, e.g.

e3kskoy7wqk/Firefox-for-windows-7#159 (comment)

Browser is Firefox-140esr (32-bit)

When I use the artifact from

https://github.com/refined-github/refined-github/actions/runs/27866249527?pr=9747

and follow these STR:

a) open a new blank tab
b) paste-and-go to

e3kskoy7wqk/Firefox-for-windows-7#159 (comment)

the browser indeed identifies and scroll-stops to the referenced comment (which is focused), the last one in that thread as I type this:

RFGHB1

However, once I install

https://github.com/refined-github/refined-github/actions/runs/27976624476?pr=9754

and repeat the same above STR, the tab's scroll bar moves down then up, with the tab in the end displaying the opening post of the thread (not the specified in the URL fragment, last one) :

RFGHB2

Also, the ... button in the first post's header is magically auto-selected, as seen in the image above (???) ...

I receive e-mail notifications for new comments on GitHub issues I follow and my usual workflow involves clicking the "view it on GitHub" link at the bottom, which is actually a URL with a comment number as its fragment:

RFGHB3

While I do like the quick-comment-edit feature to return for (react) issues, not being able to go to a specified comment (among a list of many) kind of spoils it for me; is there a solution for my predicament?

Thanks for your coding efforts 👍 , best regards.

@SunsetTechuila

Copy link
Copy Markdown
Contributor Author

Thank you, should be fixed now

@SunsetTechuila SunsetTechuila changed the title quick-comment-edit - Support issues quick-comment-edit - Restore on issue pages Jun 23, 2026
@Vangelis66

Copy link
Copy Markdown

should be fixed now

... Yes, can confirm with below artifact:

https://github.com/refined-github/refined-github/actions/runs/28007303450?pr=9754

And thanks for the prompt response and fix 👍 ...

@SunsetTechuila
SunsetTechuila marked this pull request as ready for review June 24, 2026 07:57
const menu = $(`[aria-labelledby="${menuButton.id}"]`);
// When executing concurrently, there might be multiple menus open, so we find the one that is associated with the given button
// If the button itself is labelled by another element, the menu will be labelled by that element too
const menu = $(`[aria-labelledby="${menuButton.getAttribute('aria-labelledby') ?? menuButton.id}"]`);

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 think you had a utility to get items labelled by others

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.

getElementByAriaLabelledBy won't be useful here - we need the id, not the text

@fregante
fregante merged commit 08637ba into refined-github:main Jun 25, 2026
13 checks passed
@SunsetTechuila
SunsetTechuila deleted the edit-issue-comment branch June 25, 2026 19:15
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.

quick-comment-edit is broken on issues

3 participants