-
Notifications
You must be signed in to change notification settings - Fork 62
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
refactor(core): css-keyframes feature extraction #2215
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
idoros
added
core
Processing and transforming logic
tech debt
Updates, upgrades, stale code and work-arounds
labels
Dec 21, 2021
- `KeyframeSymbol` - `reservedKeyframes`
- analyze `@keyframes` - default generic type to `createFeature` in case no specific nodes are required
- transform `@keyframes` at-rules - transform `animation` and `ainmation-name` declarations - export keyframes JS exports - add new feature hooks: `transformResolve`, `transformAtRule`, `transformDeclaration`, and `transformJSExports` - extract scope function to `helpers/namespace`
- remove transformer commented code - remove leftover `KeyframesSymbol` that was previously copied to `css-keyframes` feature
- add test for `keframes` symbol collection - add test for local override of imported symbol - add `getKeyframesStatements()` to `css-keyframes` feature
- no public api for any atm since the API should account for multiple definitions nested in `@media` at-rules - `meta.keyframes` - internally `CSSKeyframes.get()` - `meta.mappedKeyframes` - internally `CSSKeyframes.getKeyframesStatements()` - new internal getter for all keyframes symbols - `CSSKeyframes.getAll()`
…ture - add static registration of typed imports by function (currently just for keyframes)
- `@keyframe st-global()` definition in mixin - conflicted keyframes between mixin and stylesheet takes stylaesheet resolved definitions - add ToDo for animation-name declaration from mixin symbols that cannot be resolved atm
barak007
reviewed
Dec 28, 2021
barak007
approved these changes
Dec 29, 2021
leave as is for now to be solved consistently with other escaping issues
tzachbon
approved these changes
Jan 2, 2022
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.
Looks great, left some comments
tomrav
approved these changes
Jan 2, 2022
- add `@supports` to `isInConditionalGroup`
- add comment for `safeRedeclare` on keyframes symbols - add comment about `st-import` feature `ImportTypeHook` static registration - removed `escapeIdentifier` from `helpers/escape` for now - changed all tests to use `@st-import` instead of `:import` - test typo
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
fix
@st-scope
to report under any unknown nesting with the exception of@media
and stylesheet root@keyframes
override under different@media
rules (see demo) - keep report on import override or any other collision.refactor
KeyframesSymbol
,reservedKeyFrames
)analyzeAtRule
transformResolve
(new hook) - moveresolveKeyframes
to featuretransformAtRuleNode
(new hook) - move to featuretransformDeclaration
(new hook) - moveanimation/animation-name
namespace to featuretransformJSExports
(new hook) - move to featurest-import
feature to register keyframes tost-symbol
css-keyframes
redeclare
keyframes symbol with other symbol diagnostics throughst-symbol
deprecate
meta.keyframes
meta.mappedKeyframes
tests
features/css-keyframes.spec
keyframes
symbol collectionst-global
, unknown and known keyframes mixed-inmove to backlog
meta(analyze), transform, and diagnostics
which causes a lot of duplications - having a single test-kit tool to check collected analyze data, symbols, and diagnostics + transformations and exports would help to combine specs - feat(core-test-kit): unify tool to test stylable core #2255