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

Escape JS theme configuration keys #14739

Merged
merged 1 commit into from
Oct 22, 2024

Conversation

philipp-spiess
Copy link
Member

@philipp-spiess philipp-spiess commented Oct 21, 2024

This PR fixes two issues related to how we tread JS theme keys in combination with CSS theme values:

  1. When applying JS theme keys to our Theme class, we need to ensure they are escaped in the same way as reading CSS theme keys from CSS are.
  2. When JS plugins use the theme() function to read a namespace that has values contributed to from the CSS theme and the JS theme, we need to ensure that the resulting set contains only unescaped theme keys.

For specific examples, please take a look at the test cases.

Copy link
Member Author

philipp-spiess commented Oct 21, 2024

@philipp-spiess philipp-spiess marked this pull request as ready for review October 21, 2024 15:25
@philipp-spiess philipp-spiess requested a review from a team as a code owner October 21, 2024 15:25
@philipp-spiess philipp-spiess force-pushed the 10-21-escape_js_theme_configuration_keys branch from 6e8312c to fb06b4c Compare October 21, 2024 15:29
@philipp-spiess philipp-spiess force-pushed the 10-21-escape_js_theme_configuration_keys branch 2 times, most recently from 99072ca to f99717b Compare October 22, 2024 11:34
CHANGELOG.md Outdated Show resolved Hide resolved
Copy link
Member Author

philipp-spiess commented Oct 22, 2024

Merge activity

  • Oct 22, 12:07 PM EDT: The merge label 'merge-queue' was detected. This PR will be added to the Graphite merge queue once it meets the requirements.
  • Oct 22, 12:09 PM EDT: A user added this pull request to the Graphite merge queue.
  • Oct 22, 12:30 PM EDT: The Graphite merge queue couldn't merge this PR because it had conflicts with the trunk branch.
  • Oct 22, 12:33 PM EDT: The merge label 'merge-queue' was detected. This PR will be added to the Graphite merge queue once it meets the requirements.
  • Oct 22, 12:40 PM EDT: The Graphite merge queue couldn't merge this PR because it had conflicts with the trunk branch.
  • Oct 22, 12:52 PM EDT: The merge label 'merge-queue' was detected. This PR will be added to the Graphite merge queue once it meets the requirements.
  • Oct 22, 12:56 PM EDT: A user added this pull request to the Graphite merge queue.
  • Oct 22, 1:02 PM EDT: A user merged this pull request with the Graphite merge queue.

This PR fixes two issues related to how we tread JS theme keys in combination with CSS theme values:

1. When applying JS theme keys to our `Theme` class, we need to ensure they are escaped in the same way as reading CSS theme keys from CSS are.
2. When JS plugins use the `theme()` function to read a namespace that has values contributed to from the CSS theme and the JS theme, we need to ensure that the resulting set contains only unescaped theme keys.

For specific examples, please take a look at the test cases.
@RobinMalfait RobinMalfait force-pushed the 10-21-escape_js_theme_configuration_keys branch from 730b615 to 816e730 Compare October 22, 2024 16:56
@graphite-app graphite-app bot merged commit 816e730 into next Oct 22, 2024
2 checks passed
@graphite-app graphite-app bot deleted the 10-21-escape_js_theme_configuration_keys branch October 22, 2024 17:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants