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

Support parsing <shadow> #48991

Closed
wants to merge 5 commits into from

Conversation

NickGerleman
Copy link
Contributor

Summary: This adds support for parsing the <shadow> data type. In combination with CSSCommaSeparatedList, we can now parse box shadow expressions.

Differential Revision: D68744811

@facebook-github-bot facebook-github-bot added CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. p: Facebook Partner: Facebook Partner labels Jan 28, 2025
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D68744811

NickGerleman added a commit to NickGerleman/react-native that referenced this pull request Jan 28, 2025
Summary:

This adds support for parsing the `<shadow>` data type. In combination with `CSSCommaSeparatedList`, we can now parse box shadow expressions.

Differential Revision: D68744811
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D68744811

NickGerleman added a commit to NickGerleman/react-native that referenced this pull request Jan 29, 2025
Summary:

This adds support for parsing the `<shadow>` data type. In combination with `CSSCommaSeparatedList`, we can now parse box shadow expressions.

Reviewed By: lenaic

Differential Revision: D68744811
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D68744811

NickGerleman added a commit to NickGerleman/react-native that referenced this pull request Jan 29, 2025
Summary:

This adds support for parsing the `<shadow>` data type. In combination with `CSSCommaSeparatedList`, we can now parse box shadow expressions.

Changelog: [Internal]

Reviewed By: lenaic

Differential Revision: D68744811
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D68744811

NickGerleman added a commit to NickGerleman/react-native that referenced this pull request Jan 29, 2025
Summary:

This adds support for parsing the `<shadow>` data type. In combination with `CSSCommaSeparatedList`, we can now parse box shadow expressions.

Changelog: [Internal]

Reviewed By: lenaic

Differential Revision: D68744811
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D68744811

NickGerleman added a commit to NickGerleman/react-native that referenced this pull request Jan 29, 2025
Summary:

This adds support for parsing the `<shadow>` data type. In combination with `CSSCommaSeparatedList`, we can now parse box shadow expressions.

Changelog: [Internal]

Reviewed By: lenaic

Differential Revision: D68744811
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D68744811

NickGerleman added a commit to NickGerleman/react-native that referenced this pull request Jan 29, 2025
Summary:

This adds support for parsing the `<shadow>` data type. In combination with `CSSCommaSeparatedList`, we can now parse box shadow expressions.

Changelog: [Internal]

Reviewed By: lenaic

Differential Revision: D68744811
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D68744811

NickGerleman added a commit to NickGerleman/react-native that referenced this pull request Feb 3, 2025
Summary:

This adds support for parsing the `<shadow>` data type. In combination with `CSSCommaSeparatedList`, we can now parse box shadow expressions.

Changelog: [Internal]

Reviewed By: lenaic

Differential Revision: D68744811
@NickGerleman NickGerleman force-pushed the export-D68744811 branch 2 times, most recently from e2b9f75 to 9681231 Compare February 3, 2025 22:32
NickGerleman added a commit to NickGerleman/react-native that referenced this pull request Feb 3, 2025
Summary:

This adds support for parsing the `<shadow>` data type. In combination with `CSSCommaSeparatedList`, we can now parse box shadow expressions.

Changelog: [Internal]

Reviewed By: lenaic

Differential Revision: D68744811
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D68744811

NickGerleman added a commit to NickGerleman/react-native that referenced this pull request Feb 3, 2025
Summary:

This adds support for parsing the `<shadow>` data type. In combination with `CSSCommaSeparatedList`, we can now parse box shadow expressions.

Changelog: [Internal]

Reviewed By: lenaic

Differential Revision: D68744811
…#48985)

Summary:

This reverts some of the behavior I added in D68357624, since peeking a component value is non-obviously more expensive than manually copying the parser, and needing to peek will be a pain for flat lists of values (like for box-shadow).

Changelog: [internal]

Reviewed By: lenaic

Differential Revision: D68733518
Summary:

This adds a new `consume()` function to data type parsers which passes a raw parser. This can be used for types which are compounds of other data types, where we may want to accept more than the first token.

This will be used for shadow parsing, but also fixes a hypothetical future bug with ratios. E.g. `calc(foo) / calc(bar)` may be a valid ratio, not starting with a token. We instead just want to try to parse a number data type from the stream.

The form of parsing a preserved token + rest is removed, with the assumption that anything parsing more than a single token should use compound parsing.

Changelog: [Internal]

Reviewed By: lenaic

Differential Revision: D68735370
Summary:

Adds a data type parser for a variable number of values of a given single data type (at least 1).

E.g. `CSSCommaSeparatedList<CSSShadow>` will represent the syntax of `<shadow>#` (ie the value produced by box-shadow).

Changelog: [internal]

Reviewed By: lenaic

Differential Revision: D68738165
Summary:

tsia

Changelog: [Internal]

Reviewed By: joevilches

Differential Revision: D68743950
Summary:

This adds support for parsing the `<shadow>` data type. In combination with `CSSCommaSeparatedList`, we can now parse box shadow expressions.

Changelog: [Internal]

Reviewed By: lenaic

Differential Revision: D68744811
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D68744811

@facebook-github-bot
Copy link
Contributor

This pull request has been merged in 6894678.

@facebook-github-bot facebook-github-bot added the Merged This PR has been merged. label Feb 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. fb-exported Merged This PR has been merged. p: Facebook Partner: Facebook Partner
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants