Enable Sorting of folders by date and inherit the sort order in the build save dialog
This PR introduces improved folder sorting capabilities: Build List: Folders are now sorted by modification time (newest first) when "Sort by Last Edited" is active. For other sort modes (Name, Class, Level), folders are sorted by name (A-Z). Files continue to sort based on the selected mode. Folders are always listed before files. Save As Dialog: The folder list within the "Save As" dialog now inherits its sorting behavior from the main build list's current Sort by setting (main.buildSortMode). If "Sort by Last Edited" is active in the main list, folders in the "Save As" dialog are sorted by modification time (newest first). Otherwise, folders in the "Save As" dialog are sorted by name (A-Z).
I suspect that it would be trivial to add a format checker to the workflows to speed up these kinds of issues in the future.
You're welcome to submit a format checker workflow! 😃
You're welcome to submit a format checker workflow! 😃
for sure, do you folks have format guidelines somewhere? I did not see it in the Contributing.md.
There are no official format guidelines; we generally just try to be consistent with the existing code. Indentation is probably the only area of concern as it's easy to overlook, especially for new contributors.
I have an ancient branch that attempted to implement luacheck/LuaFormatter among a bunch of other changes if you need inspiration:
https://github.com/Paliak/PathOfBuilding/blob/a34de95910cec3db4ce22600935820d96b817289/Dockerfile https://github.com/Paliak/PathOfBuilding/blob/a34de95910cec3db4ce22600935820d96b817289/.luacheckrc https://github.com/Paliak/PathOfBuilding/blob/a34de95910cec3db4ce22600935820d96b817289/.lua-format
a variation of the docker file is a part of the repo now but it doesn't include luacheck/LuaFormatter.
I have an ancient branch that attempted to implement luacheck/LuaFormatter among a bunch of other changes if you need inspiration:
https://github.com/Paliak/PathOfBuilding/blob/a34de95910cec3db4ce22600935820d96b817289/Dockerfile https://github.com/Paliak/PathOfBuilding/blob/a34de95910cec3db4ce22600935820d96b817289/.luacheckrc https://github.com/Paliak/PathOfBuilding/blob/a34de95910cec3db4ce22600935820d96b817289/.lua-format
a variation of the docker file is is a part of the repo now but it doesn't include luacheck/LuaFormatter.
how do we feel about https://github.com/marketplace/actions/stylua it should be fairly simple to add a github action to run a pass on all prs that modify or add lua files.
It's a 3rd party action which kind of rubs me the wrong way security wise. Also i really like that we're not completely reliant on github actions for anything and things can work be ran locally without too much hassle (having to use stuff like act etc).
At the end of the day it's up to the maintainers tho.
I had a very quick look at Stylua. To me it didn't seem like a good fit -- It looked more like a formatter than a linter, and its output seemed limited to (huge) diffs.