Closed (fixed)
Project:
Drupal core
Version:
8.5.x-dev
Component:
content_moderation.module
Priority:
Major
Category:
Task
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
25 Jul 2017 at 07:22 UTC
Updated:
11 Feb 2018 at 23:34 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
timmillwoodComment #4
timmillwoodThis can't be stable until Workflows is: #2897130: Mark workflows module as stable.
Comment #5
amateescu commentedLet's also fix the module description while we're here :)
Comment #6
timmillwoodComment #7
timmillwoodWe need to add content_moderation CSS to stable theme!
Comment #9
timmillwoodstable.info.yml needed updating with the libraries which we're overriding.
Comment #10
timmillwoodNice, now this is passing we can go back to postponed.
Comment #12
dixon_Comment #13
timmillwoodUpdating the CSS in Stable theme after changes to the moderation form in Content Moderation.
Comment #14
timmillwoodWe're waiting on #2862041: Provide useful Views filters for Content Moderation State fields and #2902187: Provide a way for users to moderate content, we'll also need #2852067: Add support for rendering computed fields to the "field" views field handler cherry picked to 8.4.x if we want Content Moderation stable in 8.4.0.
Comment #15
timmillwoodThis issue is now only blocked on #2902187: Provide a way for users to moderate content
Comment #16
webchick...not anymore. :)
Comment #17
timmillwoodComment #18
sam152 commentedCompared the CSS in #13 to HEAD, only one change since then. Updating.
Comment #19
larowlanThanks
Comment #20
timmillwoodThanks for updating that @sam152, I guess we're ready to go.
Comment #21
lauriii@plach pointed out that I should review the frontend code being marked as stable. I'm not sure what is the workflow for fixing these (maybe you want to open separate issue for that) but here's the feedback that I have:
We should remove the element type from all of the selectors. It messes up the selector specificity and makes refactoring more difficult.
Could we add a class according to the BEM standard for the li elements so we wouldn't have to nest the selector? Something like
entity-moderation-form__list-item.What is the .btn for? I couldn't find any instances of this class in core.
Comment #22
sam152 commented1. Done.
2. I've opted for "entity-moderation-form__item", sounds natural to be an "item" in an "entity-moderation-form" more than a "list item" and it kind of ties in with point 1, being agnostic of the HTML elements used.
3. This looks unused to me too. Removing.
Attaching screenshots before and after refactor. Appearance seems unchanged.
Comment #24
timmillwoodI guess it didn't apply because we were testing against 8.4.x
Comment #25
lauriiiThe changes to the CSS looks good 🤩Thank you! I'm fine from my frontend perspective with this being marked as stable.
Comment #26
xjmThis is really exciting!
The one concern I have is that the help documentation is a bit thin, both in
hook_help()and on https://www.drupal.org/docs/8/core/modules/content-moderation/overview. I think we need to do a bit of work to pass the documentation gate.Comment #27
pameeela commentedHere's a patch with some updates to hook_help... not expecting this to get it over the line but figured we could start here.
I've also made some (minor) changes to the doco pages for clarity, but I wasn't entirely sure what sections needed more information as the page is quite detailed. If anyone has input on what areas aren't sufficiently covered, let me know and I can give it a go.
Comment #28
pameeela commentedComment #29
timmillwoodThanks @pameeela, looks good.
@xjm can you add a commit credit for @esod who's been working on the documentation pages too.
Comment #30
wim leersHardcoding
/admin/help/workflowsis not going to work for sites installed in a subdirectory of a domain.You'll want to change this to
Url::fromRoute('help.page', ['name' => 'workflows'])->toString().I think it'd be good if e.g. @webchick could take a look at the updated
hook_help()in #27 and the updated docs at https://www.drupal.org/docs/8/core/modules/content-moderation/overview.Comment #32
xjmAdding @esod to the credit list (as well as saving credit for reviewers). Thanks for working on this!
Comment #33
webchickHaving Content Moderation as a stable feature for D8.5 would be amazing, so very happy to do final review and sign-off on this once the documentation changes are ready for review! Feel free to pester me mercilessly once this gets to RTBC. :D
Comment #34
wim leers@webchick: docs have been updated, but I don't know what extent of docs changes is expected/was discussed.
Comment #35
pameeela commentedUpdated patch based on #30, but, being a non-dev I couldn't work out Url::fromRoute() so I copied the approach from block.module and it seems to work. If this is not OK, I can still update the patch but would need specific instructions (or for someone else to do it right!).
In terms of the current status of the docs: I think https://www.drupal.org/docs/8/core/modules/content-moderation/overview is in a good place. It may seem a bit light but it's tricky to write pure doco for Content Moderation because it relies quite heavily on Workflows and I don't think it makes sense to duplicate what's in that doco - which is quite comprehensive IMO. So the page provides a thorough summary of how it works, via an example configuration with screenshots (someone else did this before I got involved so thanks to whoever that was).
The hook_help changes just beefed up and clarified what was there, but again are pretty light because as soon as you start to get into detail, you are documenting Workflows - not Content Moderation.
Comment #36
timmillwoodYes, this is one of the sticking points!
Comment #37
wim leersDoesn't
content_moderationdepend onworkflows? That'd mean that module exists check would always succeed!Comment #38
webchickWow, the docs at https://www.drupal.org/docs/8/core/modules/content-moderation/overview are stupendous, and way above and beyond what we require for the documentation gate. Annotated screenshots, a step-by-step scenario walkthrough (including easy-to-miss things like permissions), cross-links to https://www.drupal.org/docs/8/core/modules/workflows/overview where appropriate, etc. Great work!
Is there a reason these handbook docs (and the Workflows ones, for that matter) are still tagged as "Incomplete"? At a glance, it seems to cover everything that Content Moderation does, I guess with the exception of reviewing changes for approval, since the View for that just went in like a few days ago.
As far as hook_help() goes, the standards for that are at https://www.drupal.org/node/632280. "Uses" should centre around what admin pages the module itself exposes, so is probably fine to leave permissions out, since that applies to all modules.
I would probably recommend just copying directly from https://www.drupal.org/docs/8/core/modules/content-moderation/overview where possible vs. maintaining two sets of documentation, and shorten things up quite a bit since the handbook documentation is so comprehensive.
So maybe something like:
---
---
I was going to harp on some of the overly technical language here (e.g. "content entities") but then noticed the sample help page provided by the documentation team at https://www.drupal.org/node/632280 does the same thing.
Also confirmed that #37 is correct; Content Moderation requires Workflows so it's always gonna be there, so we can simplify this further by removing the special logic.
Comment #39
timmillwood#27 and #35 were interdiffs, so rolling them in.
Fixing #37.
Also adding suggested text from #38.
Comment #41
timmillwoodah, the failing test is due to Views not being installed for
<a href=":moderated">moderated content page</a>.I was going to just single out the link, but the whole paragraph doesn't make sense without views installed, so now it only shows if views is installed.
Comment #43
wim leersSupernit: there's some weird indentation going on here, the last 3 quoted lines are indented by two spaces too many. But … that's not enough to block RTBC!
Less of a nit: this URL will only actually work if that view (which is optional default config) is not disabled or even deleted by the user. If it isn't, this will yield a
RouteNotFoundException. This unfortunately is enough to block RTBC.Comment #44
timmillwoodok, lets check if the view is enabled?
Comment #45
wim leersWFM!
Comment #46
timmillwood#44 doesn't work if the View is deleted. It returns
Error: Call to a member function status() on null.I was going to go with one
ifand useif (\Drupal::moduleHandler()->moduleExists('views') && $moderated_content_view = View::load('moderated_content') && $moderated_content_view->status() === TRUE) {but @mpdonadio and @berdir pointed out that this is wrong and twoifs would be better.Comment #48
wim leers#46 only failed because HEAD is broken. This looks ready! :)
Comment #49
xjm(I reran tests.)
Comment #50
xjmAwesome work on the handbook documentation.
One thing though. I think in addition to the CSS, this should also be copying the relevant template into stable?
Comment #51
xjmComment #52
amateescu commentedGood point, let's do that :)
Comment #53
larowlanCan we get a follow up for a test for this, we have one for the CSS files already, we should for templates too
Comment #54
xjmAdded #2939988: Remove content moderation exclusion from StableLibraryOverrideTest for #53.
Comment #55
xjmUpdating credit.
Comment #58
xjm🎉
Comment #59
sam152 commented🎉 Awesome! Congrats everyone.
Comment #60
plachCongrats folks, awesome work!
Comment #61
larowlanThanks folks, congrats. I'll update the project page for wbm
Comment #62
xjm📣
Comment #63
pameeela commentedI've updated the docs pages to remove the Incomplete status based on #2897132-38: Mark Content Moderation module as stable.
https://www.drupal.org/docs/8/core/modules/content-moderation/overview
https://www.drupal.org/docs/8/core/modules/workflows/overview
Comment #65
rick_p commentedDespite this thread, the Experimental modules in Drupal 8 page, and the WI: Content Moderation module roadmap thread, it's still hard for end-users to determine if Content Moderation is stable or still experimental in the 8.4.5 core release. For anyone who might be looking for this information I can confirm that it is still experimental.