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

Refactor the wiki node revision system from one node for each date to all dates in one node #10

Open
Ambient-Impact opened this issue Jul 10, 2023 · 0 comments
Labels
enhancement New feature or request

Comments

@Ambient-Impact
Copy link
Member

Ambient-Impact commented Jul 10, 2023

The current system is unnecessarily complicated for content authors to deal with, and also makes it more difficult to implement things like advanced editorial workflows as described in #11. Most of our pages don't differ very much and what changes do exist can be reasonably implemented as something marked up within a single node's content, where editors can define blocks that are only to be shown for a certain date range.

Implementation

Markup

Something like a new <date start="xxx end=""xxx"> element seems like the best way to handle this, where it wraps content (paragraphs, media, etc.) and that content is only shown for the date range specified; if either the start or end dates are omitted, that will indicate the content is to be shown from the first date or to the last date, respectively.

Displaying revisions

Since we can no longer expect one wiki node to equal one defined date, this brings up the question of how to display each revision in a cacheable way that has a meaningful path like the current wiki/<year>/<month>/<day>/<title> paths; given the number of dates, it would be really cumbersome to set up individual view modes for every date, even though that would technically work; a better solution is probably to implement a custom route and controller to display a given wiki node, with the date parts in the URL now becoming real arguments; implementing a custom controller like this would also be a step closer to implementing a reliable render warmer as described in neurocracy/drupal-omnipedia-warmer#1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: Todo
Development

No branches or pull requests

1 participant