-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Vue SDK: stop passing down unused props #3891
Conversation
🦋 Changeset detectedLatest commit: b333015 The changes in this PR will be included in the next version bump. This PR includes changesets to release 7 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
View your CI Pipeline Execution ↗ for commit b333015.
☁️ Nx Cloud last updated this comment at |
packages/sdks/mitosis.config.cjs
Outdated
'attributes: this.attributes,', | ||
'...(this.hasAttributesInput(this.Wrapper) ? { attributes: this.attributes } : {})' | ||
'attributes: this.wrappedPropsWithAttributes.attributes,', | ||
'...(this.hasAttributesInput(this.Wrapper) ? { attributes: this.wrappedPropsWithAttributes.attributes } : {})' |
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.
@sidmohanty11 I think I'm breaking this code with this PR. My change here is fine but the ngOnChanges
overrides below in this same plugin will stop working:
ngOnChanges(changes: SimpleChanges) { if (changes["attributes"] && !this.hasAttributesInput(this.Wrapper)) { this.ngAfterViewInit(); }
what do you suggest we do about this? Also, is there anything else that will start to break with this approach?
if it's too hard to make the angular SDK happy with not having an attributes
prop, i can look into bringing it back in this plugin instead
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 breaking up attributes will mean that we'll lose access to builder-id, style etc so now we'll have to attach all props as HTML attributes and not pass them to be reactive (as inputs). Is it possible to keep the attributes key? because here:
builder/packages/sdks/mitosis.config.cjs
Lines 723 to 731 in f9b8552
ngAfterViewInit() { | |
if (!this.hasAttributesInput(this.Wrapper)) { | |
const wrapperElement = | |
this.wrapperTemplateRef.elementRef.nativeElement?.nextElementSibling; | |
if (wrapperElement) { | |
this.updateAttributes(wrapperElement, this.attributes); | |
} | |
} | |
} |
we check if that element doesn't have
attributes
as an input then we spread it out in the element
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.
else we can look for only these four: id, style, href and className as attributes and send everything else as inputs
157e72f
to
4740de2
Compare
|
GitGuardian id | GitGuardian status | Secret | Commit | Filename | |
---|---|---|---|---|---|
9071768 | Triggered | Generic High Entropy Secret | 4740de2 | packages/sdks-tests/src/specs/video-lazy-load.ts | View secret |
2708648 | Triggered | Generic High Entropy Secret | 4740de2 | examples/angular-gen2/src/environments/environment.ts | View secret |
9071769 | Triggered | Generic High Entropy Secret | 4740de2 | packages/sdks-tests/src/specs/video-lazy-load.ts | View secret |
314150 | Triggered | Generic High Entropy Secret | 4740de2 | packages/sdks/src/functions/get-content/snapshots/generate-content-url.test.ts.snap | View secret |
11707119 | Triggered | Generic High Entropy Secret | 4740de2 | packages/sdks/snippets/sveltekit/src/routes/editable-region/+page.svelte | 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 secrets safely. Learn here the best practices.
- Revoke and rotate these secrets.
- 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.
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 this needs a changeset
as the accordion VE is actually failing: https://www.loom.com/share/036fda4959c9473aa0604299097b7a64 we can skip it for now
The student has become the master |
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.
🚀
Description
https://builder-io.atlassian.net/browse/ENG-7615