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

Parse grid spans, use csstree for placement parsing #6629

Merged
merged 9 commits into from
Nov 12, 2024
Merged

Conversation

ruggi
Copy link
Contributor

@ruggi ruggi commented Nov 11, 2024

Problem:

  1. Parsing an element placing does not use csstree
  2. Spans are not parsed nor represented

This is a purely-parsing PR, laying the groundwork to have strategies and interactions play nicely with spanning items.

Fix:

  1. Use csstree to parse grid placement
  2. Parse span coming form parsing props

Fixes #6628

Copy link
Contributor

github-actions bot commented Nov 11, 2024

Try me

Copy link

relativeci bot commented Nov 11, 2024

#15102 Bundle Size — 58.07MiB (+0.01%).

0d097d3(current) vs d1d46c1 master#15100(baseline)

Warning

Bundle contains 70 duplicate packages – View duplicate packages

Bundle metrics  Change 2 changes Regression 1 regression
                 Current
#15102
     Baseline
#15100
Regression  Initial JS 41.05MiB(+0.02%) 41.04MiB
No change  Initial CSS 0B 0B
Change  Cache Invalidation 18.7% 18%
No change  Chunks 20 20
No change  Assets 22 22
No change  Modules 4167 4167
No change  Duplicate Modules 213 213
No change  Duplicate Code 27.3% 27.3%
No change  Packages 477 477
No change  Duplicate Packages 70 70
Bundle size by type  Change 2 changes Regression 1 regression Improvement 1 improvement
                 Current
#15102
     Baseline
#15100
Regression  JS 58.07MiB (+0.01%) 58.06MiB
Improvement  HTML 7.37KiB (-0.25%) 7.39KiB

Bundle analysis reportBranch feat/parse-grid-spanProject dashboard


Generated by RelativeCIDocumentationReport issue

@ruggi ruggi marked this pull request as ready for review November 11, 2024 11:31
axis === 'column' ? container.gridTemplateColumns : container.gridTemplateRows
const maybeLineFromName =
targetTracks?.type === 'DIMENSIONS'
? targetTracks.dimensions.findIndex((dim) => dim.lineName === firstNode.name)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

beware that this is not up to spec for repeated line names! span lineName seeks for the first index starting from the placement, just lineName I think finds the lastIndex. and if the lineName is used for row-start or column-start, the lookup goes backwards!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

left a comment note so we can tackle this comprehensively in a subsequent PR

@ruggi ruggi merged commit 2daa9a7 into master Nov 12, 2024
15 checks passed
@ruggi ruggi deleted the feat/parse-grid-span branch November 12, 2024 16:01
liady pushed a commit that referenced this pull request Dec 13, 2024
**Problem:**

1. Parsing an element placing does not use `csstree`
2. Spans are not parsed nor represented

This is a purely-parsing PR, laying the groundwork to have strategies
and interactions play nicely with spanning items.

**Fix:**

1. Use `csstree` to parse grid placement
2. Parse `span` coming form parsing props

Fixes #6628
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.

parse grid span
4 participants