-
Notifications
You must be signed in to change notification settings - Fork 8
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
Schedule alert banners #159
Conversation
6a2190d
to
41ee65d
Compare
There are going to be code deprecation failures until there's a release of the project with this merged in localgovdrupal/localgov_project#53 |
…ovdrupal/localgov_alert_banner into feature/115-schedule-aler-banners
Want to get #162 merged and a 1.1.2 release out before I approve this as this should be 1.2.0 release. |
Tests are in a pickle because we're supporting both1.x and 2.x versions of LocalGov. It's probably not the problem with this module, but has come to light with the latest 2 pull requests. I've attempted a fix but hasn't worked yet. Will return to this once I've given it some thought. Maybe we don't want to be testing this module along with the distribution. Would it be better to test this module as a standalone module, not along with everything else in LocalGov Drupal? The profile would still be testing how it integrates with the rest of the modules. |
@andybroomfield Tests are now fixes so this is ready for a review when you have some time. |
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.
As there is new config here to install (Workflow) and we can't rely on sites to be using something like config distro yet, we must provide an update hook here so the workflows are installed.
@stephen-cox Yeah, I fiquired it was that still controlling the state. However it is possible to add the moderation control, which then does allow direct publishing. Maybe we should remove the set live option if the moderation controls are present as site builder might decide to just add it if it looks like it should be there and also want to add other states? |
This is a major change to how the alert banners work. I suggest it would be better to spin that out into a separate issue where it can be fully specced and discussed. |
... I've recreated this in |
Link to wider issue on alternatives localgovdrupal/localgov#324 |
I think it may be ok to pursue this method provided... I think we should aim to also drop the initial draft state, default them to the unpublish state. Its not possible to manually set that anyway so its a bit strange. The terminolgy around alert banners is 'put live' and 'remove banner' and I think the states should follow that convention (or we change the labels to publish / unpublish... but thats a commns question). |
I think this would be the ideal first candidate for having some simplified create, view transitions on the entity edit page. With the Alert Banner example we know what the the 'publish' and 'unpublish' states that are expected are to be - agree it would be good to have workflow states and so changes with appropriate naming; we expect the primary use case to just be that. So a first implementation that on the entity edit form shows the upcoming "publish' / "unpublish" transitions; or allows creating them directly with just a date field (with a fallback that if there's something more complicated already configured it links to the transitions tab). Building that for this (I'd suggest as another PR after this) would then give the foundations for something that could be used or developed further elsewhere in the site. |
So with #159 (comment) fixed, and follow-up #159 (comment) suggested this patch seems good to me; but I think with issues #171 and #151 it looks like Alert Banner - with or without this PR - needs some more route / access tests? |
@ekes @stephen-cox Think we still need to add the config for workflow as an update hook to get this merged. ... We need to resolve the other revisions issues being raised, and I think #171 is critical as you can't schedule a revision if you can't view it. |
@andybroomfield I have added an update hook to apply configuration to existing alert banner installs, so I think this is ready for another look. |
@andybroomfield are you ready approve this now? |
@finnlewis we need to resolve #171 first, @stephen-cox has partial fix in #172 which I will look to extend. |
@andybroomfield #171 is resolved and tests pass, so I think we're ready to merge this one, no? |
Yay! Nice one @andybroomfield @stephen-cox @ekes ! |
Closes #115