Add the preview functionality when creating a node

Created on 29 November 2022, over 1 year ago
Updated 19 February 2024, 4 months ago

Problem/Motivation

When Creating a Node the Preview functionality doesn't work. So the Decoupled Preview button was made hidden in the issue https://www.drupal.org/project/decoupled_preview/issues/3324093 →

Steps to reproduce

Go to any Node create form.

Proposed resolution

It will be possible to add this Decoupled Preview functionality as Out of the Box Drupal does this. Will have to find a way to add it to our Decoupled Preview functionality and expose the data the FE sites.

Remaining tasks

User interface changes

Add back the Decoupled Preview button when Creating a node.

API changes

Data model changes

✨ Feature request
Status

Active

Version

1.0

Component

Code

Created by

🇮🇳India abhisekmazumdar India

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • 🇺🇸United States brianperry

    This seems like it will be difficult to solve due to the fact that the entity doesn't exist yet. Will be hard to find a way to create that without actually publishing something before the user expects.

    In absence of that, I wonder if we should also hide the traditional preview button here as well.

  • 🇺🇸United States apmsooner

    @brianperry - my module https://www.drupal.org/project/simple_decoupled_preview → can handle this functionality and works with existing preview button. I'd be happy to demo how it works if you need that functionality. I honestly thought your module was doing the same thing but then I came across this and realized that you must be creating a generic way to view saved content through the iframe. Let me know if I got it wrong as I've referenced your module in the alternatives on my project page to explain the difference.

  • 🇺🇸United States brianperry

    Thanks for checking in @apmsooner and sorry for the delay in response here.

    Would be happy to catch up at some point for a demo. If my memory serves me, the reason that this doesn't work for us today is related to how were keying things by uuid in the temp store. And the uuid doesn't exist yet when a new node is being created (at least based on how we were determining the UUID.) Confident that this is a solvable problem, we just haven't gotten around to it.

    In general it also seems like there are possible opportunities to put our heads together in the future. We have similar goals and also seem to have pretty similar implementations. https://www.drupal.org/project/same_page_preview → falls into that category as well, and has wanted to be able to handle decoupled use cases as well.

Production build 0.69.0 2024