Skip to content

Conversation

@SunsetTechuila
Copy link
Member

fixes #8711

this is painful

Test URLs

https://github.com/refined-github/refined-github/pull/8766/files

Screenshot

image

@busches
Copy link
Member

busches commented Nov 17, 2025

This is still working on GHE, let me know when this is ready to test and I'll confirm it's still good there.

@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
Copy link
Member Author

This is still working on GHE, let me know when this is ready to test and I'll confirm it's still good there.

It works on https://github.com as well if you disable the new files changed experience, which is in preview

@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
Copy link
Member

@fregante fregante left a comment

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

Copy link
Member Author

@SunsetTechuila SunsetTechuila Nov 24, 2025

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

Copy link
Member Author

@SunsetTechuila SunsetTechuila Nov 24, 2025

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
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
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
Copy link
Member Author

SunsetTechuila commented Nov 24, 2025

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
Copy link
Member Author

SunsetTechuila commented Jan 24, 2026

Just saying: it still works two months later

@fregante
Copy link
Member

You can restore the branch and reopen this PR

@SunsetTechuila SunsetTechuila restored the oneclickreview branch January 24, 2026 07:34
@SunsetTechuila
Copy link
Member 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
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