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

CMS flows #1314

Merged
merged 4 commits into from
Jun 20, 2024
Merged

CMS flows #1314

merged 4 commits into from
Jun 20, 2024

Conversation

greg-does-weather
Copy link
Collaborator

@greg-does-weather greg-does-weather commented Jun 11, 2024

What does this PR do? 🛠️

Addresses #1266 by modifying the preview/save/publish flows and action buttons accordingly. It also adds additional text below the action buttons letting users know that they cannot save/publish until they have previewed.

Flows

flowchart TD

nc["create new content or<br>edit unpublished content"]

nc --> editEntry["content editor"] --> ready{"previewed?"} -- no --> pr["click preview"] --> ppr["preview page"] --> editEntry
ready --yes--> save
ready --yes-->publish

save["click save"] --> editEntry
publish["click publish"] --> dash["content dashboard"]
Loading
flowchart TD

nc["edit published content"]

nc --> editEntry["content editor"] --> ready{"previewed?"} -- no --> pr["click preview"] --> ppr["preview page"] --> editEntry
ready --yes--> save
editEntry-->unpublish

save["click save"] --> editEntry
unpublish["click unpublish"] --> dash["content dashboard"]
Loading

Edit form action buttons

flowchart TD
subgraph sppE
  direction TB
  s1["save (enabled)"]
  pr1["preview"]
  p1["publish (enabled)"]
  s1---pr1---p1
end

subgraph sppD
  direction TB
  s2["save (disabled)"]
  pr2["preview"]
  p2["publish (disabled)"]
  s2---pr2---p2
end

subgraph spuE
  direction TB
  s3["save (enabled)"]
  pr3["preview"]
  u3["unpublish"]
  s3---pr3---u3
end

subgraph spuD
  direction TB
  s4["save (disabled)"]
  pr4["preview"]
  u4["unpublish"]
  s4---pr4---u4
end

edit[Edit node]

nc{published?}
edit --> nc

ppr1{previewed?}
ppr2{previewed?}

nc -- no --> ppr1
ppr1 -- no --> sppD
ppr1 -- yes --> sppE

nc -- yes --> ppr2
ppr2 -- no --> spuD
ppr2 -- yes --> spuE

Loading
cms.flow.mov

@greg-does-weather greg-does-weather marked this pull request as ready for review June 13, 2024 17:37
@greg-does-weather
Copy link
Collaborator Author

@kmranjo This is ready for you to look at. I attached a video, and if you'd like to play around with it, I can deploy it into my environment.

I think the only thing I did differently from the issue was combine the two help texts into one because it was easier, and once it was done I wasn't sure if it made sense to go back and split it up. (That is, the help text under the buttons says, "Content must be previewed before it can be saved or published." instead of having separate help text for each button.)

Copy link
Collaborator

@kmranjo kmranjo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks great! Thanks for the flow charts too, that is a good way of communicating everything that I hadn't even tried.

@greg-does-weather greg-does-weather changed the title cms flows CMS flows Jun 17, 2024
$form["previewRequirement"]["notice"] = [
"#type" => "markup",
"#markup" =>
"Content must be previewed before it can be saved or published.",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if we should update this for the "Save updates as draft" flow to include some help text around how one gets a new version of a draft published... is it going to "Latest version" and changing the moderation state?

Copy link
Member

@loganmcdonald-noaa loganmcdonald-noaa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Huge improvement! I reviewed the code and pulled down locally to test out. I think it's still a little funky when doing drafts/latest version publishing but we have a couple things to figure out there unrelated.

@greg-does-weather greg-does-weather merged commit a7ec06a into main Jun 20, 2024
13 checks passed
@greg-does-weather greg-does-weather deleted the mgwalker/1266-save-and-publish branch June 20, 2024 19:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants