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

[sitecore-jss-manifest][Nextjs] Allow component manifest definitions to define a template name #810

Merged
merged 3 commits into from
Sep 10, 2021

Conversation

ambrauer
Copy link
Contributor

Description / Motivation

When deploying manifest items to Sitecore (via jss deploy), the resulting component and datasource template use the same name (implicit dependency between them). This update adds an optional templateName which can be used for component definitions, breaking that dependency. This value will be used when creating the datasource template item in Sitecore (instead of the component name).

This allows us to prefix templates only (separately from components).

Also included:

  • Updates to the Next.js sample app with this new feature in mind (revert component names)
  • Removed filename processing from jss create prefix logic (since component files are no longer prefixed)

Testing Details

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update (non-breaking change; modified files are limited to the /docs directory)

… This allows us to break the tie between component and datasource template name (e.g. for using a prefix *only* on templates).
…ons. This allows us to keep components named without the 'JssNextWeb-' prefix.
@ambrauer ambrauer requested a review from a team September 10, 2021 19:11
@vercel
Copy link

vercel bot commented Sep 10, 2021

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/sitecore-jss/edge-e2e-styleguide/ACwjjHTMqfXCctmVud8NPqm4ivAj
✅ Preview: Failed

Copy link
Contributor

@CobyPear CobyPear left a comment

Choose a reason for hiding this comment

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

Looks like there was some extra work to do inside of generateItems etc, but why did it seem to work yesterday?
Looks good other than that question.

@ambrauer
Copy link
Contributor Author

@CobyPear We only made it through the renderings, I ran into additional errors when it got to the shared content examples.

@CobyPear CobyPear merged commit e80d4ba into dev Sep 10, 2021
@CobyPear CobyPear deleted the feature/482700-manifest-template-name branch September 10, 2021 19:49
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.

2 participants