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: import custom component from local directory #182

Merged
merged 1 commit into from
Nov 2, 2021
Merged

Conversation

dpilch
Copy link
Contributor

@dpilch dpilch commented Nov 1, 2021

Custom components attempted to import from amplify-ui rather than a local import.

  • Custom components use local import
  • Add support for default imports on import collection
  • Move custom component related renderer function to CustomComponentRenderer
  • Retain unofficial support of all primitives

).toMatchSnapshot();
});

it('should render declarations', () => {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I was worried the local imports would break the type declarations, but this appears to be working fine.

@dpilch dpilch force-pushed the fix-custom branch 2 times, most recently from 8859b39 to 7d042cf Compare November 1, 2021 21:48
@frimfram
Copy link
Contributor

frimfram commented Nov 1, 2021

  • what is the difference between findChildOverrides and getChildOverrrides?
  • is findChiildOverrides available in amplify-ui already? if not, it may result in errors

@dpilch
Copy link
Contributor Author

dpilch commented Nov 1, 2021

  1. I'm not sure. Waiting for a response from Hector. Going based on the golden files for this requirement.
  2. Yes

@dpilch dpilch force-pushed the fix-custom branch 5 times, most recently from 814ae84 to ae0bf24 Compare November 2, 2021 18:27
Copy link
Contributor

@alharris-at alharris-at left a comment

Choose a reason for hiding this comment

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

Pending investigation on that findChildOverrides v. getOverridesForType or whatever, but I'm also fine publishing that as a followup, since both helpers do exist.

Retain unofficial support of all primitives
@dpilch
Copy link
Contributor Author

dpilch commented Nov 2, 2021

From Chris on findChildOverrides

I think it was intended do allow nested props for child components to be fetched but after talking this morning, I believe Harrison confirmed we won’t allow that.

So we should use getOverrideProps.

I'll confirm with Harrison, but like Al said we can merge this then follow up if needed.

@dpilch dpilch marked this pull request as ready for review November 2, 2021 20:05
@dpilch dpilch merged commit 5cd1076 into main Nov 2, 2021
@dpilch dpilch deleted the fix-custom branch November 2, 2021 20:10
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.

None yet

3 participants