Skip to content

Hide unnecessary tip on comment field - #2375

Merged
fregante merged 5 commits into
refined-github:masterfrom
kidonng:clean-rich-text-editor
Aug 30, 2019
Merged

fregante merged 5 commits into
refined-github:masterfrom
kidonng:clean-rich-text-editor

Conversation

@kidonng

@kidonng kidonng commented Aug 23, 2019 •

Copy link
Copy Markdown
Member

Closes #2349
Closes #566
Closes #2311

Test

This PR

@kidonng kidonng changed the title feat: hide unnecessary tip on comment field Hide unnecessary tip on comment field Aug 23, 2019
@fregante

Copy link
Copy Markdown
Member

If you reuse that name, it will make it appear as a disableable feature but disabling it won’t make the buttons reappear.

@kidonng

kidonng commented Aug 24, 2019 •

Copy link
Copy Markdown
Member Author

Then would you like this single line go to a feature? If so, should we do this to more input fields (e.g. issue title)?

Do you have any suggestion for the name?

@kidonng

kidonng commented Aug 24, 2019

Copy link
Copy Markdown
Member Author

Maybe this should go to hide-obvious-tooltips feature instead.

@fregante

fregante commented Aug 25, 2019 •

Copy link
Copy Markdown
Member

Good call about the name, but my suggestion still stands: if you reuse a CSS feature and make it JS, you have to make sure that disabling the JS feature will also avoid applying the CSS.

Look at the social count hider feature (forgot the name) to see how that works.

@jerone

This comment has been minimized.

@jerone

jerone commented Aug 26, 2019

Copy link
Copy Markdown
Contributor

This will also fix #2311 (comment)

@fregante fregante left a comment

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.

Untested but looks good

@fregante

This comment has been minimized.

@fregante
fregante merged commit 0ca864a into refined-github:master Aug 30, 2019
@jerone

jerone commented Sep 3, 2019 •

Copy link
Copy Markdown
Contributor

I can't seem to find this feature clean-rich-text-editor in the options list...

image

Running latest source code in Firefox.

@busches

busches commented Sep 4, 2019 •

Copy link
Copy Markdown
Member

@jerone the feature addition logic is duplicated for some reason: https://github.com/sindresorhus/refined-github/blob/986c49ac811a06837571878f3a861e12de67295d/source/features/clean-rich-text-editor.ts#L15-L34 I'd wager removing the second set would fix the issue.

[e] Closer review, this looks intentional, but we probably need to either split it into two feature files, use unique names, instead of the auto generated one, or update the feature logic to support two features with the same ID.

@jerone

jerone commented Sep 4, 2019

Copy link
Copy Markdown
Contributor

@busches Double features logic is intentional and should not break the add-on. Other features have it too, and those are visible in the Options. Like recently-pushed-branches-enhancements, fit-textareas, etc.

Can you confirm you don't have this feature clean-rich-text-editor option either?

@busches

busches commented Sep 4, 2019

Copy link
Copy Markdown
Member

I totally don't.

@jerone

jerone commented Sep 4, 2019

Copy link
Copy Markdown
Contributor

I think that the values of description and screenshot the second feature logic are wrong and need to be false:

features.add({
	id: __featureName__,
	description: false,
	screenshot: false,
	...
});

@jerone

jerone commented Sep 4, 2019

Copy link
Copy Markdown
Contributor

I totally don't.

Meaning that you can see or cannot see this feature in the Options? (sorry for asking for confirmation).

@busches

busches commented Sep 4, 2019 via email

Copy link
Copy Markdown
Member

@fregante

fregante commented Sep 5, 2019

Copy link
Copy Markdown
Member

The file should work, but it doesn’t because it doesn’t have a tsx extension. All features have a tsx extension’s regardless of whether they use JSX or not, just to avoid future renames, etc.

The fix is to rename the file to *.tsx

@jerone

jerone commented Sep 5, 2019

Copy link
Copy Markdown
Contributor

Oh wow, I totally missed that.

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

4 participants