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

Migrate to @primer/react #767

Merged
merged 76 commits into from
Oct 23, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
76 commits
Select commit Hold shift + click to select a range
99a5d28
Start porting primer/components to primer/react
lukekarrys Oct 21, 2023
0d94edf
chore: fix linting
lukekarrys Oct 14, 2023
2d0d9dd
fix(theme): move mdx components to own dir
lukekarrys Oct 15, 2023
642952b
fix: run system props codemod
lukekarrys Oct 15, 2023
d8c4cf7
chore: lint from root for frontend deps
lukekarrys Oct 15, 2023
13cf88b
chore: prettier
lukekarrys Oct 15, 2023
87fa69b
chore: move all eslint rules to root
lukekarrys Oct 15, 2023
3d53ed4
fix: move all mdx components to one file
lukekarrys Oct 15, 2023
decf4f7
fix: replace borderbox with box
lukekarrys Oct 15, 2023
b8c58a4
chore: remove theme workspace and merge all files into root
lukekarrys Oct 15, 2023
26b5d9e
fix: dedupe shared page components into wrap-page-element
lukekarrys Oct 15, 2023
58543cd
fix: refactor nav-hierarchy component
lukekarrys Oct 16, 2023
36c0f96
fix: finish converting all primer/react to sx
lukekarrys Oct 16, 2023
ed95213
Move nav files to content dir
lukekarrys Oct 16, 2023
5678639
Fix script for cli workspace tests
lukekarrys Oct 16, 2023
0a7f60d
Fix jest tests for CSS.supports
lukekarrys Oct 16, 2023
8aba7e8
Fix variants prop name
lukekarrys Oct 16, 2023
6ab196d
Fix reuse for new root files
lukekarrys Oct 16, 2023
babadae
Fix cli bin/build test
lukekarrys Oct 16, 2023
772f727
chore: bump @testing-library/react@12
lukekarrys Oct 16, 2023
0f03bfd
Convert primer colors to use new color names
lukekarrys Oct 16, 2023
ce2fbaf
Refactor to use new primer navlist
lukekarrys Oct 16, 2023
5b47950
Style updates for new primer components
lukekarrys Oct 16, 2023
bd1c7c2
Add top nav links to nav drawer
lukekarrys Oct 16, 2023
d02c4a5
More styles refactoring
lukekarrys Oct 17, 2023
ed8551f
Move props out of downshift functions
lukekarrys Oct 17, 2023
87ef99e
Fix header and mobile search borders
lukekarrys Oct 17, 2023
2bc2360
Hide variants from page breadcrumbs
lukekarrys Oct 17, 2023
1a013f3
Color swaps
lukekarrys Oct 17, 2023
bd25600
Dont fail if page has no frontmatter
lukekarrys Oct 17, 2023
a005379
Fix links to external nav items
lukekarrys Oct 17, 2023
608753f
Update H1 styles
lukekarrys Oct 17, 2023
9a7ffa2
Fix max height on desktop table of contents
lukekarrys Oct 17, 2023
bdc7928
Use CSS only method to scroll pre
lukekarrys Oct 17, 2023
7345fed
Use mdx 404 page
lukekarrys Oct 17, 2023
1894156
Nav list dividers
lukekarrys Oct 17, 2023
63c3975
Underline mdx links
lukekarrys Oct 17, 2023
0484bfc
Use full header height instead of header height
lukekarrys Oct 17, 2023
84cce6d
Update to gatsby@5 and mdx@2
lukekarrys Oct 18, 2023
e6a77ef
Fix generated cli markdown for mdx v2
lukekarrys Oct 18, 2023
6080ce2
deps: framer-motion@10
lukekarrys Oct 18, 2023
b1051f3
Updates for shared code component
lukekarrys Oct 18, 2023
4b87768
Fix lanaguage-less code blocks
lukekarrys Oct 18, 2023
fc3ebc9
Fix nav link sizing
lukekarrys Oct 18, 2023
86ffa5a
Fix some gatsby SSR mismatch issues
lukekarrys Oct 18, 2023
7c9ad48
Fix autolinked CLI headings that already contain a link
lukekarrys Oct 19, 2023
2716ad5
Update @primer/react
lukekarrys Oct 19, 2023
0c5da31
Mock prettier to speed up CLI tests
lukekarrys Oct 20, 2023
ac27b2b
Turn on legacy peer deps since it is required for gatsby
lukekarrys Oct 20, 2023
6dbeb7a
Try building with ubuntu again and without memory safeguards
lukekarrys Oct 20, 2023
2c9471b
Use link component instead of catch links plugin
lukekarrys Oct 20, 2023
b022d99
Add contributors to pages
lukekarrys Oct 20, 2023
4b576e4
Only panic during build in CI
lukekarrys Oct 20, 2023
bc5f2e3
Refresh package-lock
lukekarrys Oct 20, 2023
9e23479
Fix cli workspace linting
lukekarrys Oct 20, 2023
58e8f8e
Lint and format all code with same configs
lukekarrys Oct 20, 2023
3969759
Custom gatsby bin to clean and retry on certain errors
lukekarrys Oct 20, 2023
48f25a3
Use built in gatsby head in favor of react-helmet
lukekarrys Oct 21, 2023
dc67a03
Turn off sourcemaps in production
lukekarrys Oct 21, 2023
16e6116
Set parcel workers to 0 to fix cache segfaults
lukekarrys Oct 21, 2023
e317f89
Make hover bg red for buttons in dark themes
lukekarrys Oct 21, 2023
de7c007
Refactor theme providers to a single file
lukekarrys Oct 21, 2023
d0e5f5f
Move avatar tooltip to link
lukekarrys Oct 21, 2023
005ec8c
Return focus to variant after cross variant navigation
lukekarrys Oct 21, 2023
d87038e
Update fuse to latest version
lukekarrys Oct 21, 2023
a2ab813
Convert invalid html content to jsx
lukekarrys Oct 21, 2023
eb7a0bf
Make search result items links
lukekarrys Oct 22, 2023
4db054a
Less janky mobile search animations
lukekarrys Oct 22, 2023
34d1075
Consolidate some related components to single files
lukekarrys Oct 22, 2023
3f82caf
Use theme values for spacing
lukekarrys Oct 22, 2023
f864184
Fix search focus on iOS
lukekarrys Oct 22, 2023
793eeca
Make theme wrapper components use as property for less nesting
lukekarrys Oct 22, 2023
641bb04
Rename all md file to mdx
lukekarrys Oct 22, 2023
5220b7e
Fix GFM features in mdx
lukekarrys Oct 22, 2023
be97ce8
Fix overflow auto for tables on mobile
lukekarrys Oct 22, 2023
81e6daf
Format all mdx content with prettier
lukekarrys Oct 23, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
58 changes: 44 additions & 14 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,21 +1,51 @@
/* This file is automatically added by @npmcli/template-oss. Do not edit. */

