Skip to content
This repository was archived by the owner on Dec 18, 2024. It is now read-only.

feat(example-viewer): support rendering additional files #516

Merged

Conversation

devversion
Copy link
Member

@devversion devversion commented Sep 8, 2018

  • Currently we only render the HTML, TS and CSS files in the view-source tab group. This is fine for most examples, but there are also examples like the form-field-custom-control that prefer to have the template of the "custom control" externally. We should support rendering these additional files in the tab group instead of just magically adding them to the external StackBlitz that will be generated.

Related to angular/components#13021

* Currently we only render the `HTML`, `TS` and `CSS` files in the view-source tab group. This is fine for most examples, but there are also examples like the `form-field-custom-control` that prefer to have the template of the "custom control" externally. We should support rendering these additional files in the tab group instead of just magically adding them to the external StackBlitz that will be generated.

Related to #13021
devversion added a commit to devversion/material2 that referenced this pull request Sep 8, 2018
* Removes a workaround that allowed the secondary component of the form-field-custom-control to use the primary asset files (`form-field-custom-control-example.(html|css` are reserved for the primary example component). This workaround caused the example to not render properly inside of StackBlitz.
* Fixes that the build-example-module task does not properly detect stylesheet additional files.

Fixes angular#13021. Depends on angular/material.angular.io#516
@jelbourn
Copy link
Member

Can you add a screenshot of what this looks like for an example with multiple assets?

@devversion
Copy link
Member Author

image

Is that screenshot sufficient? There is also another tab for the my-tel-input-example.css file (that is invisible here)

devversion added a commit to devversion/material2 that referenced this pull request Sep 11, 2018
* Removes a workaround that allowed the secondary component of the form-field-custom-control to use the primary asset files (`form-field-custom-control-example.(html|css` are reserved for the primary example component). This workaround caused the example to not render properly inside of StackBlitz.
* Fixes that the build-example-module task does not properly detect stylesheet additional files.

Fixes angular#13021. Depends on angular/material.angular.io#516
Copy link
Member

@jelbourn jelbourn left a comment

Choose a reason for hiding this comment

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

LGTM

@jelbourn jelbourn merged commit d6bbac9 into angular:master Sep 11, 2018
jelbourn pushed a commit to angular/components that referenced this pull request Sep 11, 2018
* Removes a workaround that allowed the secondary component of the form-field-custom-control to use the primary asset files (`form-field-custom-control-example.(html|css` are reserved for the primary example component). This workaround caused the example to not render properly inside of StackBlitz.
* Fixes that the build-example-module task does not properly detect stylesheet additional files.
* Depends on angular/material.angular.io#516
Fixes #13021
jelbourn pushed a commit to angular/components that referenced this pull request Sep 11, 2018
* Removes a workaround that allowed the secondary component of the form-field-custom-control to use the primary asset files (`form-field-custom-control-example.(html|css` are reserved for the primary example component). This workaround caused the example to not render properly inside of StackBlitz.
* Fixes that the build-example-module task does not properly detect stylesheet additional files.
* Depends on angular/material.angular.io#516
Fixes #13021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants