Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remember one-click-diff-options state #6261

Merged
merged 4 commits into from
Feb 1, 2023

Conversation

fregante
Copy link
Member

@fregante fregante commented Jan 30, 2023

Test URLs

Demo

Lengthy video… it just demoes that the value is preserved after a refresh

Screen.Recording.2.mov

// Submit form so that the preference is persisted #5288
formField.checked = true;
formField.form!.submit();
event.preventDefault();
Copy link
Member Author

Choose a reason for hiding this comment

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

My previous solution: 😱 catch the links and submit the existing form
My new solution: 😌 just create the form

{makeLink('split', <BookIcon/>, !isUnified)}
</>
);
}
Copy link
Member Author

Choose a reason for hiding this comment

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

So much dead code here, we haven't used half of this code for who knows how long

attachElement(anchor, usesFloats ? {
after: () => (
if (usesFloats) {
anchor.after(
Copy link
Member Author

Choose a reason for hiding this comment

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

attachElement wasn't needed here after all. Cleaner code

@fregante fregante added the bug label Jan 30, 2023
@fregante fregante merged commit 0723a88 into main Feb 1, 2023
@fregante fregante deleted the one-click-diff-options-permanent branch February 1, 2023 05:24
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.

Remember hide whitespace as in the native Github
1 participant