-
Notifications
You must be signed in to change notification settings - Fork 6.8k
build: example list outputting quoted components #13955
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
build: example list outputting quoted components #13955
Conversation
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.
LGTM. Thanks. Still way more clean than how it was initially
I saw and merged Joey's change for this first- do you still want to get this in? |
I’m not super attached to it, but it should be a bit more sustainable than constructing the JSON ourselves. |
I'll take a look if you want to rebase |
In c64503e the logic that outputs the list of components was reworked to use `JSON.stringify`. As a result, the data that is generated has the `component` inside quotes, rather than a reference to the component class itself. This breaks the demo app. The following changes add some extra logic to remove the quotes around the `component`.
8e7fa1a
to
e72ebe9
Compare
Rebased @jelbourn. |
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.
Overall LGTM, just the one question/comment.
.replace('${exampleList}', `[${exampleList}]`); | ||
.replace('${exampleComponents}', JSON.stringify(exampleComponents)) | ||
.replace('${exampleList}', `[${exampleList}]`) | ||
.replace(new RegExp(`"${quotePlaceholder}|${quotePlaceholder}"`, 'g'), ''); |
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.
The only part I am not sure I am understanding is the or
in regex here?
why are we looking for ◬|◬
instead of just ◬
since we are global matching
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.
@crisbeto add merge ready
once your ready.
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.
Note the quotes inside it. It looks for "◬|◬"
(e.g. "◬something◬"
).
In c64503e the logic that outputs the list of components was reworked to use `JSON.stringify`. As a result, the data that is generated has the `component` inside quotes, rather than a reference to the component class itself. This breaks the demo app. The following changes add some extra logic to remove the quotes around the `component`.
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
In c64503e the logic that outputs the list of components was reworked to use
JSON.stringify
. As a result, the data that is generated has thecomponent
inside quotes, rather than a reference to the component class itself. This breaks the demo app. The following changes add some extra logic to remove the quotes around thecomponent
.