Skip to content

Help users find a feature with an interactive binary search#4119

Merged
fregante merged 48 commits into
refined-github:mainfrom
cheap-glitch:add-bisect
Apr 8, 2021
Merged

Help users find a feature with an interactive binary search#4119
fregante merged 48 commits into
refined-github:mainfrom
cheap-glitch:add-bisect

Conversation

@cheap-glitch
Copy link
Copy Markdown
Contributor

@cheap-glitch cheap-glitch commented Mar 17, 2021

Closes #2586

Screenshot

gif

@cheap-glitch cheap-glitch marked this pull request as draft March 17, 2021 13:34
@yakov116
Copy link
Copy Markdown
Member

Your on 🔥

@cheap-glitch cheap-glitch changed the title Add tool to bisect features Meta: Add tool to bisect features Mar 17, 2021
Comment thread source/bisect.ts Outdated
// Test with all features disabled first
await onlyEnableFeatures(options, featuresState, []);
if (await confirmBug()) {
window.alert('It’s a native GitHub bug!');
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 isn't 100% true as not all features can be disabled.

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.

We could change the message to something like

The bug comes from a permanent CSS feature or GitHub itself.

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.

I'd prefer not focusing on the fact that we have permanent CSS. The message could be something like

Every feature has been disabled. If you still see the bug, try disabling the whole extension.

@yakov116 yakov116 added the meta Related to Refined GitHub itself label Mar 17, 2021
Copy link
Copy Markdown
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.

🤩

Comment thread source/bisect.ts Outdated
// Test with all features disabled first
await onlyEnableFeatures(options, featuresState, []);
if (await confirmBug()) {
window.alert('It’s a native GitHub bug!');
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.

I'd prefer not focusing on the fact that we have permanent CSS. The message could be something like

Every feature has been disabled. If you still see the bug, try disabling the whole extension.

Comment thread source/bisect.ts Outdated
Comment thread source/bisect.ts Outdated
@fregante fregante changed the title Meta: Add tool to bisect features Mechanism to find which feature is causing issues Mar 17, 2021
@fregante
Copy link
Copy Markdown
Member

I changed the title because while it's a meta feature, it's also user-facing and I want it to appear in the changelog

@cheap-glitch
Copy link
Copy Markdown
Contributor Author

I rewrote the PR as suggested. It's still a bit rough around the edges but it works.

PS: sorry for leaving so many PRs open for so long, I had some serious hardware troubles.

Comment thread source/features/index.tsx Outdated
Comment thread source/features/index.tsx Outdated
Comment thread source/features/index.tsx Outdated
Comment thread source/features/index.tsx Outdated
Comment thread source/features/index.tsx Outdated
Comment thread source/features/index.tsx Outdated
Comment thread source/features/index.tsx Outdated
Comment thread source/features/index.tsx Outdated
Comment thread source/features/index.tsx Outdated
Comment thread source/features/index.tsx Outdated
Comment thread source/features/index.tsx Outdated
Comment thread source/features/index.tsx Outdated
Comment thread distribution/options.html Outdated
Comment thread source/helpers/bisect.tsx Outdated
Comment thread source/helpers/bisect.tsx Outdated
Co-authored-by: Federico <me@fregante.com>
Comment thread source/helpers/bisect.tsx Outdated
Co-authored-by: Federico <me@fregante.com>
@fregante
Copy link
Copy Markdown
Member

fregante commented Apr 3, 2021

I think the conclusion is incorrect. On this page I tried identifying hide-watch-and-fork-count but it ended up telling me it was hide-useless-newsfeed-events, which is probably the other feature

Comment thread source/helpers/bisect.tsx Outdated
Comment thread source/helpers/bisect.tsx Outdated
Comment thread source/refined-github.css
Comment thread distribution/options.html
<strong>Find a feature</strong>
</p>
<p>
This process will help you identify what Refined GitHub feature is making changes or causing issues on GitHub.
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.

Should we already here tell the user to first disable Refined GitHub to make sure the issue is with Refined GitHub?

Copy link
Copy Markdown
Member

@fregante fregante Apr 5, 2021

Choose a reason for hiding this comment

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

I had proposed it this way at the beginning but I’m not particularly interested in that, the user can just toggle the extension if they feel this situation is likely.

If not, they can just follow the procedure as a regular bisect, and that’s just easier to reason about and code for us. The last step will be exactly this anyway: every JS feature is disabled.

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.

But isn't it worth trying this before wasting time on the bisect?

Copy link
Copy Markdown
Member

@fregante fregante Apr 6, 2021

Choose a reason for hiding this comment

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

But isn't it worth trying this before wasting time on the bisect?

Yes and no, fully disabling the extension is more effective than this anyway since we have non-disableable CSS features and code that runs outside init, e.g. #3336

I know I personally would probably disable it entirely in the first place if I'm unsure whether a bug is caused by RG, e.g. #3055 (comment)

Do you see yourself using this wizard for that step?

@cheap-glitch
Copy link
Copy Markdown
Contributor Author

cheap-glitch commented Apr 5, 2021

Tried it with native and non-native features, works great!

Small UX suggestion: how about disabling the "Yes"/"No" buttons until the page has finished loading? A few times I wrongly thought a feature didn't appear and clicked the "No" button by mistake, which means having to restart the whole process.

The only "bug" see is that it might jump from 3 steps to "last step"

If you're talking about the number of steps left displayed, yeah that might happen because it's a "worst case" prediction. We could reword the message slightly: "(at most x steps left)

Also I agree that it's better to have the "It might not be RGH" message at the end of the process, but in that case adding a little disclaimer about disabling the extension in the options page wouldn't hurt. (Even if it's already in the issue template.)

@fregante
Copy link
Copy Markdown
Member

fregante commented Apr 6, 2021

Small UX suggestion: how about disabling the "Yes"/"No" buttons until the page has finished loading? A few times I wrongly thought a feature didn't appear and clicked the "No" button by mistake, which means having to restart the whole process.

Some features load after the load event though, so it won't catch 100% of the scenarios, but it might still be an improvement.

"(at most x steps left)

heheh I think it's fine the way it is, without complicating things.

@fregante
Copy link
Copy Markdown
Member

fregante commented Apr 6, 2021

little disclaimer about disabling the extension in the options page wouldn't hurt

It's there

Screen Shot 2021-04-06 at 09 46 24

Copy link
Copy Markdown
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.

I haven't tested the latest revision, but after this it should be good to go

Comment thread distribution/options.html Outdated
Comment thread distribution/options.html
Comment thread source/helpers/bisect.tsx Outdated
Comment thread source/helpers/bisect.tsx Outdated
Comment thread source/options.tsx Outdated
cheap-glitch and others added 5 commits April 8, 2021 09:41
Co-authored-by: Federico <me@fregante.com>
Co-authored-by: Federico <me@fregante.com>
@fregante
Copy link
Copy Markdown
Member

fregante commented Apr 8, 2021

I'll add a minimum width to avoid this on the last step:

gif

The button moves slightly, and if you're just pressing "no" multiple times in a row without moving your mouse, suddenly the mouse will be on the "yes"

@fregante fregante merged commit 0ac8f8c into refined-github:main Apr 8, 2021
@fregante fregante changed the title Mechanism to find features Help users find a feature with an interactive binary search Apr 8, 2021
@fregante
Copy link
Copy Markdown
Member

fregante commented Apr 8, 2021

💯

@cheap-glitch cheap-glitch deleted the add-bisect branch April 8, 2021 08:46
@cheap-glitch
Copy link
Copy Markdown
Contributor Author

Now let's see if this is actually going to be useful 😄

@fregante
Copy link
Copy Markdown
Member

fregante commented Apr 8, 2021

I needed it several times when trying to find buggy features already, so I'm confident I will again 😃

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

meta Related to Refined GitHub itself

Development

Successfully merging this pull request may close these issues.

Mechanism to find which feature is causing issues

5 participants