'use strict'

const { readdirSync: readdir } = require('fs')

const localConfigs = readdir(__dirname)
.filter((file) => file.startsWith('.eslintrc.local.'))
.map((file) => `./${file}`)
const {getGlobals} = require('eslint-plugin-mdx/lib/helpers')

module.exports = {
root: true,
ignorePatterns: [
'cli/**',
'theme/**',
],
ignorePatterns: ['.cache/', 'public/'],
extends: [
'@npmcli',
...localConfigs,
'react-app',
// 'react-app/jest',
'eslint:recommended',
'plugin:react/recommended',
'plugin:github/react',
'plugin:primer-react/recommended',
'plugin:react-hooks/recommended',
'prettier',
],
rules: {
'max-len': 'off',
'react/prop-types': 'off',
'primer-react/no-system-props': ['error', {includeUtilityComponents: true}],
},
overrides: [
{
files: ['*.js'],
extends: ['plugin:import/recommended'],
},
{
files: ['src/shared.js'],
rules: {
'react/no-unescaped-entities': 'off',
},
},
{
files: ['*.mdx'],
plugins: ['mdx', 'prettier'],
extends: ['plugin:mdx/recommended'],
parserOptions: {
sourceType: 'module',
},
globals: getGlobals(['Index', 'Note', 'Prompt', 'Screenshot', 'Link', 'YouTube']),
settings: {
'import/resolver': 'webpack',
},
rules: {
'no-irregular-whitespace': 'off',
'jsx-a11y/anchor-has-content': 'off',
'react/jsx-no-target-blank': 'off',
},
},
],
}
26 changes: 0 additions & 26 deletions .eslintrc.local.js

