Skip to content

Commit 88b51fa

Browse files
Merge branch 'main' into Scroll-NavBar-Fix
2 parents ead489b + 0eb78c7 commit 88b51fa

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+1852
-703
lines changed

.github/workflows/ci.yml

Lines changed: 49 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -64,57 +64,59 @@ jobs:
6464
run: yarn run test:coverage:all
6565

6666
- name: Upload coverage report to Codecov
67-
uses: codecov/codecov-action@v5.3.1
67+
uses: codecov/codecov-action@v5.4.3
6868
with:
6969
token: ${{ secrets.CODECOV_TOKEN }}
7070
name: ${{ env.CODECOV_UNIQUE_NAME }}
7171
verbose: true
7272
fail_ci_if_error: true
73-
74-
check-unauthorized-file-changes:
75-
name: Check Unauthorized File Changes
76-
if: ${{github.actor != 'dependabot[bot]'}} && ${{github.event_name == 'pull_request'}}
77-
runs-on: ubuntu-latest
78-
steps:
79-
- name: Checkout code
80-
uses: actions/checkout@v4
73+
74+
# Turning off the check for unauthorized files changes due to some vulnerabilities in the action
75+
76+
# check-unauthorized-file-changes:
77+
# name: Check Unauthorized File Changes
78+
# if: ${{github.actor != 'dependabot[bot]'}} && ${{github.event_name == 'pull_request'}}
79+
# runs-on: ubuntu-latest
80+
# steps:
81+
# - name: Checkout code
82+
# uses: actions/checkout@v4
8183

82-
- name: Get Changed Unauthorized files
83-
id: changed-unauth-files
84-
uses: tj-actions/changed-files@v46
85-
with:
86-
files: |
87-
.github/**
88-
.husky/**
89-
.env.example
90-
package.json
91-
tsconfig.json
92-
next.config.js
93-
next-sitemap.config.js
94-
next-env.d.ts
95-
tailwind.config.js
96-
postcss.config.js
97-
yarn.lock
98-
Dockerfile
99-
CODEOWNERS
100-
LICENSE
101-
.gitignore
102-
.gitmodules
103-
.gitattributes
104-
.eslintrc.js
105-
.eslintignore
106-
.zshrc
107-
.prettierrc
108-
.prettierignore
109-
.dockerignore
110-
makefile
84+
# - name: Get Changed Unauthorized files
85+
# id: changed-unauth-files
86+
# uses: tj-actions/changed-files@v46
87+
# with:
88+
# files: |
89+
# .github/**
90+
# .husky/**
91+
# .env.example
92+
# package.json
93+
# tsconfig.json
94+
# next.config.js
95+
# next-sitemap.config.js
96+
# next-env.d.ts
97+
# tailwind.config.js
98+
# postcss.config.js
99+
# yarn.lock
100+
# Dockerfile
101+
# CODEOWNERS
102+
# LICENSE
103+
# .gitignore
104+
# .gitmodules
105+
# .gitattributes
106+
# .eslintrc.js
107+
# .eslintignore
108+
# .zshrc
109+
# .prettierrc
110+
# .prettierignore
111+
# .dockerignore
112+
# makefile
111113

112-
- name: List all changed unauthorized files
113-
if: steps.changed-unauth-files.outputs.any_changed == 'true' || steps.changed-unauth-files.outputs.any_deleted == 'true'
114-
env:
115-
CHANGED_UNAUTH_FILES: ${{ steps.changed-unauth-files.outputs.all_changed_files }}
116-
run: |
117-
for file in ${CHANGED_UNAUTH_FILES}; do
118-
echo "$file is unauthorized to change/delete"
119-
done
120-
exit 1
114+
# - name: List all changed unauthorized files
115+
# if: steps.changed-unauth-files.outputs.any_changed == 'true' || steps.changed-unauth-files.outputs.any_deleted == 'true'
116+
# env:
117+
# CHANGED_UNAUTH_FILES: ${{ steps.changed-unauth-files.outputs.all_changed_files }}
118+
# run: |
119+
# for file in ${CHANGED_UNAUTH_FILES}; do
120+
# echo "$file is unauthorized to change/delete"
121+
# done
122+
# exit 1

components.json

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
{
2+
"$schema": "https://ui.shadcn.com/schema.json",
3+
"style": "new-york",
4+
"rsc": false,
5+
"tsx": true,
6+
"tailwind": {
7+
"config": "",
8+
"css": "src/styles/globals.css",
9+
"baseColor": "neutral",
10+
"cssVariables": true,
11+
"prefix": ""
12+
},
13+
"aliases": {
14+
"components": "@/components",
15+
"utils": "@/lib/utils",
16+
"ui": "@/components/ui",
17+
"lib": "@/lib",
18+
"hooks": "@/hooks"
19+
},
20+
"iconLibrary": "lucide"
21+
}

components/Layout.tsx

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,14 @@ const MainNavLink = ({
137137
className?: string;
138138
}) => {
139139
const router = useRouter();
140-
const isActiveNav = router.asPath.startsWith(uri);
140+
const isActiveNav =
141+
router.asPath.startsWith(uri) ||
142+
(uri === '/docs' && router.asPath.startsWith('/overview')) ||
143+
(uri === '/docs' && router.asPath.startsWith('/learn')) ||
144+
(uri === '/docs' && router.asPath.startsWith('/implementers')) ||
145+
(uri === '/docs' &&
146+
router.asPath.startsWith('/understanding-json-schema')) ||
147+
(uri === '/specification' && router.asPath.startsWith('/draft'));
141148

142149
return (
143150
<Link
@@ -343,9 +350,9 @@ const Footer = () => (
343350
</a>
344351
</div>
345352
<div className='flex flex-col text-center sm:text-left'>
346-
<a href='/overview/code-of-conduct' className='text-white mb-2'>
353+
<Link href='/overview/code-of-conduct' className='text-white mb-2'>
347354
Code of Conduct
348-
</a>
355+
</Link>
349356
</div>
350357
</div>
351358
<div className='grid grid-cols-3 md:grid-cols-1 mx-auto md:mt-8 mb-4 md:mb-0 gap-x-4 gap-y-4 md:gap-x-0 md:gap-y-0'>

components/Remember.tsx

Lines changed: 67 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -1,103 +1,106 @@
11
import React from 'react';
2+
import { Card, CardHeader, CardContent, CardTitle } from '@/components/ui/card';
3+
const linkProps = { className: 'underline', rel: 'noreferrer' };
24

3-
export const Remember = () => {
4-
return (
5-
<div className='flex mt-7 flex-col rounded-md shadow-md border border-gray-200 p-4 mt-2'>
6-
<h3
7-
className='flex text-h5mobile md:text-h5 font-semibold border-b pb-3'
5+
export const Remember = () => (
6+
<Card className='mt-7'>
7+
<CardHeader className='flex flex-row items-center space-x-3 pb-3 border-b'>
8+
<svg
9+
xmlns='http://www.w3.org/2000/svg'
10+
width='32'
11+
height='32'
12+
fill='currentColor'
13+
className='bi bi-info-circle-fill'
14+
viewBox='0 0 16 16'
15+
>
16+
<path d='M2 6a6 6 0 1 1 10.174 4.31c-.203.196-.359.4-.453.619l-.762 1.769A.5.5 0 0 1 10.5 13a.5.5 0 0 1 0 1 .5.5 0 0 1 0 1l-.224.447a1 1 0 0 1-.894.553H6.618a1 1 0 0 1-.894-.553L5.5 15a.5.5 0 0 1 0-1 .5.5 0 0 1 0-1 .5.5 0 0 1-.46-.302l-.761-1.77a1.964 1.964 0 0 0-.453-.618A5.984 5.984 0 0 1 2 6zm6-5a5 5 0 0 0-3.479 8.592c.263.254.514.564.676.941L5.83 12h4.342l.632-1.467c.162-.377.413-.687.676-.941A5 5 0 0 0 8 1z' />
17+
</svg>
18+
<CardTitle
19+
className='text-h5mobile md:text-h5'
820
data-test='remember-heading'
921
>
10-
<svg
11-
xmlns='http://www.w3.org/2000/svg'
12-
width='32'
13-
height='32'
14-
fill='currentColor'
15-
className='bi bi-info-circle-fill mr-3'
16-
viewBox='0 0 16 16'
17-
>
18-
<path d='M2 6a6 6 0 1 1 10.174 4.31c-.203.196-.359.4-.453.619l-.762 1.769A.5.5 0 0 1 10.5 13a.5.5 0 0 1 0 1 .5.5 0 0 1 0 1l-.224.447a1 1 0 0 1-.894.553H6.618a1 1 0 0 1-.894-.553L5.5 15a.5.5 0 0 1 0-1 .5.5 0 0 1 0-1 .5.5 0 0 1-.46-.302l-.761-1.77a1.964 1.964 0 0 0-.453-.618A5.984 5.984 0 0 1 2 6zm6-5a5 5 0 0 0-3.479 8.592c.263.254.514.564.676.941L5.83 12h4.342l.632-1.467c.162-.377.413-.687.676-.941A5 5 0 0 0 8 1z' />
19-
</svg>{' '}
2022
Remember
21-
</h3>
22-
<span
23-
className='inline-block mt-2 ml-2 font-medium antialiased font-semibold'
24-
data-test='contribute-docs-span'
25-
>
26-
Contribute to the JSON Schema Docs
27-
</span>
28-
<div className='mt-2 mb-2' data-test='contribute-docs-div'>
29-
Code isn't the only way to contribute to OSS; Docs are extremely import
30-
for the JSON Schema Ecosystem. At JSON Schema, We value Docs
31-
contributions as much as every other type of contribution!
23+
</CardTitle>
24+
</CardHeader>
25+
<CardContent className='space-y-6'>
26+
<div className='space-y-2'>
27+
<span
28+
className='antialiased font-semibold'
29+
data-test='contribute-docs-span'
30+
>
31+
Contribute to the JSON Schema Docs
32+
</span>
33+
<p data-test='contribute-docs-div'>
34+
Code isn't the only way to contribute to OSS; Docs are extremely
35+
import for the JSON Schema Ecosystem. At JSON Schema, We value Docs
36+
contributions as much as every other type of contribution!
37+
</p>
3238
</div>
33-
<span
34-
className='inline-block mt-3 ml-2 font-medium antialiased font-semibold'
35-
data-test='get-started-span'
36-
>
37-
To get started as a Docs contributor:
38-
</span>
39-
<div className='mt-2 mb-2'>
40-
<ol className='list-decimal mt-2 mb-4 ml-5'>
41-
<li className='mt-1 leading-7'>
39+
40+
<div className='space-y-2'>
41+
<span
42+
className='antialiased font-semibold'
43+
data-test='get-started-span'
44+
>
45+
To get started as a Docs contributor:
46+
</span>
47+
<ol className='list-decimal ml-5 space-y-2'>
48+
<li className='leading-7'>
4249
Familiarize yourself with our project's{' '}
4350
<a
44-
className='underline'
45-
rel='noreferrer'
51+
{...linkProps}
4652
href='https://github.com/json-schema-org/community/blob/main/CONTRIBUTING.md'
4753
>
4854
Contribution Guide
4955
</a>{' '}
5056
and our{' '}
5157
<a
52-
className='underline'
53-
rel='noreferrer'
58+
{...linkProps}
5459
href='https://github.com/json-schema-org/.github/blob/main/CODE_OF_CONDUCT.md'
5560
>
5661
Code of Conduct
5762
</a>
5863
.
5964
</li>
60-
<li className='mt-1 leading-7'>
65+
<li className='leading-7'>
6166
Head over to our{' '}
6267
<a
63-
className='underline'
64-
rel='noreferrer'
68+
{...linkProps}
6569
href='https://github.com/orgs/json-schema-org/projects/16'
6670
>
6771
JSON Schema Docs Board
6872
</a>
6973
.
7074
</li>
71-
<li className='mt-1 leading-7'>
75+
<li className='leading-7'>
7276
Pick an issue you would like to contribute to and leave a comment
7377
introducing yourself. This is also the perfect place to leave any
7478
questions you may have on how to get started.
7579
</li>
76-
<li className='mt-1 leading-7'>
80+
<li className='leading-7'>
7781
If there is no work done in that Docs issue yet, feel free to open a
7882
PR and get started!
7983
</li>
8084
</ol>
8185
</div>
82-
<span
83-
className='inline-block ml-2 font-medium antialiased font-semibold'
84-
data-test='contribute-docs-questions-span'
85-
>
86-
Docs contributor questions?
87-
</span>
88-
<div className='mt-2 mb-2' data-test='contribute-docs-questions-div'>
89-
Do you have a documentation contributor question? Please leave a comment
90-
in the issue or PR or join the <code>#contribute</code> or{' '}
91-
<code>#documentation</code> channels on{' '}
92-
<a
93-
className='underline'
94-
rel='noreferrer'
95-
href='https://json-schema.org/slack'
86+
87+
<div className='space-y-2'>
88+
<span
89+
className='antialiased font-semibold'
90+
data-test='contribute-docs-questions-span'
9691
>
97-
Slack
98-
</a>{' '}
99-
and leave a message.
92+
Docs contributor questions?
93+
</span>
94+
<p data-test='contribute-docs-questions-div'>
95+
Do you have a documentation contributor question? Please leave a
96+
comment in the issue or PR or join the <code>#contribute</code> or{' '}
97+
<code>#documentation</code> channels on{' '}
98+
<a {...linkProps} href='https://json-schema.org/slack'>
99+
Slack
100+
</a>{' '}
101+
and leave a message.
102+
</p>
100103
</div>
101-
</div>
102-
);
103-
};
104+
</CardContent>
105+
</Card>
106+
);

0 commit comments

Comments
 (0)