Open desigonz opened 4 years ago
I actually ran into some stuff doing research for https://github.com/cityofaustin/techstack/issues/3789, so I have more of an idea for how to tackle this now.
Easy ways to do this:
add a CSS classname like 'required-publish' to all the FieldPanels/StreamFields that need it and add some css
.required-publish:after {
content: " *";
}
Cons: tedious/labor intensive, dosen't update automatically if we no longer select a field to be required for publish
There's probably a way to link something like that up with the custom save/publish logic we have already (I'm not looking at the code, but for instance we could look through fields on the model that are indicated as required for publish and add the class name programatically (kinda like how I added all the hours fields for the location page programmaticly))
Other options: Maybe a template tag or something similar Something very Javascripty (which will be harder to maintain/avoid a flash of unstyled content like we already have with hiding translations)
Notes from dev-design sync:
As a Joplin user, I want to be able to save a page without filling out the required fields but not be able to publish it without the required fields, so that I can confidently publish my content.
See #3379 for more background
Acceptance criteria:
Outstanding issue:
Do we want any sort of visual distinction for fields that are conditionally 'or' or 'and' required?