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: SDK7 templates #2998

Merged
merged 8 commits into from
Dec 21, 2023
Merged

feat: SDK7 templates #2998

merged 8 commits into from
Dec 21, 2023

Conversation

cazala
Copy link
Member

@cazala cazala commented Dec 16, 2023

This PR does the following:

  • Shows templates from @dcl/builder-templates package instead of loading them from the Builder Server
  • Adds support for SDK7 templates
  • Removes the creation flow of SDK6 scenes (if a user has SDK6 scenes they can still open them on the legacy builder).
  • Everything is behind feature flags (one for enabling the SDK7 templates and one to enable the create from scratch only with SDK7)

Copy link

vercel bot commented Dec 16, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
builder ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 20, 2023 8:12pm

@coveralls
Copy link

coveralls commented Dec 18, 2023

Pull Request Test Coverage Report for Build 7280241224

  • 11 of 43 (25.58%) changed or added relevant lines in 6 files are covered.
  • 2 unchanged lines in 2 files lost coverage.
  • Overall coverage increased (+0.008%) to 17.697%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/modules/project/selectors.ts 0 1 0.0%
src/modules/common/store.ts 0 2 0.0%
src/components/Modals/CustomLayoutModal/CustomLayoutModal.tsx 0 3 0.0%
src/modules/project/utils.ts 1 7 14.29%
src/modules/project/sagas.ts 2 22 9.09%
Files with Coverage Reduction New Missed Lines %
src/components/Modals/CustomLayoutModal/CustomLayoutModal.tsx 1 0.0%
src/modules/common/store.ts 1 44.58%
Totals Coverage Status
Change from base Build 7267326993: 0.008%
Covered Lines: 3646
Relevant Lines: 16548

💛 - Coveralls

@@ -27,6 +27,7 @@ export default class CustomLayoutModal extends React.PureComponent<Props, State>
handleBack = () => {
const { step } = this.state
switch (step) {
// TODO: remove this after removing the SDK7_TEMPLATES feature flag
Copy link
Member Author

Choose a reason for hiding this comment

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

I left several of these comments through the codebase to remember that once we remove the SDK7_TEMPLATES (because we won't want SDK6 templates anymore) then these are parts of the code that don't need to exist anymore (like the SDK version selection step)

Copy link
Contributor

@LautaroPetaccio LautaroPetaccio left a comment

Choose a reason for hiding this comment

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

I've left two simple comments, but it looks good!

}
}

export const getIsCreateSceneOnlySDK7Enabled = (state: RootState) => {
Copy link
Contributor

Choose a reason for hiding this comment

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

Would you mind adding a simple test for these functions?

@@ -22,7 +22,9 @@ export const getUserProjects = createSelector(getAddress, getData, (address, pro
const project = projects[projectId]
const isOwnedByUser = !!project.ethAddress && !!address && isEqual(project.ethAddress, address)
if (isOwnedByUser || project.ethAddress === null) {
record[projectId] = project
if (!project.isTemplate) {
Copy link
Contributor

Choose a reason for hiding this comment

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

What do you think about joining the conditions?

(isOwnedByUser || project.ethAddress === null) && !project.isTemplate

@cazala cazala merged commit 3b7cd98 into master Dec 21, 2023
7 checks passed
@cazala cazala deleted the feat/sdk7-templates branch December 21, 2023 12:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants