-
Notifications
You must be signed in to change notification settings - Fork 993
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
EDU-465: Angular live previewing data models #3915
base: main
Are you sure you want to change the base?
Conversation
|
|
GitGuardian id | GitGuardian status | Secret | Commit | Filename | |
---|---|---|---|---|---|
11707119 | Triggered | Generic High Entropy Secret | def49f6 | packages/sdks/snippets/angular-16-ssr/src/app/live-preview/live-preview.component.ts | View secret |
🛠 Guidelines to remediate hardcoded secrets
- Understand the implications of revoking this secret by investigating where it is used in your code.
- Replace and store your secret safely. Learn here the best practices.
- Revoke and rotate this secret.
- If possible, rewrite git history. Rewriting git history is not a trivial act. You might completely break other contributing developers' workflow and you risk accidentally deleting legitimate data.
To avoid such incidents in the future consider
- following these best practices for managing and storing secrets including API keys and other credentials
- install secret detection on pre-commit to catch secret before it leaves your machine and ease remediation.
🦉 GitGuardian detects secrets in your source code to help developers and security teams secure the modern development process. You are seeing this because you or someone else with access to this repository has authorized GitGuardian to scan your pull request.
View your CI Pipeline Execution ↗ for commit 2b68209.
☁️ Nx Cloud last updated this comment at |
packages/sdks/snippets/angular-16/src/app/live-preview/live-preview.component.ts
Outdated
Show resolved
Hide resolved
}) | ||
export class LivePreviewComponent implements OnInit, OnDestroy { | ||
content: BuilderContent | null = null; | ||
loading = true; |
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 initial loading
should be false
, and the template should have a condition: when !loading && !content
it should display "No Data."
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.
(I checked the React snippets, and this feedback also applies there)
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.
@samijaber Initially, when the data is being fetched, the loading
should be true
right? Using finally,
shouldn't we change to false
once fetchOneEntry
resolves to the content?
Since this is a live preview and we check live updates within the content entry of a data model, I believe that displaying either an error or a loading indicator is unnecessary. While this may be useful in a browser, based on what I've learned through Madison, customers are expected to use this feature exclusively within the content entry. Do you think we can remove the loading and error states altogether so that we can make the code more cleaner?
Description
This is similar to a previous PR on React that focused on live previewing the data model.
@samijaber Whenever you are back on Tuesday, please review this.