Make Slug field available by default #8859
Replies: 2 comments
-
Happy to submit a PR if the maintainers gave me a hint on whether/how they would want this. This could be made available as its own field type, which under the hood just uses the text field type. Alternatively, it could be a custom field component which you add and configurate just like any other custom component. |
Beta Was this translation helpful? Give feedback.
-
For anyone dropping in, this was discussed on discord. By @paulpopus "im thinking that a storybook + a pnpx payload/ui add approach like shadcn could actually be better than providing them out of a package, it would make it easier to maintain" I think whatever works - important is that basic CMS requirements can be met with ease and no hustle |
Beta Was this translation helpful? Give feedback.
-
Payload does not come with a slug field by default. You either have to build it yourself, or know where to find decent implementations that you can steal from (there are good implementations available e.g. in the website template). Depending on the desired UX, this can range from trivial to relatively complex.
Given that slugs are a highly common requirement for any CMS that is used to publish content on the web (I am aware that payload is designed to cater to needs beyond that), DX could be streamlined by simply making it available by default. Coming from other well-known CMSs, my expectation was that this would readily be available and was surprised that it was not.
Common requirements would suggest that a slug field should by default be
More complex features could include
This suggestion might be at odds with payload's philosophy of not cluttering things too much and leaving the specifics of slug implementation to the developer. But if the goal is to grab significant market share from other established CMSs that have created the expectation of no-hustle-slugs, this might be the way to go.
Beta Was this translation helpful? Give feedback.
All reactions