Repository navigation
Adding description field to features.add() - #1881
sunilkumarc wants to merge 6 commits into
Conversation
|
|
||
| features.add({ | ||
| id: 'copy-file', | ||
| description: 'Copy file', |
There was a problem hiding this comment.
| description: 'Copy file', | |
| description: 'Adds button to copy file contents to clipboard', |
|
|
||
| features.add({ | ||
| id: 'warn-pr-from-master', | ||
| description: 'Show warning when a user attempts to create a PR from their fork\'s default branch', |
There was a problem hiding this comment.
|
Provided some suggestions. But still confused on how the description should sound like, like Looking out for what @bfred-it thinks about these. |
|
Some files already have a description and sometimes links in a comment in the JS file header. These can be removed from there and used as-is in the description field. If they are multiline, they can stay as: Eventually we might have a mini-parser for links and backticks (like in #1872 ) |
Yup. And highly agree for multi-line descriptions!
Thinking if the description field can be used to render a checkbox-style list in the extensions options to enable/disable individual features. 🤷♂️ |
That's the idea, when I finish #1780 |
Hell, I missed that PR! 😅 |
|
The |
|
Many of the descriptions are too short or ambiguous. Can you put some more time into writing good descriptions? :) |
|
Although this code base is completely new to me, I've done my best to add meaningful description to most of the features. Still I would need your help in filling description for below features: @sindresorhus I think the |
Go to the feature's JS file, click the History button, find the first commit, it should show you the readme addition which describes the feature. For example, this is the commit for You will need the https://chrome.google.com/webstore/detail/follow-for-github/agalokjhnhheienloigiaoohgmjdpned?hl=en extension, so you can find the first commit, even if it was renamed. |
Yup, I forgot we can enforce this with types now. |
I just merged this feature in Refined GitHub. You'll just need the latest version from the extensions store. |
|
@notlmn @bfred-it @sindresorhus I've added the description texts by following above suggested approaches. Please review and let me know if something needs to be changed. |
|
|
||
| features.add({ | ||
| id: 'emojis-title', | ||
| description: 'Don’t add a title if the emoji\'s parents already have one', |
There was a problem hiding this comment.
Styled quote (’) and escaped quote (\')?
Choose to have only one of these (throughout the other files too).
There was a problem hiding this comment.
I read this description many times and I'm still not sure what the feature actually does.
There was a problem hiding this comment.
Sidetracking here, but it takes the alias attribute (provided by GH) of the emoji, and adds it as a title (if any of its closest parent doesn't provide one).
Presumably so that anyone without access to an emoji keyboard (picket) can use this info to insert emojis in comments.
Considering that GitHub already provides autocomplete for emojis in desktop view and that the title attribute is useless on mobile devices, I think this feature can be dropped. 🤷♂️
There was a problem hiding this comment.
I would prefer
\'.
@bfred-it wants ’, so we'll go with that. But should be consistent everywhere.
|
|
||
| features.add({ | ||
| id: 'filter-comments-by-you', | ||
| description: 'Search for issues and PRs with the `Everything commented by you filter`', |
There was a problem hiding this comment.
@bfred-it Would this look good after backticks are parsed?
It's not exactly code, per se. Or can bold be used in cases like these?
There was a problem hiding this comment.
It's how we've been marking them up in the readme: https://github.com/sindresorhus/refined-github/blob/0b6c7330c21f8570519143ad3d0decc328d4db47/readme.md#L185
@sindresorhus thoughts? Should they be in italics (in the readme too)?
Edit: wow, ironically the link you can only generate thanks to RGH (#1873) is correctly embedded by GitHub
There was a problem hiding this comment.
@sindresorhus any comments on this? I would like to close this PR as soon as possible.
There was a problem hiding this comment.
Yes, let's go with italic.
|
Can you fix the merge conflict? |
|
|
||
| features.add({ | ||
| id: 'ci-link', | ||
| description: 'Adds build status and link to CI by the repo\'s title', |
There was a problem hiding this comment.
Be consistent with Add and Adds. I prefer Add.
|
|
||
| features.add({ | ||
| id: 'comment-fields-keyboard-shortcuts', | ||
| description: 'Quickly edit your last comment using the `↑` shortcut', |
There was a problem hiding this comment.
| description: 'Quickly edit your last comment using the `↑` shortcut', | |
| description: 'Quickly edit your last comment using the `↑` keyboard shortcut', |
|
|
||
| features.add({ | ||
| id: 'copy-on-y', | ||
| description: 'Adds shortcut to copy permalink of file to clipboard', |
There was a problem hiding this comment.
| description: 'Adds shortcut to copy permalink of file to clipboard', | |
| description: 'Adds shortcut to copy the permalink of a file to the clipboard', |
|
|
||
| features.add({ | ||
| id: 'download-folder-button', | ||
| description: 'Download entire folders from repositories using the `Download folder` button. (Uses download-directory.github.io)', |
There was a problem hiding this comment.
| description: 'Download entire folders from repositories using the `Download folder` button. (Uses download-directory.github.io)', | |
| description: 'Download entire folders from repositories using the `Download folder` button. (Uses https://download-directory.github.io)', |
|
|
||
| features.add({ | ||
| id: 'extend-diff-expander', | ||
| description: 'Widen `Expand diff` button', |
There was a problem hiding this comment.
| description: 'Widen `Expand diff` button', | |
| description: 'Widen the `Expand diff` button', |
|
|
||
| features.add({ | ||
| id: 'extend-status-labels', | ||
| description: 'Extend status labels', |
There was a problem hiding this comment.
Extend them with what or in what way? The description is not clear enough.
|
|
||
| features.add({ | ||
| id: 'user-profile-follower-badge', | ||
| description: 'Badge on user\'s profile if they follow you', |
There was a problem hiding this comment.
| description: 'Badge on user\'s profile if they follow you', | |
| description: 'Add a badge on user\'s profile page if they follow you', |
|
|
||
| features.add({ | ||
| id: 'view-markdown-source', | ||
| description: `Add button to view the markdown source whereas GitHub only lets you see the rendered version. |
There was a problem hiding this comment.
| description: `Add button to view the markdown source whereas GitHub only lets you see the rendered version. | |
| description: `Add a button to view the Markdown source whereas GitHub only lets you see the rendered version. |
|
|
||
| features.add({ | ||
| id: 'wait-for-build', | ||
| description: 'The option to wait for checks when merging a PR', |
There was a problem hiding this comment.
| description: 'The option to wait for checks when merging a PR', | |
| description: 'Add checkbox to wait for checks when merging a PR', |
| features.add({ | ||
| id: 'warn-pr-from-master', | ||
| description: `Creating a PR from the master branch is an anti-pattern. This feature produces a | ||
| warning when a user attempts to create a PR from their fork's default branch. |
|
|
||
| features.add({ | ||
| id: 'warning-for-disallow-edits', | ||
| description: 'A warning appears when unchecking `Allow edits from maintainers`', |
There was a problem hiding this comment.
| description: 'A warning appears when unchecking `Allow edits from maintainers`', | |
| description: 'Add warning when unchecking `Allow edits from maintainers`', |
|
Ping on this issue, if possible we'd like to merge it soon |
|
If you can at least merge the suggestions by @sindresorhus we can accept it, otherwise we have to close it |
1. Open refined-github#1881 2. Expand add-co-authored-by.tsx 3. Notice no indentation change in the "Suggested change" diff
@sindresorhus I've now added description field to features.add() and also description text for all of the existing features. Please review and let me know if any changes are required.
Fixes #1787