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

Enable support for React 18, bump Gatsby to v5 #3367

Open
wants to merge 32 commits into
base: release-22.x
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
453554e
feat: bump packages to support React 18
bradenmacdonald Dec 12, 2024
23247bd
chore: changes to migrate to gatsby-plugin-mdx v5
bradenmacdonald Dec 12, 2024
2dd6935
chore: misc gatsby GraphQL syntax updates
bradenmacdonald Dec 12, 2024
0f6004f
chore: fix markdown syntax issues ('<' and '{' now require escaping)
bradenmacdonald Dec 12, 2024
48aa670
fix: get markdown rendering of 'description' in Props Tables working …
bradenmacdonald Dec 12, 2024
60e534c
refactor: convert gatsby-config to ESM
bradenmacdonald Dec 12, 2024
11b7605
fix: add 'rehype-mdx-code-props' plugin to get live code blocks working
bradenmacdonald Dec 12, 2024
c39b6d0
chore: fix some types/props issues in 'www'
bradenmacdonald Dec 12, 2024
b1b1fc8
fix: render `inline code` correctly
bradenmacdonald Dec 12, 2024
bbf0f3f
fix: ignore/resolve some random typescript warnings
bradenmacdonald Dec 12, 2024
c92a1a2
fix: "Do not define components during render", remove duplicate props…
bradenmacdonald Dec 12, 2024
53500ee
chore: update imports for 'renderHook' (now part of @testing-library/…
bradenmacdonald Dec 12, 2024
0c7b8bb
chore: ignore usage of deprecated React API for now
bradenmacdonald Dec 12, 2024
958f617
chore: fix use of deprecated global functions in sass files
bradenmacdonald Dec 12, 2024
6946d67
fix: suppress some SASS deprecation warnings for now
bradenmacdonald Dec 12, 2024
f67d1f7
fix: limit parallelization of build to avoid OOM error during 'develop'
bradenmacdonald Dec 12, 2024
2ae234d
fix: set correct slug for each page node in gatsby
bradenmacdonald Dec 13, 2024
c5ca0a5
test: update test cases
bradenmacdonald Dec 13, 2024
e6336f5
fix: enable FAST_DEV/DEV_SSR to avoid OOM when starting Gatsby dev se…
bradenmacdonald Dec 17, 2024
1942f03
test: update test cases
bradenmacdonald Dec 17, 2024
e0a3539
fix: use the right layout for rendering .mdx pages in www/src/pages/
brian-smith-tcril Dec 17, 2024
aed4ef4
fix: error loading data for CSS Utilities page
bradenmacdonald Jan 8, 2025
8abf42c
fix: error loading data for Layout page
bradenmacdonald Jan 8, 2025
be8e10a
test: update test cases
bradenmacdonald Jan 8, 2025
1f55446
chore: fix lint issues
bradenmacdonald Jan 8, 2025
6db7604
chore: fix stylelint issues (required upgrading stylelint)
bradenmacdonald Jan 9, 2025
505c4ba
chore: update with latest release-22.x branch
bradenmacdonald Jan 9, 2025
543c9b0
fix: Gatsby webpack conflicts b/w e.g. 'useToggle.tsx' and 'useToggle…
bradenmacdonald Jan 9, 2025
2b59bb2
fix: bump gatsby-link version to avoid type error with navigate()
bradenmacdonald Jan 9, 2025
7fbf83e
fix: minor TypeScript error
bradenmacdonald Jan 9, 2025
38d736f
fix: pin @edx/browserslist-config to avoid boilerplate in icon dist f…
bradenmacdonald Jan 9, 2025
b77c6a9
fix: margins, title, live code, and hot reloading on "Layout" and "CS…
bradenmacdonald Jan 9, 2025
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
9 changes: 8 additions & 1 deletion .stylelintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,13 @@
"ignoreProperties": ["xs", "sm", "md", "lg", "xl", "xxl"]
}],
"alpha-value-notation": "number",
"color-function-notation": "legacy"
"color-function-notation": "legacy",
"import-notation": "string",
"at-rule-empty-line-before": ["always", {
"except": ["blockless-after-same-name-blockless", "first-nested"],
"ignore": ["after-comment"],
"ignoreAtRules": ["import"]
}],
"declaration-block-no-redundant-longhand-properties": null
}
}
4 changes: 2 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -802,8 +802,8 @@ The following subcomponents have been added / reworked:

* fix: update image sizing according to figma design

Co-authored-by: vlasovmichael <[email protected]>
Co-authored-by: vzadorozhnii <[email protected]>
Co-authored-by: vlasovmichael \<[email protected]\>
Co-authored-by: vzadorozhnii \<[email protected]\>



Expand Down
2 changes: 2 additions & 0 deletions build-scss.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ var coreResult = sass.renderSync({
file: './scss/core/core.scss',
outputStyle: 'compressed',
importer: tildaImporter,
// For now we can't resolve these warnings as we need to upgrade our 'bootstrap' dependency to do so:
silenceDeprecations: ['abs-percent', 'color-functions', 'import', 'mixed-decls', 'global-builtin'],
});

fs.writeFileSync('./dist/paragon.css', coreResult.css);
6 changes: 6 additions & 0 deletions example/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
module.exports = {
extends: [
'@edx/eslint-config',
],
root: true, // Don't also import the paragon eslint config in the parent directory.
};
10 changes: 3 additions & 7 deletions example/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,10 @@
"license": "ISC",
"dependencies": {
"@edx/brand": "npm:@openedx/brand-openedx@^1.2.2",
"@edx/frontend-platform": "^4.2.0",
"@edx/frontend-build": "^13.0.14",
"@edx/frontend-platform": "^8",
"@faker-js/faker": "^7.6.0",
"core-js": "^3.22.2",
"react": "^17.0.2",
"react-dom": "^17.0.2",
"regenerator-runtime": "^0.13.9"
},
"devDependencies": {
"@edx/frontend-build": "^12.8.10"
"react-dom": "^17.0.2"
}
}
4 changes: 2 additions & 2 deletions example/src/MyComponent.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React, { useState } from 'react';
import { Button, Form, Icon, Bubble, Stack, Container } from '@openedx/paragon'; // eslint-disable-line
import { FavoriteBorder } from '@openedx/paragon/icons'; // eslint-disable-line

const MyComponent = () => {
function MyComponent() {
const [value, setValue] = useState('');
const handleChange = (e) => setValue(e.target.value);
const handleClick = () => alert('Form is submitted!'); // eslint-disable-line no-alert
Expand All @@ -26,6 +26,6 @@ const MyComponent = () => {
</Form>
</Container>
);
};
}

export default MyComponent;
3 changes: 0 additions & 3 deletions example/src/index.jsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
import 'core-js/stable';
import 'regenerator-runtime/runtime';

import React from 'react';
import ReactDOM from 'react-dom';
import {
Expand Down
2 changes: 1 addition & 1 deletion icons/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"bootstrap-icons": "^1.11.3"
},
"peerDependencies": {
"react": "^16.8.6 || ^17.0.2"
"react": "^16.8.6 || ^17 || ^18"
},
"exports": {
".": {
Expand Down
Loading
Loading