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

fix: use non-aliased name when importing custom components #1146

Merged
merged 1 commit into from
Feb 3, 2024

Conversation

awinberg-aws
Copy link
Contributor

Problem

References to custom components that have been aliased as part of the Figma import are not being generated with the correct component names or import paths.

Solution

Update custom component handling to use the non-aliased component name for imports instead of the node name, which matches the codegen output for the custom component itself.

Additional Notes

Links

Ticket

GitHub issue:

Other links

Verification

Manual tests

Automated tests

  • Unit tests added/updated
  • E2E tests added/updated
  • N/A - (provide a reason)
  • deferred - (provide GitHub issue for tracking)

Housekeeping

  • No non-essential console logs
  • All new files contain license notice

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@awinberg-aws awinberg-aws requested a review from a team as a code owner February 3, 2024 00:47
@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (e855cc8) 93.86% compared to head (9901df0) 93.86%.

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #1146   +/-   ##
=======================================
  Coverage   93.86%   93.86%           
=======================================
  Files         150      150           
  Lines        6114     6114           
  Branches     1838     1838           
=======================================
  Hits         5739     5739           
  Misses        357      357           
  Partials       18       18           
Files Coverage Δ
...-react/lib/amplify-ui-renderers/customComponent.ts 100.00% <100.00%> (ø)

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e855cc8...9901df0. Read the comment docs.

@awinberg-aws awinberg-aws merged commit 7d68d83 into main Feb 3, 2024
11 checks passed
@awinberg-aws awinberg-aws deleted the patch/component-alias branch February 3, 2024 02:00
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.

4 participants