[+][SUG][ED] GUI Style Manager (for styles.ini list sorting)

Started by Strato Incendus, November 26, 2020, 12:08:10 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

namida

Quote from: Proxima on September 30, 2021, 09:43:54 PM
No, this proposal would prevent customising the styles.ini to make all the styles alphabetical. It would enforce grouping them by author first, with the authors being in alphabetical order.

If this is a huge concern, it should be very easy to add an option to not group by author (though I would insist that group-by-author remain the default setting, much like how it is in the default styles.ini). Downside of course being that the per-author ordering would no longer be viable, so it'd have to just be a strict "all styles in alphabetical order" setting.
My projects
2D Lemmings: NeoLemmix (engine) | Lemmings Plus Series (level packs) | Doomsday Lemmings (level pack)
3D Lemmings: Loap (engine) | L3DEdit (level / graphics editor) | L3DUtils (replay / etc utility) | Lemmings Plus 3D (level pack)
Non-Lemmings: Commander Keen: Galaxy Reimagined (a Commander Keen fangame)

Dullstar

Another thing that would be lost would be the ability to alter the order to pin your favorite styles to the top. I'd suggest allowing styles.ini to be used to modify the order, but also add the new thing and use it when styles.ini is not present/doesn't cover all styles, in which case styles.ini's styles should be listed first, followed by all other styles in the proposed ordering. Essentially, this allows the user to use styles.ini to pin favorites and change a style's display name. The benefit of re-using styles.ini for this instead of a new file is that it allows people to copy over their current custom ordering settings. If needed, update the styles.ini specification to be a bit more user-friendly: if the Name parameter in styles.ini is currently syntactically required, drop this requirement (take it from the newly proposed file if not present). If Order is syntactically required, I'd suggest allowing leaving the value out to automatically assign the number (generally, default to going in the order they appear in the file, allowing the Order parameter to override this).

TL;DR Use the new thing when styles.ini isn't present/is incomplete; for user order customization, I suggest making styles.ini more user friendly to edit (assuming it's not already done) in a way that's backwards compatible with existing styles.ini files; styles referenced by styles.ini are placed before styles that are only referenced the new way.

Perhaps this doesn't need to be a new file, though. Might it be possible to stuff this into theme, or something?

Apjjm

Regarding the pinned styles - You could potentially add PinnedStyle1 ... PinnedStyleN settings to NLEditorSettings.ini which can optionally be set. These will always appear at the top in numerical order (and by default could be the orig_ styles?) then all styles would otherwise be grouped by author unless they were 'pinned'?
My Level Packs: Quartet

Proxima

Thinking about this some more, I've come to the conclusion that replacing the system really is essential. We are heading for the final version of NL, when there will be no more updates to the engine, but content will continue to be created. Suppose someone makes a new style -- they can add it to their own copy of styles.ini, but it won't be on anyone else's copy, unless we decide that downloading a new style should include the updated styles.ini. And that's not a good enough solution, because then anyone who's customised their styles.ini -- for instance placing a favourite style at the top -- would have to redo the customisation with every new style installed.

Locating the ordering data in the styles themselves is a decent solution except that, as mentioned, it removes some customisability, which several people are currently using. Apjjm's suggestion is a good compromise (and would also allow alphabetical ordering, by pinning all styles, although then you'd have to manually update settings every time a new style was released -- that said, these are not very frequent, and only one person so far prefers alphabetical order).

Another idea I had, which is pretty much equivalent, would be to allow the "ORDER xx" line to have a positive or negative integer, and negative integers would be the equivalent of pinned styles -- they would be sorted first regardless of style author. I guess that has the advantage of not needing a new document, but the disadvantage that if you want to change your pinned styles, the information about them is all over the place. So Apjjm's suggestion is probably better, and I just mention this idea for completeness.

namida

QuoteAnother idea I had, which is pretty much equivalent, would be to allow the "ORDER xx" line to have a positive or negative integer, and negative integers would be the equivalent of pinned styles -- they would be sorted first regardless of style author. I guess that has the advantage of not needing a new document, but the disadvantage that if you want to change your pinned styles, the information about them is all over the place.

Giving negatives special treatment would be confusing - though I agree they should be allowed (but simply on the basis that "-1 is before 0 in the order; -2 is before -1; etc; no special handling"). For reference: They are already allowed in styles.ini (as are decimals).

The ability to pin styles is a great idea.
My projects
2D Lemmings: NeoLemmix (engine) | Lemmings Plus Series (level packs) | Doomsday Lemmings (level pack)
3D Lemmings: Loap (engine) | L3DEdit (level / graphics editor) | L3DUtils (replay / etc utility) | Lemmings Plus 3D (level pack)
Non-Lemmings: Commander Keen: Galaxy Reimagined (a Commander Keen fangame)

GigaLem

