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

Disable swap-branches-on-compare on blank page #6522

Merged
merged 4 commits into from
Apr 15, 2023
Merged

Conversation

kidonng
Copy link
Member

@kidonng kidonng commented Apr 14, 2023

Fix #6513

Test URLs

https://github.com/refined-github/refined-github/compare

Screenshot

Screen.Recording.2023-04-15.at.21.31.36.mov

@kidonng kidonng added the bug label Apr 14, 2023
source/features/swap-branches-on-compare.tsx Outdated Show resolved Hide resolved
@fregante
Copy link
Member

By the way the position of the button is too far here 😬 it should always be next to the right-hand selector, like in your other screenshots

Screenshot

@kidonng
Copy link
Member Author

kidonng commented Apr 15, 2023

By the way the position of the button is too far here 😬 it should always be next to the right-hand selector, like in your other screenshots

Thought the same thing, well it's an oversight since I didn't tested it in the restore PR

EDIT: fixed! Also updated screencast

@kidonng kidonng requested a review from fregante April 15, 2023 13:33
@fregante
Copy link
Member

:shipit:

@kidonng kidonng merged commit dd2038e into main Apr 15, 2023
10 checks passed
@kidonng kidonng deleted the swap-branches-on-compare branch April 15, 2023 15:29
@fregante
Copy link
Member

fregante commented May 21, 2023

I think this broke some views. See:

I think the condition is not isBlank but "is identical". This can be checked in the URL, probably:

const [a,b] = path.split('...');
a === b

Note that these two URLs show the same comparison:

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.

swap-branches-on-compare should not appear when there's nothing to compare
2 participants