Skip to content

one-click-review-submission - Restore on new "Files changed" page - #8777

Closed
SunsetTechuila wants to merge 16 commits into
refined-github:mainfrom
SunsetTechuila:oneclickreview
Closed

SunsetTechuila wants to merge 16 commits into
refined-github:mainfrom
SunsetTechuila:oneclickreview

Conversation

@SunsetTechuila

Copy link
Copy Markdown
Contributor

@busches

This comment was marked as resolved.

@SunsetTechuila
SunsetTechuila marked this pull request as ready for review November 18, 2025 01:41
@SunsetTechuila SunsetTechuila changed the title one-click-review-submission - Restore feature one-click-review-submission - Restore feature on new Files changed Nov 18, 2025
@SunsetTechuila SunsetTechuila changed the title one-click-review-submission - Restore feature on new Files changed one-click-review-submission - Restore feature on new Files Changed Nov 18, 2025
@SunsetTechuila

This comment was marked as resolved.

@fregante fregante added the bug label Nov 18, 2025
@SunsetTechuila SunsetTechuila changed the title one-click-review-submission - Restore feature on new Files Changed one-click-review-submission - Restore on new "Files changed" page Nov 19, 2025

@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.

Oof, there's a lot going on and a lot that can go wrong on this crucial GitHub feature. I'm not 100% confident that we can/should mess with this

dialog.style.overflow = 'visible';

// actionRow re-renders each time the submit button state changes
new MutationObserver(syncButtonsDisabledState).observe(actionRow, {childList: true});

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.

This will pile up, a new observer on every click (replaceCheckboxesReact) and is never cleaned up when the feature unloads.

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.

Can we manually intercept the dialog’s show and hide behavior? Maybe we can intercept its close event and then control its visibility using css.

@SunsetTechuila SunsetTechuila Nov 24, 2025 •

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.

This will pile up

I thought about that, but browsers (at least Chromium-based ones) seem smart now - I've inspected the heap snapshot with devtools and didn't find extra observers

@SunsetTechuila SunsetTechuila Nov 24, 2025 •

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.

Can we manually intercept the dialog’s show and hide behavior?

I don't think this is possible

Maybe we can intercept its close event

There are no events, it is all React state and conditional returns

@fregante

Copy link
Copy Markdown
Member

to save maybe one click

When put under this perspective, I think the feature does not deserve to exist, especially with the risk and complexity involved. If it breaks it's an emergency.

@fregante
fregante requested a review from kovsu November 24, 2025 06:44
const dialog = $('div[role="dialog"]');
// Desktop layout first, then mobile layout
const reviewBody = $(
['[class^="ReviewMenuButton-module__AnchoredReviewBody"]', '[class^="prc-Dialog-Body"]'],

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.

Class order might change without changing functionality, so maybe better use *= instead of ^=? (also in other selectors)

@SunsetTechuila

SunsetTechuila commented Nov 24, 2025 •

Copy link
Copy Markdown
Contributor Author

I think the feature does not deserve to exist, especially with the risk and complexity involved. If it breaks it's an emergency.

I expected that kind of feedback, and I actually agree with it myself. Especially considering that the new experience is still in preview and keeps changing. I will miss this feature, though

a lot that can go wrong on this crucial GitHub feature.

However, I wouldn't say this feature has high potential to break the UI. It will just be difficult to maintain

Patching the component may be somewhat more reliable, but this is unlikely to ever happen

@SunsetTechuila

SunsetTechuila commented Jan 24, 2026 •

Copy link
Copy Markdown
Contributor Author

Just saying: it still works two months later

@fregante

Copy link
Copy Markdown
Member

You can restore the branch and reopen this PR

@SunsetTechuila
SunsetTechuila restored the oneclickreview branch January 24, 2026 07:34
@SunsetTechuila

Copy link
Copy Markdown
Contributor Author

I'll keep it as a draft until I thoroughly re-test it

@SunsetTechuila
SunsetTechuila marked this pull request as draft January 24, 2026 07:36
@fregante fregante closed this Feb 18, 2026
@SunsetTechuila

Copy link
Copy Markdown
Contributor Author

Did you change your mind?

@fregante

Copy link
Copy Markdown
Member

Yes my previous point still stands: too much can go wrong in this fundamental part of the website. It works now but eventually it will break.

@SunsetTechuila

Copy link
Copy Markdown
Contributor Author

I wonder what's changed since you said I could reopen this PR

@SunsetTechuila
SunsetTechuila deleted the oneclickreview branch February 18, 2026 18:17
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.

one-click-review-submission doesn't work

6 participants