aframevr / aframe-inspector

:mag: Visual inspector tool for A-Frame. Hit *<ctrl> + <alt> + i* on any A-Frame scene.
https://aframe.io/aframe-inspector/examples/
MIT License
654 stars 201 forks source link

Smarter organization of component properties #303

Closed feiss closed 5 years ago

feiss commented 8 years ago

Component properties are currently displayed in the order defined in the schema. That's fine, so smart ordering of properties can be set. But now they are pretty random. I propose ordering them from "most useful/used" to "less useful/used".

Also, it would be very interesting to add little additions to the schema spec (aside, apart from the official spec, as a very optional and cosmetic addition to the schema for the editor) so properties could be arranged in groups:

Now: image

After (just a quick sketch): image

The improvement in legibility would also allow to have less vertical margin between the fields.

fernandojsg commented 8 years ago

Yes, we could include a way to define this groups without modifying the current schema. The user could define it, otherwise the attributes will be shown in the same order as defined in the schema. The way to define the groups could be something like:

[
  {
    "name": "size",
    "attributes": [
      "width",
      "height",
      "width"
    ]
  },
  {
    "name": "segments",
    "attributes": [
      "segmentwidth",
      "segmentheight",
      "segmentwidth"
    ]
  }
]
ngokevin commented 8 years ago

I think alphabetical is the easiest. There will be many third-party components and geometries that we won't have much control over or insight into. Right now, it seems we could try to manually sort the properties given there aren't very components to choose from, but in the long run it's easiest to be agnostic and do alphabetical.