
Problem/Motivation
Preview isn't complete if it only shows a trimmed and full version below each other at the top of an admin screen.
The responsive preview module gets that, but "only" adds a couple screen sizes.
Content, produced with Drupal, can be and is being consumed by other applications.
Think about Google search result pages, Facebook timelines, ... but also notification messages via email, text, ... in whatever application and device it gets consumed.
To help a content creator optimising content for that diversity of distribution channels and presentation, we need something better and more extensible than a fixed preview button with a fixed view mode.
Proposed resolution
Turn the 'Preview' button into a button like 'Save'.
'Save' has a default state, eg. 'Safe and keep published' and 1 or more (?) alternative states, eg. 'Save and unpublish'.
It would be nice if the 'Preview' button also allows different states.
Default state (configurable): 'Preview standard website version'
Potential alternative states:
- 'Preview smartphone website version' (powered by https://drupal.org/project/responsive_preview ?)
- 'Preview Google search result' (powered by https://drupal.org/project/seo_preview ?)
- 'Preview Facebook share' (powered by https://drupal.org/project/opengraph_filter ?)
- ...
Remaining tasks
Conceptual (snugug ? dries?), usability (bohjan ?) and technical (jessebeach? wimleers?) review needed.
User interface changes
It would change the user interface, but it would reuse an existing pattern, the one from the button standing next to it.
API changes
Does this need an extra hook for contrib modules to be able to jump in?
Or do we already have all the API we need?
Related Issues
Typo3 Neos is also thinking about this, cfr. http://rasmusskjoldan.com/post/58364140673/wysiftw
Comment | File | Size | Author |
---|
Comments
Comment #1
jessebeach CreditAttribution: jessebeach commentedA great idea. At this point in time, such extended functionality will need to be explored in contrib.
Comment #2
dave reidThis would be awesome to have in contrib. Meta tag module could do an SEO preview and Open Graph preview both...
Comment #2.0
dave reidlanguage corrections
Comment #3
klonosComment #8
handkerchiefI have a question: On the node preview in drupal 8, we have only the button "Back to content editing", no save button. Is it somehow possible to add a save button that works? In the hook_form_alter or something? Or did I miss something?
This is a really important function in my opinion.
Comment #9
webchickThere's an issue for that at #1899360: Add save dropbutton next to 'Back to content editing' link in node preview., though no code written yet.
Comment #14
andypost