-
Notifications
You must be signed in to change notification settings - Fork 978
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
fix[gen2][builderStudio] ENG-7646 add Builder Studio support for Gen-2 SDK #3794
Conversation
🦋 Changeset detectedLatest commit: 73bca88 The changes in this PR will be included in the next version bump. This PR includes changesets to release 8 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 73bca88.
☁️ Nx Cloud last updated this comment at |
|
GitGuardian id | GitGuardian status | Secret | Commit | Filename | |
---|---|---|---|---|---|
14200383 | Triggered | Generic High Entropy Secret | 22da0de | packages/core/src/builder.class.test.ts | View secret |
14200385 | Triggered | Generic High Entropy Secret | 22da0de | packages/core/src/builder.class.test.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 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.
queryOptions['userAttributes.urlPath'] = window.location.pathname; | ||
queryOptions['userAttributes.host'] = window.location.host; |
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.
is this how we handle on gen1 as well?
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.
Here's a loom explaining how it's happening on Gen1 SDK https://www.loom.com/share/83bd96e1d6a743639e67165c272765df
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.
thanks for explaining!
packages/sdks/src/functions/get-content/generate-content-url.ts
Outdated
Show resolved
Hide resolved
...(searchParamPreviewModel === 'BUILDER_STUDIO' && props.content | ||
? { query: { id: props.content?.id } } | ||
: {}), |
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.
could you please explain why this is necessary?
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.
for Symbols we need to pass query.id
. So for that purpose I have added this here. This PR will provide the reference https://github.com/BuilderIO/builder/pull/3752/files#diff-f1e59e260dae927ec6d6a87239e3f224080638f90af79871855dc8b5afead472
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.
should we pass this from the Symbol
level then? or I believe context has symbolId
(https://github.com/sidmohanty11/builder/blob/main/packages/sdks/src/blocks/symbol/symbol.lite.tsx/#L136)? just to ensure that query is not passed when Content is not a symbol?
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.
We can replace
...(searchParamPreviewModel === 'BUILDER_STUDIO' && props.content
? { query: { id: props.content?.id } }
: {}),
with
...(searchParamPreviewModel === 'BUILDER_STUDIO' &&
props.context?.symbolId
? { query: { id: props.context.symbolId } }
: {}),
Good catch! @sidmohanty11
Description
Builder Components not rendering in Studio Tab on Gen 2 SDK
Jira Ticket
https://builder-io.atlassian.net/browse/ENG-7646
Jira Ticket for Gen1 References
https://builder-io.atlassian.net/browse/ENG-4980
Loom
https://www.loom.com/share/063d068f6be84b54adb027b03ec14793
Loom where current changes will not give desired result
https://www.loom.com/share/6628e8caa98f4af2905abb2c6c0d4646