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

AST: Link full classNames and assigned slots in metadata #2

Merged

Conversation

Mitch-At-Work
Copy link

Previous Behavior

  • full classnames were not used which could cause conflicts and prevent linking with classname variables

New Behavior

  • use full classnames
  • added assigned slot to the metadata

@Mitch-At-Work Mitch-At-Work force-pushed the user/mifraser/ast-variables branch from ac48c18 to b5b4653 Compare January 13, 2025 17:38
@Mitch-At-Work Mitch-At-Work force-pushed the user/mifraser/ast-variables branch from b5b4653 to 7868d9b Compare January 13, 2025 17:39
@Mitch-At-Work
Copy link
Author

Build verified locally

@@ -102,15 +109,15 @@ function analyzeMergeClasses(sourceFile: SourceFile): StyleMapping[] {

node.getArguments().forEach(arg => {
// Handle direct style references
if (Node.isPropertyAccessExpression(arg) && arg.getText().startsWith('styles.')) {
mapping.baseStyles.push(arg.getName());
if (Node.isPropertyAccessExpression(arg)) {
Copy link
Owner

Choose a reason for hiding this comment

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

Nice fix, glad this was easy to unwind. Beyond styles how many other patterns do we see in code? Obviously, it's not enforced so being resilient here is crucial.

@brandonthomas brandonthomas merged commit 0d31417 into brandonthomas:ast Jan 15, 2025
4 of 13 checks passed
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.

2 participants