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

Add description field to features #2030

Merged
merged 6 commits into from May 13, 2019
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions source/features/add-co-authored-by.tsx
Expand Up @@ -76,6 +76,7 @@ async function init(): Promise<void> {

features.add({
id: 'add-co-authored-by',
description: 'Add co-authors when merging pull requests with multiple committers',
include: [
features.isPRConversation
],
Expand Down
1 change: 1 addition & 0 deletions source/features/batch-open-issues.tsx
Expand Up @@ -66,6 +66,7 @@ function init(): void | false {

features.add({
id: 'batch-open-issues',
description: 'Open multiple issues in your repo at once',
include: [
features.isDiscussionList
],
Expand Down
1 change: 1 addition & 0 deletions source/features/branch-buttons.tsx
Expand Up @@ -121,6 +121,7 @@ async function init(): Promise<false | void> {

features.add({
id: 'branch-buttons',
description: 'Quickly visit a repository’s default branch and latest version tag',
include: [
features.isRepoTree,
features.isSingleFile
Expand Down
1 change: 1 addition & 0 deletions source/features/bypass-checks.tsx
Expand Up @@ -15,6 +15,7 @@ async function bypass(check: HTMLElement): Promise<void> {

features.add({
id: 'bypass-checks',
description: 'Bypass the `Checks` page and go directly to build results when clicking the `Details` links on a pull request',
include: [
features.isPRConversation
],
Expand Down
1 change: 1 addition & 0 deletions source/features/ci-link.tsx
Expand Up @@ -33,6 +33,7 @@ async function init(): Promise<false | void> {

features.add({
id: 'ci-link',
description: 'Add build status and link to CI after the repo’s title',
include: [
features.isRepo
],
Expand Down
5 changes: 1 addition & 4 deletions source/features/clean-sidebar.tsx
@@ -1,7 +1,3 @@
/*
Hide all empty sections (or just their "empty" label) in discussion sidebar
*/

import './clean-sidebar.css';
import React from 'dom-chef';
import select from 'select-dom';
Expand Down Expand Up @@ -88,6 +84,7 @@ function init(): void {

features.add({
id: 'link-to-file-in-file-history',
description: 'Hide all empty sections (or just their "empty" label) in the discussion sidebar',
include: [
features.isIssue,
features.isPRConversation
Expand Down
1 change: 1 addition & 0 deletions source/features/close-out-of-view-modals.tsx
Expand Up @@ -19,5 +19,6 @@ function init(): void {

features.add({
id: 'close-out-of-view-modals',
description: 'Automatically close modals when they’re no longer visible',
init
});
7 changes: 1 addition & 6 deletions source/features/collapsible-content-button.tsx
@@ -1,9 +1,3 @@
/*
Insert collapsible content when writing comments (via `<summary>`)

https://user-images.githubusercontent.com/1402241/53678019-0c721280-3cf4-11e9-9c24-4d11a697f67c.png
*/

import React from 'dom-chef';
import select from 'select-dom';
import delegate, {DelegateEvent} from 'delegate-it';
Expand Down Expand Up @@ -70,6 +64,7 @@ function addContentToDetails(event: DelegateEvent<MouseEvent, HTMLButtonElement>

features.add({
id: 'collapsible-content-button',
description: 'Insert collapsible content when writing comments (via `<summary>`) https://user-images.githubusercontent.com/1402241/53678019-0c721280-3cf4-11e9-9c24-4d11a697f67c.png',
include: [
features.hasRichTextEditor
],
Expand Down
1 change: 1 addition & 0 deletions source/features/comment-fields-keyboard-shortcuts.tsx
Expand Up @@ -81,6 +81,7 @@ function init(): void {

features.add({
id: 'comment-fields-keyboard-shortcuts',
description: 'Quickly edit your last comment using the `↑` keyboard shortcut',
shortcuts: {
'↑': 'Edit your last comment'
},
Expand Down
1 change: 1 addition & 0 deletions source/features/comments-time-machine-links.tsx
Expand Up @@ -71,6 +71,7 @@ function init(): void {

features.add({
id: 'comments-time-machine-links',
description: 'Browse a repository at the time of each comment',
include: [
features.hasComments
],
Expand Down
1 change: 1 addition & 0 deletions source/features/copy-file.tsx
Expand Up @@ -44,6 +44,7 @@ function init(): void {

features.add({
id: 'copy-file',
description: 'Copy a file’s content',
include: [
features.isSingleFile,
features.isGist
Expand Down
1 change: 1 addition & 0 deletions source/features/copy-on-y.tsx
Expand Up @@ -19,6 +19,7 @@ function deinit(): void {

features.add({
id: 'copy-on-y',
description: 'Add keyboard shortcut to copy the permalink of a file to the clipboard',
include: [
features.isSingleFile
],
Expand Down
1 change: 1 addition & 0 deletions source/features/create-release-shortcut.tsx
Expand Up @@ -10,6 +10,7 @@ function init(): void {

features.add({
id: 'create-release-shortcut',
description: 'Add keyboard shortcut to quickly create a new release',
include: [
features.isReleasesOrTags
],
Expand Down
6 changes: 1 addition & 5 deletions source/features/default-to-rich-diff.tsx
@@ -1,8 +1,3 @@
/**
* Some of the files in PRs can be reviewed using a rich-diff mode: markdown and SVGs are some of the examples.
*
* This feature sets the rich-diff view as default for each SVG file in a PR
*/
import select from 'select-dom';
import features from '../libs/features';

Expand Down Expand Up @@ -42,6 +37,7 @@ function init(): void {

features.add({
id: 'default-to-rich-diff',
description: 'Some of the files in pull requests can be reviewed using a rich-diff mode, for example, Markdown and SVG. This feature sets the rich-diff view as default in pull requests for files with a rich diff.',
include: [
features.isCommit,
features.isPRFiles
Expand Down
1 change: 1 addition & 0 deletions source/features/download-folder-button.tsx
Expand Up @@ -17,6 +17,7 @@ function init(): void {

features.add({
id: 'download-folder-button',
description: 'Download entire folders from repositories using the `Download folder` button. (Uses https://download-directory.github.io)',
include: [
features.isRepoTree
],
Expand Down
1 change: 1 addition & 0 deletions source/features/edit-comments-faster.tsx
Expand Up @@ -34,6 +34,7 @@ function init(): void {

features.add({
id: 'edit-comments-faster',
description: 'Edit comments in one click',
include: [
features.hasComments
],
Expand Down
5 changes: 1 addition & 4 deletions source/features/edit-files-faster.tsx
@@ -1,7 +1,3 @@
/*
Edit files straight from a repo’s list by clicking their icon.
*/

import './edit-files-faster.css';
import React from 'dom-chef';
import select from 'select-dom';
Expand Down Expand Up @@ -29,6 +25,7 @@ function init(): void {

features.add({
id: 'edit-files-faster',
description: 'Edit files straight from a repo’s file list by clicking their file icon',
include: [
features.isRepoTree
],
Expand Down
1 change: 1 addition & 0 deletions source/features/embed-gist-inline.tsx
Expand Up @@ -50,6 +50,7 @@ function init(): void {

features.add({
id: 'embed-gist-inline',
description: 'View linked gists inline in comments',
include: [
features.hasComments
],
Expand Down
1 change: 1 addition & 0 deletions source/features/emojis-title.tsx
Expand Up @@ -12,6 +12,7 @@ function init(): void {

features.add({
id: 'emojis-title',
description: 'Don’t add a title if the emoji’s parents already have one',
load: features.onAjaxedPages,
init
});
5 changes: 1 addition & 4 deletions source/features/esc-to-deselect-line.tsx
@@ -1,7 +1,3 @@
/*
If you select a line in a file, pressing ESC will deselect it.
*/

import features from '../libs/features';

function isLineSelected(): boolean {
Expand Down Expand Up @@ -29,5 +25,6 @@ function init(): void {

features.add({
id: 'esc-to-deselect-line',
description: 'Press the `esc` key to deselect the current line when viewing files',
init
});
1 change: 1 addition & 0 deletions source/features/extend-diff-expander.tsx
Expand Up @@ -16,6 +16,7 @@ function init(): void {

features.add({
id: 'extend-diff-expander',
description: 'Widen the `Expand diff` button',
include: [
features.isPRFiles,
features.isCommit
Expand Down
1 change: 1 addition & 0 deletions source/features/extend-status-labels.tsx
Expand Up @@ -34,6 +34,7 @@ function init(): false | void {

features.add({
id: 'extend-status-labels',
description: 'Add reference to PR/commit that closed the current issue/PR (https://user-images.githubusercontent.com/1402241/35973522-5c00acb6-0d08-11e8-89ca-03071de15c6f.png)',
include: [
features.isPRConversation,
features.isIssue
Expand Down
1 change: 1 addition & 0 deletions source/features/faster-pr-diff-options.tsx
Expand Up @@ -82,6 +82,7 @@ function init(): false | void {

features.add({
id: 'faster-pr-diff-options',
description: 'Change diff style and whitespace visibility in one click',
include: [
features.isPRFiles,
features.isCommit
Expand Down
1 change: 1 addition & 0 deletions source/features/filter-comments-by-you.tsx
Expand Up @@ -21,6 +21,7 @@ function init(): void {

features.add({
id: 'filter-comments-by-you',
description: 'Search for issues and pull requests with the "Everything commented by you filter"',
include: [
features.isRepoDiscussionList
],
Expand Down
7 changes: 1 addition & 6 deletions source/features/filter-pr-by-build-status.tsx
@@ -1,9 +1,3 @@
/**
This feature lets you filter the PRs by their build status, namely success, failure, and pending.
For more information read the GitHub blog: https://github.blog/2015-06-02-filter-pull-requests-by-status/

See it in action at https://github.com/sindresorhus/refined-github/pulls
*/
import React from 'dom-chef';
import select from 'select-dom';
import {checkInline} from '../libs/icons';
Expand Down Expand Up @@ -59,6 +53,7 @@ function init(): void | false {

features.add({
id: 'filter-pr-by-build-status',
description: 'Filter pull requests by their build status (success, failure, and pending)',
include: [
features.isPRList
],
Expand Down
6 changes: 1 addition & 5 deletions source/features/fit-textareas.tsx
@@ -1,8 +1,3 @@
/*
Automatically expands textareas to fit ALL of their content, rather than have a height limit like GitHub's native "fit to content" behavior.
https://user-images.githubusercontent.com/1402241/54336211-66fd5e00-4666-11e9-9c5e-111fccab004d.gif
*/

import './fit-textareas.css';
import delegate, {DelegateEvent} from 'delegate-it';
import fitTextarea from 'fit-textarea';
Expand All @@ -23,5 +18,6 @@ function init(): void {

features.add({
id: 'fit-textareas',
description: 'Automatically expand textareas to fit all of their content, rather than have a height limit like GitHub’s native "fit to content" behavior (https://user-images.githubusercontent.com/1402241/54336211-66fd5e00-4666-11e9-9c5e-111fccab004d.gif)',
init
});
2 changes: 1 addition & 1 deletion source/features/focus-confirmation-buttons.tsx
@@ -1,7 +1,6 @@
import select from 'select-dom';
import features from '../libs/features';

// Ensure that confirm buttons (like Mark all as read) are always in focus
function init(): void {
window.addEventListener('facebox:reveal', () => {
select<HTMLButtonElement>('.facebox-content button')!.focus();
Expand All @@ -10,5 +9,6 @@ function init(): void {

features.add({
id: 'focus-confirmation-buttons',
description: 'Ensure that confirm buttons, like "Mark all as read", are always in focus',
init
});
7 changes: 2 additions & 5 deletions source/features/follow-file-renames.tsx
@@ -1,7 +1,3 @@
/*
In commits list, it enables Newer/Older buttons to follow file renames
*/

import React from 'dom-chef';
import select from 'select-dom';
import features from '../libs/features';
Expand All @@ -14,7 +10,7 @@ interface File {
status: string;
}

// TODO: ensure that pages with a single commit aren't fetched twice (api.ts' cache should do it automatically)
// TODO: Ensure that pages with a single commit aren't fetched twice (api.ts' cache should do it automatically)
async function findRename(
user: string,
repo: string,
Expand Down Expand Up @@ -66,6 +62,7 @@ async function init(): Promise<false | void> {

features.add({
id: 'follow-file-renames',
description: 'Enable Newer/Older buttons in commit lists to follow file renames',
include: [
features.isCommitList
],
Expand Down
1 change: 1 addition & 0 deletions source/features/global-discussion-list-filters.tsx
Expand Up @@ -42,6 +42,7 @@ function init(): void {

features.add({
id: 'global-discussion-list-filters',
description: 'See just the issues and PRs on your repos or commented on by you in the global Issues/Pull Requests pages',
include: [
features.isGlobalDiscussionList
],
Expand Down
1 change: 1 addition & 0 deletions source/features/hide-comments-faster.tsx
Expand Up @@ -61,6 +61,7 @@ function init(): void {

features.add({
id: 'hide-comments-faster',
description: 'Hide comments in fewer clicks',
include: [
features.hasComments
],
Expand Down
1 change: 1 addition & 0 deletions source/features/hide-disabled-milestone-sorter.tsx
Expand Up @@ -14,6 +14,7 @@ function init(): void {

features.add({
id: 'hide-disabled-milestone-sorter',
description: 'Hide the milestone drag icon when you don’t have permission to sort the milestones',
include: [
features.isMilestone
],
Expand Down
1 change: 1 addition & 0 deletions source/features/hide-empty-meta.tsx
Expand Up @@ -9,6 +9,7 @@ function init(): void {

features.add({
id: 'hide-empty-meta',
description: 'Hide nonessential files from the GitHub file browser',
fregante marked this conversation as resolved.
Show resolved Hide resolved
fregante marked this conversation as resolved.
Show resolved Hide resolved
include: [
features.isRepoRoot
],
Expand Down
1 change: 1 addition & 0 deletions source/features/hide-inactive-deployments.tsx
Expand Up @@ -14,6 +14,7 @@ function init(): void {

features.add({
id: 'hide-inactive-deployments',
description: 'Hide inactive deployments in pull requests',
include: [
features.isPRConversation
],
Expand Down
1 change: 1 addition & 0 deletions source/features/hide-issue-list-autocomplete.tsx
Expand Up @@ -7,6 +7,7 @@ function init(): void {

features.add({
id: 'hide-issue-list-autocomplete',
description: 'The autocomplete on the issue search field is removed',
include: [
features.isDiscussionList
],
Expand Down
10 changes: 1 addition & 9 deletions source/features/hide-navigation-hover-highlight.tsx
@@ -1,12 +1,3 @@
/*
Some lists like notifications, file lists, and issue lists,
are highlighted as you move the mouse over them. This highlight
is useful when navigating via the keyboard (j/k), but annoying
when just moving the mouse around.

This feature will hide the highlight until the first keyboard
navigation, then it will be displayed until the next full reload.
*/
import './hide-navigation-hover-highlight.css';
import features from '../libs/features';

Expand All @@ -21,5 +12,6 @@ function init(): void {

features.add({
id: 'hide-navigation-hover-highlight',
description: 'Some lists like notifications, file lists, and issue lists, are highlighted as you move the mouse over them. This highlight is useful when navigating via the keyboard (j/k), but annoying when just moving the mouse around.\n\nThis feature will hide the highlight until the first keyboard navigation, then it will be displayed until the next full reload.',
init
});
4 changes: 1 addition & 3 deletions source/features/hide-own-stars.tsx
@@ -1,6 +1,3 @@
/*
Hide other users starring/forking your repos
*/
import select from 'select-dom';
import features from '../libs/features';
import {getUsername} from '../libs/utils';
Expand Down Expand Up @@ -28,6 +25,7 @@ async function init(): Promise<void> {

features.add({
id: 'hide-own-stars',
description: 'Hide other users starring/forking your repos in the dashboard',
include: [
features.isDashboard
],
Expand Down
1 change: 1 addition & 0 deletions source/features/hide-useless-comments.tsx
Expand Up @@ -57,6 +57,7 @@ function unhide(event: React.MouseEvent<HTMLButtonElement>): void {

features.add({
id: 'hide-useless-comments',
description: 'Hide useless comments like "+1"',
include: [
features.isIssue
],
Expand Down