This file was deleted.

2 changes: 2 additions & 0 deletions .github/workflows/ci-cli.yml
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,8 @@ jobs:
run: npm run lint --ignore-scripts -w cli
- name: Post Lint
run: npm run postlint --ignore-scripts -w cli
- name: Check Format
run: npm run format:check --ignore-scripts --if-present -w cli

test:
name: Test - ${{ matrix.platform.name }} - ${{ matrix.node-version }}
Expand Down
175 changes: 0 additions & 175 deletions .github/workflows/ci-theme.yml

This file was deleted.

4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,11 @@ on:
pull_request:
paths-ignore:
- cli/**
- theme/**
push:
branches:
- main
paths-ignore:
- cli/**
- theme/**
schedule:
# "At 09:00 UTC (02:00 PT) on Monday" https://crontab.guru/#0_9_*_*_1
- cron: "0 9 * * 1"
Expand Down Expand Up @@ -92,6 +90,8 @@ jobs:
run: npm run lint --ignore-scripts
- name: Post Lint
run: npm run postlint --ignore-scripts
- name: Check Format
run: npm run format:check --ignore-scripts --if-present

test:
name: Test - ${{ matrix.platform.name }} - ${{ matrix.node-version }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
pages: read
name: Build and Upload
if: github.repository_owner == 'npm'
runs-on: macos-latest
runs-on: ubuntu-latest
defaults:
run:
shell: bash
Expand Down
10 changes: 6 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,19 @@
!/.gitignore
!/.npmrc
!/.nvmrc
!/.prettierignore
!/.prettierrc.js
!/.release-please-manifest.json
!/.reuse/
!/*.md
!/bin/
!/CHANGELOG*
!/CODE_OF_CONDUCT.md
!/CONTENT-MODEL.md
!/content/
!/CONTRIBUTING.md
!/docs/
!/gatsby-*.js
!/gatsby-*
!/jest*.js
!/lib/
!/LICENSE*
!/map.js
Expand All @@ -32,9 +34,9 @@
!/release-please-config.json
!/scripts/
!/SECURITY.md
!/src/
!/src
!/static/
!/tap-snapshots/
!/test/
!/webpack.config.js
!/cli/
!/theme/
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
; This file is automatically added by @npmcli/template-oss. Do not edit.

package-lock=true
legacy-peer-deps=true
8 changes: 8 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
**/template-oss/*.json
**/template-oss/*.yml
/.github/
/package-lock.json
/SECURITY.md
/.reuse/
.nyc_output/
coverage/
13 changes: 13 additions & 0 deletions .prettierrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
const config = require('@github/prettier-config')

module.exports = {
...config,
proseWrap: 'never',
embeddedLanguageFormatting: 'off',
overrides: [
{
files: ['content/**/*.mdx'],
printWidth: 99999,
},
],
}
2 changes: 1 addition & 1 deletion .reuse/dep5
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ Files: content/* static/*
Copyright: 2020 GitHub
License: CC-BY-4.0

Files: scripts/* cli/* theme/* src/* .github/* *.md *.js *.json .npmrc .gitignore .nvmrc
Files: scripts/* cli/* theme/* src/* .github/* *.md *.js *.mjs *.json .*
Copyright: 2020 GitHub
License: MIT
Loading
Loading