Here's a suggestion I want to throw my hat into the ring. I want there to be an in-editor Style Sorter, allow us to move and name styles and then NLEditor does the rest, let us choose what order their in, have presets for style order (like Alphabetically, Author Alphabetically, Generalized type, or a saved custom preset) Something that will allow users to have the freedom of how they want to sort their styles with a bit more accessibility (IE not have to change the numbers of a bunch of other styles in the Style.ini just to get the order you want, because that's rather slow not nearly as accessible IMHO)

WillLem

+1 for styles to have a style.nxmi file :thumbsup:

Quote from: Dullstar on October 01, 2021, 04:39:11 AM
I'd suggest allowing styles.ini to be used to modify the order, but also add the new thing and use it when styles.ini is not present/doesn't cover all styles, in which case styles.ini's styles should be listed first, followed by all other styles in the proposed ordering

+1 for this; i.e. allow styles.ini to override all but those styles which don't actually appear in it.

Quote from: Apjjm on October 01, 2021, 11:46:22 AM
You could potentially add PinnedStyle1 ... PinnedStyleN settings to NLEditorSettings.ini

Quote from: GigaLem on October 02, 2021, 12:04:45 AM
I want there to be an in-editor Style Sorter, allow us to move and name styles and then NLEditor does the rest

This is a great idea. Maybe there could be an Options>Styles dialog which allows you to move styles up and down in a list, pin them, and rename them as you wish (although, it might be a good idea for the colums to read "Order / Author / Name" and the Author field to be the only one which isn't editable). Changes made in this dialog would automatically update styles.ini.

Styles without their own style.nxmi file could automatically appear at the top of this list (but only in the dialog, i.e. they are not pinned and still appear at the bottom in the style selection dropdown) until sorted by the user, or if there is a style.nxmi file in the style's folder, then it populates within the list accordingly.

namida

I've hinted at this - and I'm going to set it down as an absolute decision now.

In the first version to include this feature at least, there will NOT be any kind of menu in the editor to customize your style sorting / etc. It will be supported but only by editing an INI file or similar yourself. I am neither promising nor ruling out an in-editor menu for this being added in a later update.

With that in mind, for now we should talk about what we want this feature to be able to achieve, not what a menu for editing our settings for it should look like.

In terms of the "how", I think the key things that have come up are:
- People may want to be able to override the author order (the most obvious reason being to put their own styles at the top of their list)
- People may want to be able to pin specific styles to the top of the list - and possibly to the bottom, too?

In terms of how to make this work out, I'm now thinking:
- As initially suggested, each style has a file that states its name, author, and optionally the position in the order the author wants it to have relative to their other styles.
- "Styles.ini" will continue to exist but as a user settings file instead of part of NL. It will also only specify style order, not names. Styles not listed in it, or listed with a sorting of 0 in it, will retain the automatic sorting.
- Additionally, styles.ini would allow overriding the ordering of authors in much the same way as it does for individual styles.
- The default styles.ini would have only a single entry - one that moves the official styles to the top of the list.
My projects
2D Lemmings: NeoLemmix (engine) | Lemmings Plus Series (level packs) | Doomsday Lemmings (level pack)
3D Lemmings: Loap (engine) | L3DEdit (level / graphics editor) | L3DUtils (replay / etc utility) | Lemmings Plus 3D (level pack)
Non-Lemmings: Commander Keen: Galaxy Reimagined (a Commander Keen fangame)

Proxima


namida

One further thing that's come up while doing some prep work for this:

There is also a need for a "SORT_AUTHOR" field, basically, to group a style with one author while displaying another as the name.

There are two use cases for this:
- Firstly, in the case of joint authors. For example, one style is listed as "Flopsy + GigaLem" for the author, but is currently (and likely should remain) sorted together with Flopsy's styles, rather than by itself.
- Secondly, some people prefer to attribute videogame rip styles to the game rather than themselves (or jointly), but the convention is generally still to sort it together with one's own styles.

Using that example from the first point, it could have "AUTHOR Flopsy + GigaLem" as well as "SORT_AUTHOR Flopsy", which would result in "Flopsy + GigaLem" being displayed in-editor as the author, but only "Flopsy" used when determining where to group it while sorting.
My projects
2D Lemmings: NeoLemmix (engine) | Lemmings Plus Series (level packs) | Doomsday Lemmings (level pack)
3D Lemmings: Loap (engine) | L3DEdit (level / graphics editor) | L3DUtils (replay / etc utility) | Lemmings Plus 3D (level pack)
Non-Lemmings: Commander Keen: Galaxy Reimagined (a Commander Keen fangame)

namida

And one more thing when re-reading the topic, that I overlooked in my previous summary: That some users have indicated a preference for an option to disable the by-author grouping.

The only way I can realistically see this working is that, if by-author grouping is turned off, any style that the user has not explicitly reordered otherwise (by using the traditional styles.ini, or new equivalent thereof) would be sorted purely in alphabetical order.




So, to recap the summary taking these additional points into account:

In terms of the "how", I think the key things that have come up are:
- People may want to be able to override the author order (the most obvious reason being to put their own styles at the top of their list).
- People may want to be able to pin specific styles to the top of the list - and possibly to the bottom, too?
- People may want to turn off the by-author grouping altogther.
- Some styles may be attributed to multiple authors and/or to a videogame they're ripped from, but are conventionally still grouped with a single author.

In terms of how to make this work out, I'm now thinking:
- As initially suggested, each style has a file that states its name, author, and optionally the position in the order the author wants it to have relative to their other styles.
- A "Sort Author" field will also exist. If used, then the value of that field is used as the author when sorting (while the regular Author field is still used when displaying the author name to users).
- "Styles.ini" (or a direct equivalent thereof) will continue to exist but as a user settings file instead of part of NL. It will also only specify style order, not names. Styles not listed in it, or listed with a sorting of 0 in it, will retain the automatic sorting.
- Additionally, styles.ini would allow overriding the ordering of authors in much the same way as it does for individual styles.
- The default styles.ini would have only a single entry - one that moves the official styles to the top of the list.



Are there any further thoughts here? Progress on implementing this is, so far, limited to me writing a tool to auto-generate the metainfo for existing styles, so now is the best time to put forward any ideas - while not much is implemented yet and thus the direction of this can still be changed easily if need be.
My projects
2D Lemmings: NeoLemmix (engine) | Lemmings Plus Series (level packs) | Doomsday Lemmings (level pack)
3D Lemmings: Loap (engine) | L3DEdit (level / graphics editor) | L3DUtils (replay / etc utility) | Lemmings Plus 3D (level pack)
Non-Lemmings: Commander Keen: Galaxy Reimagined (a Commander Keen fangame)

WillLem

Quote from: namida
- People may want to be able to pin specific styles to the top of the list - and possibly to the bottom, too?

Yes to both; it means that even more styles can be given an "easy to access" location :thumbsup:

Quote from: namida
Are there any further thoughts here?

My main thought is that this feature would ideally exist as part of the Editor's GUI, perhaps as a "Sort Styles" dialog accessible via "Tools" or "Options." This could bring up a list of all the styles which can then be rearranged, pinned, etc. according to the user's preferences (the "By-Author Grouping" could be a checkbox).

If it could only exist as something similar to the existing styles.ini, then this should of course be protected from overwriting during a NeoLemmix update.

namida

QuoteMy main thought is that this feature would ideally exist as part of the Editor's GUI, perhaps as a "Sort Styles" dialog accessible via "Tools" or "Options." This could bring up a list of all the styles which can then be rearranged, pinned, etc. according to the user's preferences (the "By-Author Grouping" could be a checkbox).

A GUI to edit this is a "maybe later" feature. Let's operate under the assumption that the initial release of this feature will require editing a text file to make custom configurations to your style order.

QuoteIf it could only exist as something similar to the existing styles.ini, then this should of course be protected from overwriting during a NeoLemmix update.

It would be purely an editor feature, and no longer tied to NL updates in any way. Styles would contain their own info about their name, while your personal configuration would be a settings INI file that (at least until a GUI for editing the settings exists) never gets altered or overwritten, only read from. The only exception would be the editor creating a default config file if none already exists - this config file in turn would have one preset setting, namely, pinning the official styles at the start of the order.
My projects
2D Lemmings: NeoLemmix (engine) | Lemmings Plus Series (level packs) | Doomsday Lemmings (level pack)
3D Lemmings: Loap (engine) | L3DEdit (level / graphics editor) | L3DUtils (replay / etc utility) | Lemmings Plus 3D (level pack)
Non-Lemmings: Commander Keen: Galaxy Reimagined (a Commander Keen fangame)

WillLem

#28
Reading back over this topic, it's my opinion that the best solution is to keep the existing styles.ini file, and have a GUI-based Style Manager with which the user can easily re-order, rename, add to, and ultimately save the style list as they wish.

I've made some progress with this already. Here's what we have so far:



It's fairly basic at the moment, but can absolutely be used to quickly and easily edit the styles.ini list. It's also coupled with the new Refresh Styles feature, so the dropdown lists are updated on-the-fly without having to close and re-open the Editor.

A "Group by Author" button could probably be introduced, as well as a "Sort Alphabetically" button. There may be a way to implement style pinning as well, so that the position of any pinned styles is preserved when performing an auto-sort. Note that, as has been agreed throughout this topic, the OG styles will continue to appear at the top of the default list (of course, user-pinned styles would supersede these).

In terms of keeping the list up to date without it overriding preferences, a master copy of styles.ini could be hosted on the Editor's GitHub repo page. An "Update Styles" button could then read from the master copy and auto-insert any missing styles into the user's copy, by author first, then alphabetically. We can show a list of which styles have been added using this process. NOTE: This would only add the style to the list, it wouldn't actually download the style itself.

Thoughts? Is there anything else we're missing here?