Navigation Menu

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

feat: import of @angular/service-worker #17276

Closed
wants to merge 366 commits into from

Conversation

alxhub
Copy link
Member

@alxhub alxhub commented Jun 6, 2017

Imports the existing repository (without history) from
https://github.com/angular/mobile-toolkit. Sets up the
package to build using build.sh and to run unit tests
as part of test.sh. An integration test is also added,
wrapping the SW e2e test so that npm run test works.

juliemr and others added 30 commits May 22, 2017 12:19
…ular#16860)

`flush()` can now be used from within fakeAsync tests to simulate moving
time forward until all macrotask events have been cleared from the
event queue.
…16791)

Add source location as a note tag as `<note category="location">path/to/file.ts:start_line[,end_line]</note>`.
`[,end_line]` part is optional and specified only if the end line is different from the start line.

Fixes  angular#16531
…filePath (angular#16832).

The goal of this change is to simplify the emitters,
as we will soon create a new one to emit TypeScript nodes directly.
This is in preparation for creating typescript nodes
directly from `OutputAst` nodes.
Using the global reflector made it impossible
to compile multiple programs at the same time.
AOT compilation can be executed synchronously now,
if the `ReosurceLoader` returns a string directly
(and no `Promise`).
This is required as e.g. `token` from `@Inject` is
accessed in string form via makeParamDecorator
but as a property in the `ReflectiveInjector`.

Closes angular#16889 as this is a more general fix.
…ry files (angular#16963)

These files are needed so that:
- user code can compile even without real codegen
- as tsc transformers cannot create but only change existing files
  in the transformation pipeline.
If there is a `TopBarNarrow` nav view then use this when the screen is narrow.
Otherwise just use the normal `TopBar`.

This commit also creates such a narrow topbar view where the "Docs" item is
in a different position

Closes angular#16940
* refactor(aio): use explicit CSS class for TOC container

This makes the styling less fragile to changes in the HTML

* fix(aio): schedule TocComponent.activeIndex updates via AsapScheduler

We use the `asap` scheduler because updates to `activeItemIndex` are triggered by DOM changes,
which, in turn, are caused by the rendering that happened due to a ChangeDetection.

Without asap, we would be updating the model while still in a ChangeDetection handler,
which is disallowed by Angular.

* refactor(aio): do not instantiate floating ToC if not displayed

* feat(aio): display the h1 at the top of the floating TOC

Closes angular#16900

* refactor(aio): combine the TOC booleans flags into a "type" state

* refactor(aio): remove unnecessary `hostElement` property

* fix(aio): ensure that transition works on TOC

* fix(aio): use strict equality in ToC template
…s them. (angular#16899)

This is especially important for library authors, as they will
not reference the .ngfactory.ts files.

Fixes angular#16741
…creen (angular#17001)

The `TopBarNarrow` now only shows a single top level container, "About Angular",
and the original `TopBar` items will be children of this container.

The `TopBarNarrow` styling is changed to match the rest of the `SideNav`.
this means we'll be temporarily duplicating the helpers (onces included via scripts
and secondly imported via es imports) - once rxjs, core and material migrate over
to tslib, we can drop the scripts/global dupe.
@mary-poppins
Copy link

You can preview b267b24 at https://pr17276-b267b24.ngbuilds.io/.

@mary-poppins
Copy link

You can preview 1b30a81 at https://pr17276-1b30a81.ngbuilds.io/.

@googlebot
Copy link

We found a Contributor License Agreement for you (the sender of this pull request), but were unable to find agreements for the commit author(s). If you authored these, maybe you used a different email address in the git commits than was used to sign the CLA (login here to double check)? If these were authored by someone else, then they will need to sign a CLA as well, and confirm that they're okay with these being contributed to Google.
In order to pass this check, please resolve this problem and have the pull request author add another comment and the bot will run again.

@googlebot googlebot added cla: no and removed cla: yes labels Jul 4, 2017
@mary-poppins
Copy link

You can preview 5c3f29a at https://pr17276-5c3f29a.ngbuilds.io/.

@mary-poppins
Copy link

You can preview 712c269 at https://pr17276-712c269.ngbuilds.io/.

@googlebot
Copy link

CLAs look good, thanks!

@googlebot googlebot added cla: yes and removed cla: no labels Jul 6, 2017
@@ -0,0 +1,284 @@
/** @experimental */
export interface BootstrapOptions {
Copy link
Contributor

Choose a reason for hiding this comment

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

currently we document these within the class/function signature


/** @experimental */
export declare class NgswModule {
static register(script: string, opts?: RegistrationOptions): ModuleWithProviders;
Copy link
Contributor

Choose a reason for hiding this comment

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

RegistrationOptions doesn't exist. did you forget to inline this type after you removed it?

constructor(sw: NgswCommChannel);
requestSubscription(options: {
serverPublicKey: string;
}): Promise<PushSubscription>;
Copy link
Contributor

Choose a reason for hiding this comment

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

PushSubscription is not a public type. inline or export and prefix with ngsw?

export declare class NgswUpdate {
readonly activated: Observable<NgswUpdateActivatedEvent>;
readonly available: Observable<NgswUpdateAvailableEvent>;
readonly version: Observable<NgswAppVersion | null>;
Copy link
Contributor

Choose a reason for hiding this comment

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

could we rename this to currentVersion?

@IgorMinar
Copy link
Contributor

@alxhub can you rebase this PR plz?

@jo3d3v
Copy link

jo3d3v commented Aug 28, 2017

Is this PR planned for angular 5 or later? It would be nice to know, when mobile toolkit (or parts) is merged in the main repo. I plan to build up different PWAs on that module.
While playing with mobile toolkit I identified different enhancements or extensions. (Posted in angular/mobile-toolkit#138 (comment)) I would like to support this ideas with appropriate PRs on that module.

@somombo
Copy link

somombo commented Oct 1, 2017

In light of #19274 is this PR still in the works?

@alxhub alxhub closed this Oct 4, 2017
@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 Sep 12, 2019
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.

None yet