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

feat: support selector intersection #2827

Merged
merged 20 commits into from
Mar 16, 2023
Merged

feat: support selector intersection #2827

merged 20 commits into from
Mar 16, 2023

Commits on Mar 8, 2023

  1. refactor: inferred selector data structure

    - combine resolved selector data into a common type that can later be used to retrieve intersection resolve of multiple selectors
    idoros committed Mar 8, 2023
    Configuration menu
    Copy the full SHA
    b5e71b0 View commit details
    Browse the repository at this point in the history
  2. feat: add experimental flag for new selector behavior

    - not doing anything atm
    idoros committed Mar 8, 2023
    Configuration menu
    Copy the full SHA
    4254f6b View commit details
    Browse the repository at this point in the history

Commits on Mar 12, 2023

  1. Configuration menu
    Copy the full SHA
    e9fbf22 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    c734e81 View commit details
    Browse the repository at this point in the history
  3. feat: LSP support for intersection pseudo-states completion

    - selectorAstResolveMap stores inferred selectors
    - InferredSelector API for all pseudo-states
    idoros committed Mar 12, 2023
    Configuration menu
    Copy the full SHA
    9bc539a View commit details
    Browse the repository at this point in the history

Commits on Mar 13, 2023

  1. feat: infer nested selectors in native pseudo-classes

    - add `nth-child/nth-last-child` to list of pseudo-classes with nested selectors
    idoros committed Mar 13, 2023
    Configuration menu
    Copy the full SHA
    6f2be1a View commit details
    Browse the repository at this point in the history

Commits on Mar 14, 2023

  1. feat: support multi selector infer for st-scope

    - flatten `@st-scope` at the end of the transformation
    - pass nesting inferred selector between rules
    - fix lsp completions to differ selector inferred context and nesting
    idoros committed Mar 14, 2023
    Configuration menu
    Copy the full SHA
    ffb4688 View commit details
    Browse the repository at this point in the history
  2. feat: set inferred selector after universal, global and native elemen…

    …t type
    
    - native element already set the inference - just added tests
    idoros committed Mar 14, 2023
    Configuration menu
    Copy the full SHA
    7dd59bd View commit details
    Browse the repository at this point in the history
  3. refactor: move inline custom selector transform into transform process

    - tech-debt: with the flag on the transformation of inline custom selector move
    idoros committed Mar 14, 2023
    Configuration menu
    Copy the full SHA
    f9404e6 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    e3c4779 View commit details
    Browse the repository at this point in the history
  5. chore: cleanups

    - remove extra exp flag arg from ScopeContext
    - comment about InferredSelector assumptions
    - add test to check that :not() does nothing yet
    idoros committed Mar 14, 2023
    Configuration menu
    Copy the full SHA
    45e8901 View commit details
    Browse the repository at this point in the history

Commits on Mar 15, 2023

  1. chore: review cleanups

    - use "selectorNode" or "ruleOrAtRule" instead of "rule" to describe potential rule or atrule
    - remove commented imports
    - remove self referencing module import
    - changed internal transformer name from "selectorContext" to "inferredNestSelector"
    - cleaned transformer.createSelectorContext args
    - remove temp "setCurrentInferredSelectorNode"
    - unified "duplicateSelectors" pushes
    - add explanation for SelectorMultiplier.duplicateSelectors
    idoros committed Mar 15, 2023
    Configuration menu
    Copy the full SHA
    0eab5f1 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    166796a View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    04f4e8b View commit details
    Browse the repository at this point in the history
  4. fix: completion from nested selector context

    inferred selector for nesting is inferred to the ast node (&), in any other case, fallback to infer the stylesheet root
    idoros committed Mar 15, 2023
    Configuration menu
    Copy the full SHA
    3504790 View commit details
    Browse the repository at this point in the history

Commits on Mar 16, 2023

  1. fix: deep nested completions

    - fix parent selector collection order
    - clone selectors to avoid attaching inference to the wrong selector
    idoros committed Mar 16, 2023
    Configuration menu
    Copy the full SHA
    90cb7ee View commit details
    Browse the repository at this point in the history
  2. refactor: copy instead of delete when filtering collection

    - prefer to not delete fields from JS objects
    idoros committed Mar 16, 2023
    Configuration menu
    Copy the full SHA
    8128fed View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    e702f82 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    e3c8478 View commit details
    Browse the repository at this point in the history
  5. feat: support matching intersection states

    - support same stats from the same meta
    - support identical global states
    idoros committed Mar 16, 2023
    Configuration menu
    Copy the full SHA
    0ee3a64 View commit details
    Browse the repository at this point in the history