-
Notifications
You must be signed in to change notification settings - Fork 194
Introducing 'preview_enabled' on the next_entity_type_config entity #660
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
base: main
Are you sure you want to change the base?
Introducing 'preview_enabled' on the next_entity_type_config entity #660
Conversation
@bojanbogdanovic is attempting to deploy a commit to the Chapter Three Team on Vercel. A member of the Team first needs to authorize it. |
f0439ad
to
5c0d143
Compare
This is working for us, and very much needed. Thanks @bojanbogdanovic! Here are the changes as a patch for the Next module in Drupal: |
Merge conflicts with a previous PR need to be resolved. Sorry about that! |
bebe744
to
c8f3000
Compare
Bump! Merge conflict is resolved. |
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.
This looks good to me.
When using the PR, I get errors when switching the plugin:
Something went wrong with the rebase? Because the code is not showing the text for preview but for draft mode? |
I'm not sure that I can do the changes directly in the PR. So this is the patch file that can be used for 2.x if you install the module from Drupal.org |
@timdiels1 I just pushed a fix, please take a look. |
That will fix it yes, but then again I'm seeing still references to 'draft' in code while the screenshot you provided talks about the preview. |
Yea the PR is pretty old and same goes for the screenshot, preview mode got changed to draft mode, see: 11e108a I updated the key/label to make it consistent. |
I see, thank you so much for the changes and explanation. Anyone following, please ignore my patch then and use the code changes that are now available. |
This pull request is for: (mark with an "x")
examples/*
modules/next
packages/next-drupal
starters/basic-starter
starters/graphql-starter
GitHub Issue: #496
Describe your changes
I have decoupled the site resolver from preview mode in the 'next_entity_type_config' and added a new 'preview_enabled' property. This property gives the ability to enable/disable the preview mode on specific entities. The site resolver is now also required, due the fact that it is needed for the preview mode and on demand revalidation.
Screenshot of the UI change:
