- Issue created by @lauriii
- First commit to issue fork.
- Merge request !10979Support content moderation state and pending drafts in Badge" → (Closed) created by berdir
- 🇨🇭Switzerland berdir Switzerland
Created a merge request that supports showing the workflow state as well as a pending draft message. no additional colors or anything, I think it might make sense if the pending draft part would be a separate badge or something that you can click, then we could hide the latest version on the more actions as well.
didn't think about responsive or anything, just laying the groundwork so people who know about frontend can pick it up from this.
- 🇬🇧United Kingdom scott_euser
Adding similar thing from within Gin to related issues.
- 🇪🇸Spain plopesc Valladolid
It looks great as an initial approach, suggested improvements could be discussed with the UX team.
Would be great to have some test coverage for this one too.
- 🇪🇸Spain plopesc Valladolid
Created a Content Moderation specific test class as part of 🐛 Navigation Top Bar should Edit button as the primary action when viewing a forward revision Active that could be useful to define the tests in this issue.
- First commit to issue fork.
- 🇨🇭Switzerland berdir Switzerland
Added basic tests for this and removed the incorrect @var, ready for review again.
I also brought this up a bit in slack here: https://drupal.slack.com/archives/C7AB68LJV/p1738147489939009.
As mentioned there, I don't have any strong feelings on color, the current ones work for me, I as mentioned, I'd rather suggest to use warning/yellow to highlight content that is not yet published than for a pending draft, that seems like a more complex change that needs design review and isn't in scope for this.
I do think it would be neat to somehow make this link to the Latest version, but that can be explored later as well and the latest version link is fairly close.
To me this seems like a useful intermediate step forward as it is.
- 🇪🇸Spain plopesc Valladolid
Checked the code and looks good to me. Added a couple of comments in the MR that might help to clean it up a bit.
Agree that a possible 3rd color for this new status might be a good addition, but we could use this MR as an intermediate step while the UX and design teams come up with a final solution.
Thank you!
- 🇨🇭Switzerland berdir Switzerland
Cleaned up DI. Note that $entityTypeManager is already unused in HEAD and was replaced with $entityRouteHelper, I'm just adding an additional load for the latest revision.
- 🇪🇸Spain plopesc Valladolid
Thank you for the clean up and taking care of the unused dependency. That was my fault, I think.
From my perspective, it can be marked as RTBC.
- 🇬🇧United Kingdom catch
Do we definitely have tests for this code path with and without content moderation enabled?
- 🇨🇭Switzerland berdir Switzerland
Yes, \Drupal\Tests\navigation\Functional\NavigationTopBarPageContextTest is a very similar test that doesn't have content_moderation enabled.
- First commit to issue fork.
- 🇨🇦Canada m4olivei Grimsby, ON
Fleshing out the issue summary to reflec the current state.
- 🇨🇦Canada m4olivei Grimsby, ON
This looks good to me!
My only hesitation would be that there isn't any design/product input here. I don't see any consideration for workflow / content moderation in the Figma designs I have seen for experience builder or otherwise. I'm not sure how much that matters. I would guess maybe some of that happened offline given @lauriii filed the issue.
- 🇪🇸Spain ckrina Barcelona
Confirming that we reviewed the designs of this in the Top Bar in with Lauri and the XB design team, so this is good to go. Thanks for checking Matt :)
Automatically closed - issue fixed for 2 weeks with no activity.