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

Remove hard-coded, redundant Title field from config items. #1901

Open
ChristopherChudzicki opened this issue Jul 25, 2023 · 2 comments
Open

Comments

@ChristopherChudzicki
Copy link
Contributor

If a ConfigItem does not have a Title field, Studio automatically adds one to the top.

But, because we want Draft first (not Title) every config item already has an explicit title field.1.

Let's remove the hard-coded default field:

export function addDefaultFields(

Footnotes

  1. At least after https://github.com/mitodl/ocw-hugo-projects/pull/259 is merged

@pt2302 pt2302 self-assigned this Jul 25, 2023
@Ferdi
Copy link

Ferdi commented Jul 25, 2023

I remembers this was by design but I dont remember the details

#279

@ChristopherChudzicki
Copy link
Contributor Author

ChristopherChudzicki commented Jul 25, 2023

@Ferdi Thanks, #279 makes sense to me:

  • we base the filename on Title + things need a filename => content collections must have a Title.

I'd favor having the Studio config validator throw an error if there's no Title field rather than having the frontend modify the config. Maybe just something to keep in mind if/when we do #973—In light of #273, I don't think it's worth tackling now.

@pt2302 pt2302 removed their assignment Jul 25, 2023
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

No branches or pull requests

3 participants