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(template): implement rxLet template triggers #1374

Merged
merged 16 commits into from
Aug 28, 2022
Merged

Conversation

hoebbelsB
Copy link
Member

@hoebbelsB hoebbelsB commented Jul 18, 2022

Description

template-triggers

Contextual Template States

Contextual Template States

implemented template triggers for rxLet directive

  • demo
  • docs (JSdocs)
  • unit tests

notable changes:

template-notifier

create-template-notifier no longer has responsibility for the suspense template. Instead the Suspense notification handling was improved. create-template-notifier will now emit suspense on the following occasions:

  • new observable input with a lazy or no value (if value is sync, no suspense notification is send)
    • EMPTY | NEVER included
  • static undefined

template-manager

template-manager now takes over the responsibility of managing the suspense state, if it should be processed or not. If no SuspenseTemplate is provided, the first suspense notification will be ignored as this would violate with rxLets lazy template nature. All consequent suspense notifications though will cause the $suspense context variable to toggle.

@nx-cloud
Copy link

nx-cloud bot commented Jul 18, 2022

☁️ Nx Cloud Report

CI is running/has finished running commands for commit a1be93b. As they complete they will appear below. Click to see the status, the terminal output, and the build insights.

📂 See all runs for this branch


✅ Successfully ran 4 targets

Sent with 💌 from NxCloud.

@github-actions github-actions bot added </> Template @rx-angular/template related 🔬 Experimental Experimental: Feature, docs, demos 🛠️ CDK CDK related labels Jul 18, 2022
@BioPhoton
Copy link
Member

A really nice change of responsibility!!!
Motivated to write technical docs for template Manager 😅

@github-actions github-actions bot added the 🛂 Test Unit tests, e2e tests, integration tests, test coverage label Jul 25, 2022
@hoebbelsB hoebbelsB requested a review from BioPhoton July 25, 2022 11:01
Copy link
Member

@edbzn edbzn left a comment

Choose a reason for hiding this comment

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

To be honest, I'm not sure to fully understand what happens in the template manager, but there are tests and I can understand them so it looks fine!

libs/cdk/template/src/lib/template-manager.ts Outdated Show resolved Hide resolved
libs/template/let/src/lib/let.directive.ts Outdated Show resolved Hide resolved
@edbzn
Copy link
Member

edbzn commented Aug 9, 2022

I think I screwed up the build, let me fix that

@edbzn edbzn merged commit 1634bba into main Aug 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🛠️ CDK CDK related 🔬 Experimental Experimental: Feature, docs, demos </> Template @rx-angular/template related 🛂 Test Unit tests, e2e tests, integration tests, test coverage
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants