Add UI for editing custom per-topic fields

Heyah,

while working on the topic permalinks plugin, I realised that there is no way for the Administrator to add, configure or edit our new awesome custom-fields other than going into the Shell or Database and do it manually. Which makes it a quite hidden feature.

I’d propose to build a general-purpose modal-dialog similar to the administration interface listing all existing custom_fields and allowing them to be edited (and maybe other fields added) by administrators. Here is an example sketch for what this could look like for a topic:

I’d propose to make this accessible through the topic wrench per topic, the administrator-wrench per post, make it part of the category-edit page and add a button for it on the user-profile-admin-page.

What do you think?

6 Likes

I like this feature, but it gets a bit tricky.

Ideally you only show it if you actually have custom fields so the backend needs to be a bit smarter and it may add some cost to querying posts.

I am not sure if I want this for V1 though.

2 Likes

Which we could do, if we make the usage of fields (at least through the editor) something plugins half-way officially register. This would also easier allow us to learn about and warn for clashes, and if we know the fields, we can do the serialisation automatically and the plugins don’t have to do the same monkey patching all the time.

I am thinking of something similar to the settings.yml, like a custom_fields.yml, which then simply would have top level sections for the models that have custom-fields support. Something along the lines of

topic:
   permalink:
      default: ''
      client: true
   template:
     <<
      - article
      - blog-post

user:
   author_bio:
     default: ""
     client: true
  author_picture:
     default: ""
     client: true
     type: url

Has anyone already created some sort of front-end workout to edit custom fields for topics?

I did a bespoke solution for a client only 3 months ago (and have done this several times before).

Locations, Topic List Previews and Events all have their own specific UI.

If you have something you need done and have budget, happy to look at it.

Can you elaborate on the requirement?