OpenBuilds / OpenBuilds-CONTROL

OpenBuilds CONTROL: Download from https://software.openbuilds.com
https://software.openbuilds.com
GNU General Public License v3.0
169 stars 104 forks source link

[FR] Add sort order to Macro's #300

Closed ImagineerNL closed 1 year ago

ImagineerNL commented 1 year ago

Since using Openbuilds control I keep growing my Macro collection. Unfortunately I don't find a way to sort them, other than just deleting and adding them in the correct order.

A really simple sorting route could be to add an index number which can be editted in the macro config. (and a pro tip to using it; start with index 10, 20, 30 etc so you have room to insert items in between ;) ) I'm even there's already some kind of index to which it currently loads the macro's; it just doesnt show them

This would greatly help in tidying up my macro screen.

sharmstr commented 1 year ago

" there's already some kind of index to which it currently loads the macro's; it just doesnt show them"

That index changes when macros are deleted so its not a reliable way to id a macro. Example

0: Macro 1 1: Macro 2 2: Macro 3

delete Macro 2

0: Macro 1 1: Macro 3

I started working on a javascript macro that would allow me to classify and arrange macros. I'll dig up the code this week and see if I cant get something working.

petervanderwalt commented 1 year ago

We have those nice Move Up or Move Down sort on the toolpaths in OpenBuilds CAM https://github.com/OpenBuilds/OpenBuilds-CAM/blob/697ad358d74c7af901b9444666a846f4fdaa9b53/js/advanced-cam-tree.js#L7 that is easier to understand than the "typing in a new index number". Probably something like hiding up/down buttons but can enable from Wizards and Tools > Macros > Enable Sorting

sharmstr commented 1 year ago

Yes. I was looking a that metroui list sort stuff. Totally forgot about the one in CAM. That should make it easier.

petervanderwalt commented 1 year ago

Any objection against removing the corner-gear-button edit, and replacing all this with Right-click context menu on each button?

image

petervanderwalt commented 1 year ago

Slated for V1.0.356 - closing issue - but feel free to comment (I did change the arrows to be left/right not up/down already since the screenshot!)

ImagineerNL commented 1 year ago

No objection as long as its clear to use.

I'd prefer left vs right, as thats how they currently flow and overflow to the next row. up/down would make that weird

sharmstr commented 1 year ago

Getting rid of the gear icon pleases me :)

petervanderwalt commented 1 year ago

No objection as long as its clear to use.

can bet you we'll have a couple old users saying "where the gear gone to" and a couple that can't figure out to right click on the button (which feels instinctive to me)

petervanderwalt commented 1 year ago

I'd prefer left vs right, as thats how they currently flow and overflow to the next row.

image

sharmstr commented 1 year ago

I have about 15 macros. Upload the code if you want me to test it out. I think my only concern is touchscreens.

petervanderwalt commented 1 year ago

Touch: Shouldnt hold = rightclick event? (not using custom events, using onContext: https://www.w3schools.com/jsref/event_oncontextmenu.asp

sharmstr commented 1 year ago

Yes it should.

sharmstr commented 1 year ago

I tried to brake it and couldnt. Great job!

ImagineerNL commented 1 year ago

Sorry, was out sick for a week; Works great! Thanks!

petervanderwalt commented 1 year ago

Hope you get (or already got) well soon! Thanks again for the suggestion!