-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Added accesibility for default system theme to p5.js-web-editor #3371
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
base: develop
Are you sure you want to change the base?
Added accesibility for default system theme to p5.js-web-editor #3371
Conversation
To check the checkbox you can add |
Reviewed and tested the implementation of the default system theme. Verified that theme switches correctly based on system preferences across supported browsers. Ready for review and merge. |
Thanks so much for working on this! I just checked it out and can confirm that it seems to work so far! I'm not sure if this might've been mentioned somewhere already, but could you delve into why |
The migration from react-helmet to react-helmet-async was primarily done for testing purposes, but not exclusively. It also helps maintain consistency between the testing and production environments. However, I realize this is a broader change that could affect the overall code workflow. I'm happy to switch back to react-helmet if you prefer. |
Thanks for providing the additional context! In the React 19 docs, there's a section regarding Metadata, which provides more native support but also recommends using a supplementary library like As a note and reference to the work here so far, if we do decide to switch to a different metadata library, I think we could move away from using a utility file like That said, I do think the inclusion of |
I've replaced react-helmet-async with react-helmet to simplify the setup and reduce dependencies. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks so much for the update on this! I added in a few more notes/questions, but overall may look good to go soon!
@@ -1,5 +1,5 @@ | |||
import React, { useEffect, useState } from 'react'; | |||
import Helmet from 'react-helmet'; | |||
import { Helmet } from 'react-helmet'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since Helmet
is currently a default export in this file, could we preserve that or is there a specific reason to update it to be a named one?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The codebase uses named imports consistently, so introducing a default export would create inconsistency. While there's no technical limitation, named exports also align better with TypeScript, especially as the organization is migrating to it.
I'd love to hear your thoughts on this
@@ -1,7 +1,7 @@ | |||
import axios from 'axios'; | |||
import PropTypes from 'prop-types'; | |||
import React, { useEffect, useState } from 'react'; | |||
import Helmet from 'react-helmet'; | |||
import { Helmet } from 'react-helmet'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same question as above!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same with this file.
I added a button in the settings dropdown menu as "system preferences" which enables default system theme of the user to the p5.js web editor.
Fixes #3061
Changes: added accessibility for default system theme in the p5.js-web-editor
I have verified that this pull request:
npm run lint
)npm run test
)develop
branch.Fixes #3061