ArnoldSmith86 / virtualtabletop

a virtual surface in the browser on which you can play board, dice and card games
https://virtualtabletop.io
GNU General Public License v3.0
168 stars 31 forks source link

JSON editor tree sort by type #1695

Open robartsd opened 1 year ago

robartsd commented 1 year ago

Currently the JSON editor tree view sorts widgets by id. I propose adding a toggle to switch this to sort by type. The sort by type would use widget type as the first sort key, followed by deck and cardType for Cards, finally sorting by id.

96LawDawg commented 1 year ago

I like that idea.

rogerl50 commented 1 year ago

How would you want to handle child widgets? Currently id sorting happens at each level - top level widgets sorted by id, then children of each top-level widget sorted by id.

RaphaelAlvez commented 1 year ago

How about "widgetID in parentID"

robartsd commented 1 year ago

How would you want to handle child widgets? Currently id sorting happens at each level - top level widgets sorted by id, then children of each top-level widget sorted by id.

I was just thinking sorting each level independently (as the ids are sorted).

RaphaelAlvez commented 1 year ago

How would you want to handle child widgets? Currently id sorting happens at each level - top level widgets sorted by id, then children of each top-level widget sorted by id.

I was just thinking sorting each level independently (as the ids are sorted).

Or maybe instead of sorting we could just grey out the other widgets.

Or maybe both. Put the other widgets last and in grey

ArnoldSmith86 commented 1 year ago

Or/and maybe have filter toggles for the types to hide them?