Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to sort folders? #14

Open
Kebap opened this issue Jun 4, 2021 · 15 comments
Open

How to sort folders? #14

Kebap opened this issue Jun 4, 2021 · 15 comments

Comments

@Kebap
Copy link

Kebap commented Jun 4, 2021

I didn't find how to acctively influence the order of folders shown in Mudlet.

It seems like they get sorted automatically by muddler? However it's neither alphabetically by name, nor by date of creation. Maybe random? Other sorting still?

For Mudlet with scripts it seems very important to choose actively which is done initially and what order ensues. Please let me know how I can.

@demonnic
Copy link
Owner

This is a good point and not one I've honestly thought of a good workaround for, except to say that once I figure out associating code with folders it will probably also involve a fix for this.

@Kebap
Copy link
Author

Kebap commented Nov 28, 2021

Meanwhile, do you know how they are currently sorted?

@Kebap
Copy link
Author

Kebap commented Nov 29, 2021

Well it seems random to me - and what is worse, it is not consistent either. So when I muddled twice, I got different resulting orders. Am I doing it wrong?

@demonnic
Copy link
Owner

I'll have to look into it more closely, which is the only reason I didn't answer yesterday. I may be just accepting the order iterated by groovy and need to institute some form of sorting but just haven't had the time to go digging yet.

@Kebap
Copy link
Author

Kebap commented Aug 20, 2022

Are there any news here?

@demonnic
Copy link
Owner

I am in fact just accepting the order provided by Groovy, but haven't decided how best to handle enforcing an order. I've made a reminder to look into this tomorrow again and see if I can come up with a good solution. I admit it kind of fell off my radar.

@Kebap
Copy link
Author

Kebap commented Jan 13, 2023

How does Groovy sort then? Maybe you can influence that? At least having any consistent order would be most welcome.

@demonnic
Copy link
Owner

From what I can see, Groovy doesn't ensure any particular order. Certainly not one I can ascertain. It would be fairly easy to enforce alphanumeric sorting of the list. Considering doing that while I work out a way to easily set an arbitrary order via file.

@Kebap
Copy link
Author

Kebap commented Dec 8, 2023

look into this tomorrow again and see if I can come up with a good solution. I admit it kind of fell off my radar.

Any news maybe? 😊 Having an arbitrary order via file would be great!

@gesslar
Copy link

gesslar commented Jun 21, 2024

I am also interested in this and this would influence me migrating my main GUI. The order of scripts is very important, unless you can give a better way to not have to worry about the order, some programming genius? 🤗

@gesslar
Copy link

gesslar commented Jun 26, 2024

As a thought, since the json files are arrays, the order of them could be the representation?

@gesslar
Copy link

gesslar commented Jun 26, 2024

For example, this JSON

[
       {
              "isActive": "yes",
              "isFolder": "no",
              "name": "Main",
              "script": ""
       },
       {
              "isActive": "yes",
              "isFolder": "yes",
              "name": "Utils",
              "script": ""
       },
       {
              "isActive": "yes",
              "isFolder": "no",
              "name": "Number routines",
              "script": ""
       },
       {
              "isActive": "yes",
              "isFolder": "no",
              "name": "String routines",
              "script": ""
       },
       {
              "isActive": "yes",
              "isFolder": "yes",
              "name": "GMCP",
              "script": ""
       },
       {
              "isActive": "yes",
              "isFolder": "no",
              "name": "Connection",
              "script": ""
       },
       {
              "isActive": "yes",
              "isFolder": "no",
              "name": "GUI",
              "script": ""
       },
       {
              "isActive": "yes",
              "isFolder": "yes",
              "name": "Setup",
              "script": ""
       },
       {
              "isActive": "yes",
              "isFolder": "no",
              "name": "Install/Uninstall",
              "script": ""
       }
]

could result in a structure like this
image

@Kebap
Copy link
Author

Kebap commented Jun 26, 2024

For example, this JSON
could result in a structure like this

How would that JSON represent a structure like this?

  • Folder
    • Script in folder
  • Script outside folder

Or like that:

  • Folder 1
    • Script in folder 1
    • Folder 2 in folder 1
      • Script in folder 2

@gesslar
Copy link

gesslar commented Jun 26, 2024

I suppose it couldn't. sigh Oh well, back to the drawing board.

@mpconley
Copy link

To pile-on, this is also an issue for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants