Skip to content

Commit 61a9c72

Browse files
Merge branch 'main' into added-hover-effect
2 parents 9a5bdb3 + f245063 commit 61a9c72

25 files changed

+610
-323
lines changed

.github/ISSUE_TEMPLATE/bug_report.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ name: 🐛 Bug
22
description: Create a report to help us improve
33
title: "🐛 Bug: "
44
labels: ["🐛 Bug", "Status: Triage"]
5+
projects: "json-schema-org/11"
56
body:
67
- type: textarea
78
attributes:

.github/ISSUE_TEMPLATE/docs.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ name: 📝 Documentation
22
description: Propose changes and improvements to JSON Schema Docs.
33
labels: ["📝 Documentation", "Status: Triage"]
44
title: "[📝 Docs]: "
5+
projects: "json-schema-org/16"
56
body:
67
- type: markdown
78
attributes:

.github/ISSUE_TEMPLATE/feature_request.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ name: ⭐️ Feature request
22
description: Suggest an idea for this project
33
title: "✨ Enhancement: "
44
labels: ["✨ Enhancement", "Status: Triage"]
5+
projects: "json-schema-org/11"
56
body:
67
- type: textarea
78
attributes:
@@ -21,7 +22,7 @@ body:
2122
description: A clear and concise description of any alternative solutions or features you've considered
2223
validations:
2324
required: false
24-
- type: input
25+
- type: textarea
2526
attributes:
2627
label: Additional context
2728
description: Add any other context about the problem here

.github/pull_request_template.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ Thanks for submitting a pull request! Please provide enough information so that
1010
<!-- E.g. a bugfix, feature, refactoring, etc… -->
1111

1212
**Issue Number:**
13+
<!-- Pick one of the below options. Please remove those which don't apply. -->
1314
- Closes #___ <!-- Replace ___ with the issue number this PR resolves -->
1415
- Related to #___ <!-- Use when the PR doesn't completely resolve an issue -->
1516
- Others? <!-- Add any additional notes or references here -->
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: Greet on User First PR Merge
2+
3+
on:
4+
pull_request:
5+
types: [closed]
6+
7+
jobs:
8+
greet:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/github-script@v4
12+
with:
13+
github-token: ${{ secrets.GITHUB_TOKEN }}
14+
script: |
15+
const prNumber = context.payload.pull_request.number;
16+
const authorLogin = context.payload.pull_request.user.login;
17+
18+
const firstPR = await github.issues.listForRepo({
19+
owner: context.repo.owner,
20+
repo: context.repo.repo,
21+
pull_requests: {
22+
state: 'closed',
23+
author: authorLogin,
24+
},
25+
});
26+
27+
console.log(firstPR.data.length);
28+
29+
if (firstPR.data.length === 1) {
30+
const greetingMessage = ` Congratulations, @${authorLogin} for your first pull request merge in this repository! 🎉🎉. Thanks for your contribution to JSON Schema! `;
31+
32+
await github.issues.createComment({
33+
owner: context.repo.owner,
34+
repo: context.repo.repo,
35+
issue_number: prNumber,
36+
body: greetingMessage
37+
});
38+
}

.github/workflows/pull-request.yml

Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
name: PR Workflow
2+
on:
3+
pull_request:
4+
types: [opened, reopened, synchronize]
5+
6+
jobs:
7+
linting_and_type-checking:
8+
name: Linting, Formatting and Type checking
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: Checkout repository
12+
uses: actions/checkout@v4
13+
14+
- name: Get yarn cache directory path
15+
id: yarn-cache-dir-path
16+
run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT
17+
18+
- name: Cache Node dependencies
19+
uses: actions/cache@v4
20+
id: yarn-cache
21+
with:
22+
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
23+
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
24+
restore-keys: |
25+
${{ runner.os }}-yarn-
26+
27+
- if: ${{ steps.yarn-cache.outputs.cache-hit != 'true' }}
28+
name: List the state of node modules
29+
continue-on-error: true
30+
run: yarn list
31+
32+
- name: Setup Node.js
33+
uses: actions/setup-node@v4
34+
with:
35+
node-version: 20
36+
37+
- name: Install dependencies
38+
run: yarn install --frozen-lockfile
39+
40+
41+
- name: Linting and Formatting checks
42+
run: yarn run lint
43+
44+
- name: Type checking
45+
run: yarn run typecheck
46+
47+
build:
48+
name: Build check
49+
runs-on: ubuntu-latest
50+
needs: linting_and_type-checking
51+
steps:
52+
- name: Checkout repository
53+
uses: actions/checkout@v4
54+
with:
55+
submodules: recursive
56+
57+
- name: Get yarn cache directory path
58+
id: yarn-cache-dir-path
59+
run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT
60+
61+
- name: Cache Node dependencies
62+
uses: actions/cache@v4
63+
id: yarn-cache
64+
with:
65+
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
66+
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
67+
restore-keys: |
68+
${{ runner.os }}-yarn-
69+
70+
- if: ${{ steps.yarn-cache.outputs.cache-hit != 'true' }}
71+
name: List the state of node modules
72+
continue-on-error: true
73+
run: yarn list
74+
75+
- name: Cache Next Build
76+
uses: actions/cache@v4
77+
with:
78+
path: |
79+
${{ steps.yarn-cache-dir-path.outputs.dir }}
80+
${{ github.workspace }}/.next/cache
81+
key: ${{ runner.os }}-nextjs-${{ hashFiles('**/yarn.lock') }}-${{ hashFiles('**/*.js', '**/*.jsx', '**/*.ts', '**/*.tsx') }}
82+
restore-keys: |
83+
${{ runner.os }}-nextjs-${{ hashFiles('**/yarn.lock') }}-
84+
85+
- name: Setup Node.js
86+
uses: actions/setup-node@v4
87+
with:
88+
node-version: 20
89+
90+
- name: Install dependencies
91+
run: yarn install --frozen-lockfile
92+
93+
- name: Build
94+
run: yarn run build
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
name: Greeting the new contributor
2+
3+
on: [pull_request, issues]
4+
5+
jobs:
6+
greeting:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- uses: actions/first-interaction@v1
10+
with:
11+
repo-token: ${{ secrets.GITHUB_TOKEN }}
12+
issue-message: >
13+
Welcome to the [JSON Schema](https://json-schema.org/) Community. We are so excited you are here! Thanks a lot for reporting your first issue!! 🎉🎉 Please make sure to take a look to our [contributors guide](https://github.com/json-schema-org/website/blob/main/CONTRIBUTING.md) if you plan on opening a pull request.
14+
For more details check out [README.md](https://github.com/json-schema-org/website?tab=readme-ov-file#-welcome-to-the-json-schema-website) file.
15+
16+
pr-message: >
17+
Welcome to the [JSON Schema](https://json-schema.org/) Community. Thanks a lot for creating your first pull request!! 🎉🎉 We are so excited you are here! We hope this is only the first of many!
18+
For more details check out [README.md](https://github.com/json-schema-org/website?tab=readme-ov-file#-welcome-to-the-json-schema-website) file.

CONTRIBUTING.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,10 @@ Generally, pull requests should be made to the `main` branch.
7878

7979
Most PRs, will be left open for a minimum of 14 days. Minor fixes may be merged more quickly once approved by a project member.
8080

81+
### Markdown Style Guide
82+
83+
Contributors to our Docs or our Blog can have a look at the [custom markdown style guide](https://json-schema.org/md-style-guide) with a list of useful markdown tags providing tools to easily create cool content that provides a better user experience.
84+
8185
## Triage
8286

8387
Please check the [triage process](https://github.com/json-schema-org/.github/blob/main/TRIAGE.md) to learn how we review and label incoming issues .

components/CarbonsAds.tsx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,12 @@ CarbonAds.stylesheet = {
115115
margin-top: 4px;
116116
color: rgb(100 116 139);
117117
}
118+
119+
@media (max-width: 1023px) {
120+
#carbonads-container {
121+
display: none;
122+
}
123+
}
118124
`,
119125
};
120126

components/JsonEditor.tsx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,11 @@ type MultipathDecoration = {
5454

5555
const META_REGEX = /^\s*\/\/ props (?<meta>{.*}).*\n/g;
5656

57+
// Prevent annoying error messages because slate is not SSR ready
58+
if (typeof process !== 'undefined' && process.browser !== true) {
59+
React.useLayoutEffect = React.useEffect;
60+
}
61+
5762
function getTextPathIndexesFromNodes(
5863
elements: CustomElement[],
5964
path: number[] = [],

0 commit comments

Comments
 (0)