sindresorhus/refined-github

Bug on pull request files tab #2202

sharkykh posted onGitHub

RGH Version: 19.6.30 (Chrome)

GitHub recently added a new feature for marking files as viewed when reviewing a pull request. The following bugs happen when Refined GitHub is enabled. Confirmed by disabling all browser extensions but RGH.

  1. When the length of the PR title + number is too long, it wraps the right-floated elements to a new line.
  2. When the filename of the file currently in view is too long, the scrolling "file actions" bar is malformed (for lack of a better term). Edit: It's possible that it only happens if the first filename is too long, as on the example PR below, the second filename is even longer, yet it looks just fine.

Edit 2: When I disable faster-pr-diff-options it fixes both bugs.

This is an example PR: https://github.com/pymedusa/Medusa/pull/6893/files


RGH disabled

chrome_XwwqDu9Y0Q


RGH enabled

chrome_ePXSiihJ2e


How do you differentiate "Whitespace" from "No whitespace"? ā£ is the default state (visible) and āœ•ā£ is hidden?

posted by bfred-it over 5 years ago

Use the selected class, just like "Unified diffs" buttons.

And maybe drop the btn-outline class...

posted by jerone over 5 years ago

Use the selected class, just like "Unified diffs" buttons.

And maybe drop the btn-outline class...

...as well as bg-gray-light and text-gray-light.

Here's how it'd look like:

<img width="1020" alt="Screenshot 2019-07-11 at 09 39 31" src="https://user-images.githubusercontent.com/478237/61035966-084fb300-a3c0-11e9-86ec-1b28381e637a.png">

<img width="1016" alt="Screenshot 2019-07-11 at 09 38 25" src="https://user-images.githubusercontent.com/478237/61035965-084fb300-a3c0-11e9-98c7-04260700c8aa.png">

posted by waldyrious over 5 years ago

Looks good, but perhaps it should be the opposite:

  • Whitespace visible: .btn.selected
  • Whitespace invisible: .btn
posted by bfred-it over 5 years ago

This feature is not really about showing or hidding whitespace. It's about ignoring whitespace in code compare. With that in mind, what about:

  • Don't ignore whitespace: .btn
  • Ignore whitespace: .btn.selected
posted by jerone over 5 years ago

it's about ignoring whitespace in code compare

Yeah, that's what I meant.

Ignore whitespace: .btn.selected

The current button has a "No" in front of it, so it makes sense: selected "no whitespace" = whitespace ignored.

If we shorten it to a simple "Whitespace", its selected state shouldn't mean "ignore" IMHO. In your suggestion, it will be read as: Whitespace: selected while the whitespace is actually ignored.

posted by bfred-it over 5 years ago

If we used literally <kbd>-w</kbd> instead of <kbd>ā£</kbd> at least it might make sense to CLI users.

-w regular state: off -w selected: on, ignore whitespace

Neither option makes sense without a label so I'd at least go for an option that has some meaning in this context.

posted by bfred-it over 5 years ago

Hey folks, this appears to have regressed, unfortunately. I opened a new issue to track: https://github.com/sindresorhus/refined-github/issues/2291.

posted by wearhere over 5 years ago

Fund this Issue

$0.00
Funded

Pull requests