Laravel-Backpack / docs

51 stars 129 forks source link

[Discussion] - list of all attributes supported by field/columns #498

Open pxpm opened 1 year ago

pxpm commented 1 year ago

Our fields and columns support an ever growing list of attributes.

Like everything, it started small: name, type, label, hint ... and we now have validationRules, pivotSelect, subfields, data_source

I was thinking that we could probably create a page similar to laravel helper methods, splitting the attributes in smaller groups like Common attributes, Select attributes or something similar.

After we have all attributes documented and with examples on the ones that make sense, we could then:

a) add that list of attributes / group of attributes to each field/column docs b) separate the fields/column docs into different pages, and have a table or something similar on each page with the attributes it supports.

I think a) would be a little bit less work ? But b) is the one I think would make the docs cleaner.

tabacitu commented 1 year ago

We already kind of do that... each field has an example with all its custom attributes. The only thing it doesn't have... is a list of all common attributes. Or at least that's what I hope all fields&columns docs have.

I agree we can do better, though, so here's what I propose we do:

  1. Create a table of "common attributes" here. Since we no longer have any "mandatory" or "recommended" attributes any more, we can bundle all of them in one category - "common attributes". With the mention "all fields support these attributes unless otherwise specified in the field docs".
  2. On each field docs, we mention it supports all common attributes (link) except X, Y, Z.

That would give us:

All without moving each field to its separate page. I do not agree to that. And I will never agree to that 😅