Problem/Motivation
As part of #2875154: Clarify and document wording around drafts, revisions, published & friends @catch mentioned "I think we should completely excise 'forward revision' from our vocabulary".
Proposed resolution
Replace all uses of 'forward revision' with 'pending revision'.
Remaining tasks
- Usability team sign off that "pending revision" is the correct term for a content revision which has yet to be published changes from the currently published revision. Done, see comment #35/
User interface changes
Nope.
API changes
Two methods are renamed in an experimental module:
+++ b/core/modules/content_moderation/src/ModerationInformationInterface.php
@@ -109,9 +109,9 @@ public function getAffectedRevisionTranslation(ContentEntityInterface $entity);
- public function isForwardRevisionAllowed(ContentEntityInterface $entity);
+ public function isPendingRevisionAllowed(ContentEntityInterface $entity);
@@ -126,15 +126,15 @@ public function isForwardRevisionAllowed(ContentEntityInterface $entity);
- public function hasForwardRevision(ContentEntityInterface $entity);
+ public function hasPendingRevision(ContentEntityInterface $entity);
Data model changes
Nope.
Comments
Comment #2
timmillwoodlets see what testbot thinks.
Comment #4
timmillwoodFails seem unrelated.
Comment #5
timmillwoodI guess not all of these make sense.
Comment #6
timmillwood- Fixing #5.
- There was some code from another issue, so removing that too.
Comment #7
Aanal.addweb commented@timmillwood, Thanks for the patch, it replaces the word & there is no such place is remaining for a change. I checked your patch manually by applying in files. PFA.
Comment #8
timmillwoodThere are 13 places in core which still use
ForwardRevision.Also, I think we need sign off for this in #2875154: Clarify and document wording around drafts, revisions, published & friends.
Comment #9
timmillwoodI think this is now all instances of forward_revision, ForwardRevision, forward revision, forward-revision, etc changed to draft.
Comment #10
Aanal.addweb commented@timmillwood, Thanks for the updated patch it works well with all changed instances, I checked your patch manually by applying it module files.
PFA
Comment #11
timmillwoodThanks for the RTBC @dhwani.addweb.
Just for future reference, screenshots showing the patch applied are not needed when reviewing issues. The testbot will test the patch applies. What we're looking for in issues like this is that all uses of "forward revision" in any format are replaced. In all other issues it's generally if the code makes sense and the test coverage is complete. Unnecessary file uploads make it look as though you're trying to game the credit system, and adds confusion.
After applying the patch I did a grep for all uses of the word "forward" https://pastebin.com/W6G5usqY none of them are followed by "revision" in any format (camel case, hyphen, underscore, space etc)
So this time, I do agree that it should be RTBC.
Comment #12
amateescu commentedWhat happened to the second part of #8? :)
Comment #13
Aanal.addweb commented@timmillwood, Thanks!.. We'll take care. Also, I attached image just for the confirmation that we performed RTBC & patch works well for us.
Thanks again for future guidance.
Comment #14
timmillwood@amateescu - yes, I think it still needs some form of sign off that "draft revision" is the correct term, I wonder if this could be signed off by the usability team separate to #2875154: Clarify and document wording around drafts, revisions, published & friends, so tagging "needs usability review".
@dhwani.addweb - I'm not sure a screenshot of the patch being applied really confirms anything.
Comment #15
Bojhan commentedConsider this signed-off, it makes a lot of sense to me.
Comment #16
wim leersI was gonna say "but these are BC breaks", not realizing that all of this is in the experimental
content_moderationmodule. Which means this is fine. Yay — no dealing with messy BC layers!RTBC++
Comment #17
gábor hojtsyIf #2875154: Clarify and document wording around drafts, revisions, published & friends is still so early in discussion, how do we know if this is RTBC? I see Bojhan in #15 saying it is signed off. However, let's consider the implications for a bit. With the terminology on this issue, you can have a non-draft revision that is a draft ;) That is, you have an unpublished default revision (AKA draft) yet you don't have any draft revisions (AKA forward revisions).
Comment #18
amateescu commentedI agree with #17, let's wait for a conclusion in #2875154: Clarify and document wording around drafts, revisions, published & friends.
Comment #19
gábor hojtsy@Bojhan asked for clarification on #17. His point was that the user does not necessarily need to get different terminology based on whether the draft has a prior published variant or not. That is a good point. So my point in #17 may be moot. However, we realized another thing in the meantime...
Draft is a workflow state included in core (alongside Archived and Published). Let's say I also add a state "Approved for translation (before publication)" which is not yet published but is more reviewed than Draft (goes between Draft and Published). Now I can have a forward revision that is "Approved for translation (before publication)" and is not a "Draft". Is this a draft revision?
Comment #20
xjm@dhwani.addweb: as @timmillwood mentioned, posting screenshots of your codebase is not helpful, since the automated testing infrastructure tells us whether the patch applies correctly. So, I've removed your credit for this issue. In the future, you can get credit for issues by reading the issue to understand its purpose, and posting your review or testing of that purpose, not of whether the patch applies. Thanks!
I think it would be good to move the discussion of #17 and #19 on #2875154: Clarify and document wording around drafts, revisions, published & friends. I was also going to suggest including screenshots from this patch, but I've read it twice now and I don't actually see a single user-facing string change from this issue. So maybe not. :)
Comment #21
xjmAh. I think the reason this is happening first is that this rename is a BC break. As far as I can see this patch doesn't include any user-facing changes, at all. So the question is whether we want to be stuck providing BC for
forward_revisionin the API and machine names for things forever. I think that's why this issue was split off.Comment #22
timmillwoodThe patch in #9 updates *all* instances of "forward revision" in core, and none of them are user facing. Although some are method names, which if we are updating need to be done ASAP, otherwise we'd have to deprecate the old methods and add new ones.
Please review the page in #9 and suggest if we should go with "draft revision" keep "forward revision" or use "pending revision" as suggested in #2875154: Clarify and document wording around drafts, revisions, published & friends.
The one of the methods in question is "hasForwardRevision($entity)" which returns a boolean value if the entity has any revisions newer than the current default revision. If we change this to "hasDraftRevision()" as the patch in #9 does, would it imply it returns TRUE if the entity has a revision which has the moderation state named "draft"? Does "hasPendingRevision()" work better? Another possible term is "open"? "hasOpenRevision()"?
Comment #23
amateescu commentedWe seem to have unanimous support for replacing 'forward revision' with 'pending revision', so let's do that :)
Comment #24
timmillwoodComment #25
amateescu commentedLooks great!
Comment #26
timmillwoodWouldn't be surprised if it fails, rushed it before heading out, will fix any fails later today.
Comment #28
plachI can still find quite some forward revision occurrences in the
coredirectory:Comment #29
plachI also found a few occurrences of "draft revision" that would be worth to replace or at least validate:
Comment #30
plachWorking on those missing items.
Comment #31
plachThis should be complete. The occurrences mentioned in #29 were UI text and a test actually creating a node in "draft" state, so they are ok IMO.
Comment #32
timmillwoodThere could be a case where the error message text shown in #29 would not be the moderation state "draft" because you can rename the state to whatever you want.
Maybe we should pull in the actual state label to read "Publish or delete the latest Needs review revision to allow all workflow transitions." or just remove the state completely "Publish or delete the latest revision to allow all workflow transitions."
Comment #33
timmillwoodJust removing "draft" from the error message is best, it also aligns with the "latest revision" tab shown on the entity.
Think we're ready to go back to RTBC.
Comment #34
plachRTBC + 1
Comment #35
xjmSo even though this doesn't make any user-facing changes, I wanted to verify that we were heading in a direction that would match labeling that might be exposed to users in the future. A usability maintainer hasn't commented on this issue, but @yoroy did post on #2875154: Clarify and document wording around drafts, revisions, published & friends:
So that supports this change. Given that @amateescu also agreed in #23, we have the consensus of maintainers for Field, Entity, Content Moderation, and usability. Sounds like a quorum. :)
I didn't review the patch fully yet, but wanted to document my understanding of the signoffs first in case anyone else looks at it or has questions.
Comment #36
xjmThese are API changes; probably we should have a change record?
Everything else is tests and code comments.
I grepped for "forward" and I think I found some that were missed in:
Comment #37
amateescu commentedContent Moderation is still experimental, at least until 8.4.0-alpha1, and I don't think we write change records for experimental modules, do we?
Fixed all the other instances that you found :)
Comment #38
plachInterdiff looks good, tentatively moving back to RTBC.
yay :)
Comment #39
larowlanAdding xjm to issue credit for grepping for other instances.
Is there a resolution on #2875154: Clarify and document wording around drafts, revisions, published & friends yet? This was postponed on that but it still seems active.
If so, can we get an issue summary update over there and an RTBC (as its a policy-no-patch issue).
Updating the interface guidelines on drupal.org can then occur etc.
Comment #40
amateescu commented@larowlan, the parent issue is still open for debate on the 'revision' vs. 'version' and it probably won't make it to RTBC anytime soon, but we did get unanimous consensus for changing 'forward revision' to 'pending revision', see the second to last paragraph from #35.
Comment #42
timmillwoodComment #43
larowlanThanks @amateescu I'll update IS over there to include that.
Comment #44
amateescu commentedRerolled.
Comment #47
larowlangrep -ir --color --exclude-dir=*node_modules* forward ./core/|grep -i revision...no results.
Committed as aee577b and pushed to 8.5.x.
Cherry-picked as 566d673 and pushed to 8.4.x.
Comment #48
webchickWe chose to call this out in the release notes since it could impact contrib authors who make reference to pending revisions.