Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,6 @@ artifacts
desktop.ini

LocalOverrides.xcconfig

website/dist
website/.cache
14 changes: 6 additions & 8 deletions build/__snapshots__/features-meta.json
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,7 @@
{
"id": "conversation-activity-filter",
"description": "Lets you hide every event except comments or unresolved comments in issues and PRs.",
"css": true,
"screenshot": "https://github-production-user-asset-6210df.s3.amazonaws.com/83146190/252116522-053bce84-5c55-477b-8cc2-42a48104fb02.png"
},
{
Expand Down Expand Up @@ -216,6 +217,7 @@
{
"id": "default-branch-button",
"description": "Adds a link to the default branch on directory listings and files.",
"css": true,
"screenshot": "https://github-production-user-asset-6210df.s3.amazonaws.com/83146190/252176294-9130783c-51aa-4df9-9c35-9b87c179199a.png"
},
{
Expand Down Expand Up @@ -591,7 +593,7 @@
},
{
"id": "one-click-diff-options",
"description": "Adds \"Hide whitespace\" button to Compare pages and a keyboard shortcut to PRs and Compare pages: <kbd>d</kbd> <kbd>w</kbd>.",
"description": "Adds \"Hide whitespace\" button to Compare pages and a keyboard shortcut to PRs and Compare pages: <kbd>d</kbd><kbd>w</kbd>.",
"screenshot": "https://github.com/user-attachments/assets/0b92992a-69a4-4de1-ab2a-cb6508870b4a"
},
{
Expand Down Expand Up @@ -798,11 +800,6 @@
"cssOnly": true,
"screenshot": null
},
{
"id": "refined-github.css",
"description": "Reduces tabs’ size to 4 spaces instead of 8 where GitHub doesn't follow the user’s preferences.",
"screenshot": "https://cloud.githubusercontent.com/assets/170270/14170088/d3be931e-f755-11e5-8edf-c5f864336382.png"
},
{
"id": "release-download-count",
"description": "Adds a download count next to release assets.",
Expand Down Expand Up @@ -915,6 +912,7 @@
{
"id": "show-whitespace",
"description": "Makes whitespace characters visible.",
"css": true,
"screenshot": "https://user-images.githubusercontent.com/1402241/61187598-f9118380-a6a5-11e9-985a-990a7f798805.png"
},
{
Expand Down Expand Up @@ -993,11 +991,11 @@
"description": "Reduces the default tab indent width from 8 to 4 characters in code views where GitHub doesn't follow the user's preferences.",
"css": true,
"cssOnly": true,
"screenshot": null
"screenshot": "https://cloud.githubusercontent.com/assets/170270/14170088/d3be931e-f755-11e5-8edf-c5f864336382.png"
},
{
"id": "tab-to-indent",
"description": "Enables <kbd>tab</kbd> and <kbd>shift</kbd> <kbd>tab</kbd> for indentation in comment fields.",
"description": "Enables <kbd>tab</kbd> and <kbd>shift</kbd><kbd>tab</kbd> for indentation in comment fields.",
"screenshot": "https://user-images.githubusercontent.com/1402241/33802977-beb8497c-ddbf-11e7-899c-698d89298de4.gif"
},
{
Expand Down
231 changes: 231 additions & 0 deletions build/feature-groups.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,231 @@
{
"Highlights": [
"show-whitespace",
"unreleased-commits",
"pr-base-commit",
"conversation-activity-filter",
"status-subscription",
"default-branch-button",
"restore-file",
"select-notifications"
],
"Repositories": [
"🔥 repo-header-info",
"swap-branches-on-compare",
"repo-age",
"show-open-prs-of-forks",
"clean-repo-filelist-actions",
"new-repo-disable-projects-and-wikis",
"sticky-sidebar",
"link-to-github-io",
"github-actions-indicators",
"quick-repo-deletion",
"delete-branch",
"pr-from-branch",
"archive-forks-link",
"repo-avatars",
"small-user-avatars",
"🔥 action-pr-link",
"mobile-tabs",
"visit-tag",
"actions-run-removal",
"rerun-workflow",
"extend-repo-tabs"
],
"File management": [
"download-folder-button",
"quick-file-edit",
"repo-wide-file-finder",
"show-associated-branch-prs-on-fork",
"html-preview-link",
"file-age-color",
"previous-version"
],
"Code": [
"linkify-code",
"copy-on-y",
"list-prs-for-file",
"esc-to-deselect-line",
"list-prs-for-branch"
],
"Writing comments": [
"🔥 tab-to-indent",
"collapsible-content-button",
"🔥 fit-textareas",
"quick-comment-edit",
"one-key-formatting",
"clean-rich-text-editor",
"quick-mention",
"table-input",
"unfinished-comments",
"quick-review-comment-deletion",
"avoid-accidental-submissions",
"no-self-reference"
],
"Reading comments": [
"🔥 reactions-avatars",
"embed-gist-inline",
"comments-time-machine-links",
"show-names",
"shorten-links",
"🔥 preview-hidden-comments",
"hide-low-quality-comments",
"scrollable-areas",
"quick-comment-hiding",
"open-issue-to-latest-comment",
"expand-all-hidden-comments",
"keyboard-navigation",
"hidden-content"
],
"Conversations": [
"open-all-conversations",
"sticky-conversation-list-toolbar",
"conversation-authors",
"align-issue-labels",
"🔥 last-update-sort",
"global-conversation-list-filters",
"🔥 clean-conversation-sidebar",
"clean-conversation-filters",
"toggle-everything-with-alt",
"extend-conversation-status-filters",
"bugs-tab",
"pinned-issues-update-time",
"mark-pinned",
"mark-locked",
"clean-pinned-issues",
"quick-label-removal",
"clean-conversation-headers",
"dim-bots",
"esc-to-cancel",
"no-duplicate-list-update-time",
"linkify-user-labels",
"jump-to-conversation-close-event",
"close-as-unplanned",
"locked-issue",
"easy-toggle-hidden-comments"
],
"Viewing pull requests": [
"linkify-commit-sha",
"pr-filters",
"unclip-checks",
"pr-approvals-count",
"highlight-non-default-base-branch",
"hide-inactive-deployments",
"previous-next-commit-buttons",
"conflict-marker",
"pr-commit-lines-changed",
"cross-deleted-pr-branches",
"batch-mark-files-as-viewed",
"🔥 closing-remarks",
"pr-jump-to-first-non-viewed-file",
"view-last-pr-deployment",
"no-unnecessary-split-diff-view",
"emphasize-draft-pr-label",
"clean-checks-list",
"mobile-tabs-pr",
"linkify-pr-review-state"
],
"Editing pull requests": [
"🔥 sync-pr-commit-title",
"update-pr-from-base-branch",
"one-click-review-submission",
"pull-request-hotkeys",
"pr-branch-auto-delete",
"one-click-pr-or-gist",
"clear-pr-merge-commit-message",
"quick-review",
"pr-first-commit-title",
"quick-resolve-conflicts"
],
"Commits": [
"patch-diff-links",
"more-file-links",
"one-click-diff-options",
"extend-diff-expander",
"hide-diff-signs",
"suggest-commit-title-limit",
"tags-on-commits-list",
"mark-merge-commits-in-list",
"deep-reblame",
"new-or-deleted-file",
"easy-toggle-files",
"same-branch-author-commits",
"easy-toggle-commit-messages",
"link-to-compare-diff",
"conventional-commits"
],
"Tags and releases": [
"release-download-count",
"releases-tab",
"releases-dropdown",
"create-release-shortcut",
"🔥 tag-changes-link",
"convert-release-to-draft",
"confirm-release",
"link-to-changelog-file"
],
"Profiles": [
"user-profile-follower-badge",
"mark-private-orgs",
"profile-hotkey",
"show-user-top-repositories",
"hide-user-forks",
"linkify-user-location",
"conversation-links-on-repo-lists"
],
"Notifications": [
"open-all-notifications",
"🔥 unread-anywhere",
"select-all-notifications-shortcut",
"stop-redirecting-in-notification-bar",
"last-notification-page-button",
"pr-notification-link",
"sticky-notifications-actions",
"clean-notifications",
"notifications-ui"
],
"Global": [
"🔥 useful-not-found-page",
"selection-in-new-tab",
"close-out-of-view-modals",
"parse-backticks",
"action-used-by-link",
"improve-shortcut-help",
"clean-footer",
"night-not-found",
"monospace-textareas"
],
"Netiquette": [
"netiquette",
"warn-pr-from-master",
"warning-for-disallow-edits"
],
"Fixes for GitHub shortcomings": [
"github-bugs",
"hide-navigation-hover-highlight",
"clean-repo-sidebar",
"linkify-branch-references",
"actionable-pr-view-file",
"reload-failed-proxied-images",
"prevent-link-loss",
"prevent-duplicate-pr-submission",
"prevent-comment-loss",
"fix-no-pr-search",
"clean-readme-url",
"click-outside-modal",
"linkify-line-numbers",
"sidebar-focus-file",
"no-modals",
"same-page-links",
"linkify-text",
"new-milestone-button",
"mark-private-repos",
"tab-size",
"sticky-file-header",
"sticky-csv-header",
"reactions-popup",
"readable-title-change-events",
"cmd-enter",
"new-tab-links"
]
}
49 changes: 49 additions & 0 deletions build/feature-groups.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
import {assert, describe, test} from 'vitest';

import {isFeaturePrivate} from '../source/helpers/feature-utils.js';
import featureGroups from './feature-groups.json' with {type: 'json'};
import {getFeaturesMeta} from './features-parser.js';

// Re-run tests when these files change https://github.com/vitest-dev/vitest/discussions/5864
void import.meta.glob('../source/features/*.*');

const featuresMeta = getFeaturesMeta();
const fireRegex = /^🔥 /;
const groupedIds = Object.values(featureGroups).flat().map(entry => entry.replace(fireRegex, ''));

const hiddenFromGroups = new Set<string>(['extensible-nav']);

describe('feature-groups.json', () => {
test('Highlights come first', () => {
assert.equal(Object.keys(featureGroups)[0], 'Highlights');
});

test('Highlights have a screenshot and are not marked with 🔥', () => {
for (const entry of featureGroups.Highlights) {
assert(!entry.startsWith('🔥 '), `${entry} is already in Highlights, remove the 🔥`);
const meta = featuresMeta.find(({id}) => id === entry);
assert(meta?.screenshot, `${entry} should have a screenshot to be in Highlights`);
}
});

test('every documented feature is in exactly one group', () => {
for (const {id} of featuresMeta) {
if (hiddenFromGroups.has(id) || isFeaturePrivate(id)) {
continue;
}

assert.equal(
groupedIds.filter(groupedId => groupedId === id).length,
1,
`${id} should be in exactly one group of feature-groups.json`,
);
}
});

test('groups only list existing features', () => {
const ids = new Set(featuresMeta.map(({id}) => id));
for (const id of groupedIds) {
assert(ids.has(id as FeatureId), `${id} is in feature-groups.json but has no description in its file header`);
}
});
});
6 changes: 3 additions & 3 deletions build/readme-parser.test.ts → build/features-parser.test.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import {expect, test} from 'vitest';

import {getFeaturesMeta, getImportedFeatures} from './readme-parser.js';
import {getFeaturesMeta, getImportedFeatures} from './features-parser.js';

// Re-run tests when these files change https://github.com/vitest-dev/vitest/discussions/5864
void import.meta.glob([
'../readme.md',
'../source/features/*',
'../source/refined-github.ts',
]);

Expand All @@ -16,7 +16,7 @@ function jsonify(value: unknown): string {
) + '\n'; // Trailing newline
}

test('readme-parser', async () => {
test('features-parser', async () => {
await expect(jsonify(getImportedFeatures())).toMatchFileSnapshot('./__snapshots__/imported-features.json');
await expect(jsonify(getFeaturesMeta())).toMatchFileSnapshot('./__snapshots__/features-meta.json');
});
Loading
Loading