zesty-io / manager-ui

Content platform powering enterprise websites and applications
https://www.zesty.io
Other
37 stars 5 forks source link

Schema: Default Values #2662

Closed zcolah closed 2 months ago

zcolah commented 3 months ago

Problem

Multiple users have reported that they would like to not have to set the value of each field each time they create a a new content item. Instead they would like to have some default values pre-loaded into those fields so as to save time and make them more productive.

Solution

Users can set a predefined value for a field in Schema when adding a field to a model.

image

The Default value then gets loaded into an item upon it's creation on the Create Item page

image

Users can also set Default Values for existing fields via the Edit Field Modal

image

Developer Notes

The default value for a field should be saved in the Field settings JSON for a model’s field. There needs to be some research done on how we can set default values for WYSIWYG. We need to check if we can do it for the entire WYSIWYG's max character count.

For any further questions please reach out to me (Zoshua) and Randy on Slack.

Figma

https://www.figma.com/file/sqYc553YEOuIXj9IY1VAY4/Schema%3A-Rules?type=design&node-id=0%3A1&mode=dev&t=hZ7JaSqNYzD8aog4-1

agalin920 commented 3 months ago

@zcolah The example and figma only shows default value experience for text field.

What fields are in scope for this ticket? As some more complex fields might require more definition

zcolah commented 3 months ago

@zcolah The example and figma only shows default value experience for text field.

What fields are in scope for this ticket? As some more complex fields might require more definition

@agalin920 there is a design note that says this will apply to all fields except for UUID. Which fields in particular do you see needing more definition?

See note: https://www.figma.com/file/sqYc553YEOuIXj9IY1VAY4/Schema%3A-Rules?type=design&node-id=3%3A25716&mode=design&t=hZ7JaSqNYzD8aog4-1

agalin920 commented 3 months ago

@zcolah Ok figured some fields would have special treatment than just a text/number input but doesn't seem thats a requirement.

zcolah commented 3 months ago

@agalin920 What kind of special treatment was coming to mind?

agalin920 commented 3 months ago

@zcolah fields where text/number input is not an ideal form of input. e.g media, relationships, dropdown options, boolean etc etc.

zcolah commented 3 months ago

@agalin920 they would use the exact same input as used in Content. No changes or special treatment.