This repository has been archived by the owner on Oct 1, 2024. It is now read-only.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Support configuring Html props from react-server #1661
Support configuring Html props from react-server #1661
Changes from all commits
c0736df
d07550f
154075a
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Exporting HtmlProps and marking children as optional means I can reuse this type down in the definition of createRender's options object (https://github.com/Shopify/quilt/pull/1661/files#diff-3db342f047695e4ca4277cd8264ac3b2db110ec15ec6c34ed697ce2859004df0R57) rather than creating a new type that omits children
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A bit nitpicky but I found this a bit difficult to parse at first glance because of the line break.
Maybe split this up into 2 expressions by pulling out this ternary into a
const props
or something.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree, the linebreak after the
=
is quite unconventional. Not sure it's worth adding a level of indirection to fix this, though.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Making sure that if somebody decides to use styles/scripts then they don't clobber the assets provided by
getAssets
. I've added a test case for this.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Strictly speaking the change to assetName and renderError isn't needed as this is functionally identical, but I figure reusing the existing type is nicer than having to repeat the declarations.