Skip to content

build: examples not working in dev app #17166

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

Merged
merged 1 commit into from
Sep 23, 2019

Conversation

crisbeto
Copy link
Member

Fixes a couple of issues related to examples in the dev app:

  1. The path mappings for all the new example entry points (e.g. @angular/material-examples/material/button) weren't being configured in the System config which meant that any page that consumes any of the examples would break. These changes make it so that whenever we configure a new entry point we automatically configure its examples.
  2. The popover-edit examples were placed under the stable cdk and material example packages which is incorrect, because popover-edit itself is still experimental. These changes add new cdk-experimental and material-experimental packages under material-examples for consistency with the rest of the repo and so that we don't end up accidentally publishing these examples.

@crisbeto crisbeto added P2 The issue is important to a large percentage of users, with a workaround pr: merge safe target: patch This PR is targeted for the next patch release labels Sep 22, 2019
@crisbeto crisbeto requested a review from jelbourn as a code owner September 22, 2019 08:13
@googlebot googlebot added the cla: yes PR author has agreed to Google's Contributor License Agreement label Sep 22, 2019
Copy link
Member

@devversion devversion left a comment

Choose a reason for hiding this comment

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

The reason the cdk-experimental and material-experimental examples were under the the non-experimental package was that we don't need to handle more rollup globals in the examples. Though I agree that it is more clean to move them under {cdk,material}-experimental.

Also on a note: I don't think that any examples will be used by accident. We still need to explicitly wire them up in the docs.

Anyway, the change in general looks good, but it looks like you forgot the rollup globals for the examples in the packages.bzl. Can you add the ones for the experimental packages? otherwise the docs-content will be broken. Validation for these is planned in #17108.

Fixes a couple of issues related to examples in the dev app:
1. The path mappings for all the new example entry points (e.g. `@angular/material-examples/material/button`) weren't being configured in the System config which meant that any page that consumes any of the examples would break. These changes make it so that whenever we configure a new entry point we automatically configure its examples.
2. The `popover-edit` examples were placed under the stable `cdk` and `material` example packages which is incorrect, because `popover-edit` itself is still experimental. These changes add new `cdk-experimental` and `material-experimental` packages under `material-examples` for consistency with the rest of the repo and so that we don't end up accidentally publishing these examples.
@crisbeto crisbeto requested a review from a team as a code owner September 22, 2019 16:38
@crisbeto
Copy link
Member Author

Updated the Rollup globals to include the experimental packages. Also FWIW, what I meant with exposing something by accident is that if we decided in the future to just render out all available examples rather than maintaining the list manually.

@devversion devversion added pr: lgtm action: merge The PR is ready for merge by the caretaker labels Sep 23, 2019
Copy link
Contributor

@Splaktar Splaktar left a comment

Choose a reason for hiding this comment

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

LGTM

srcRunfilePath + '/' + pkgName + '/' + entryPoint;
packagesConfig[srcRunfilePath + '/' + pkgName + '/' + entryPoint] = {main: 'index.js'};
}
var name = entryPoint ? pkgName + '/' + entryPoint : pkgName;
Copy link
Contributor

Choose a reason for hiding this comment

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

This certainly helps simplify things 👍

@jelbourn jelbourn merged commit 0b72461 into angular:master Sep 23, 2019
jelbourn pushed a commit to jelbourn/components that referenced this pull request Sep 24, 2019
Fixes a couple of issues related to examples in the dev app:
1. The path mappings for all the new example entry points (e.g. `@angular/material-examples/material/button`) weren't being configured in the System config which meant that any page that consumes any of the examples would break. These changes make it so that whenever we configure a new entry point we automatically configure its examples.
2. The `popover-edit` examples were placed under the stable `cdk` and `material` example packages which is incorrect, because `popover-edit` itself is still experimental. These changes add new `cdk-experimental` and `material-experimental` packages under `material-examples` for consistency with the rest of the repo and so that we don't end up accidentally publishing these examples.

(cherry picked from commit 0b72461)
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Oct 24, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
action: merge The PR is ready for merge by the caretaker cla: yes PR author has agreed to Google's Contributor License Agreement P2 The issue is important to a large percentage of users, with a workaround target: patch This PR is targeted for the next patch release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants