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

Add Subcategories to the SortMenu #585

Open
wants to merge 2 commits into
base: itgmania-beta
Choose a base branch
from

Conversation

CrashCringle12
Copy link
Contributor

This PR adds Subcategories to the sort menu in order to reduce the amount of items in a single wheel. The current categories are:

  • Sorts (Options that sort the MusicWheel)
  • Styles (Change styles)
  • Advanced (Misc other more advanced options like test input)
  • Playlists (More on this below)

I kept some things outside of categories as well just so we're not adding extra steps for people (i.e. Group and Title sorting exist both in the main menu and within the "Sort" submenu.

In addition to subcategories, this also adds support for drop-in playlists in the Playlists folder. I can split this into a separate PR if needed, I left it in one since on my end it was all added at once. Playlists are just txt files (exact format as favorites) placed in the Playlists folder. All available playlists will be shown under the Playlist category and will load the respective listing as preferred sorting. This can aid users who wish to distribute their favorites or recommendations, hold small tournaments, or just want separate listings for groups of songs.

I've attached a video showing all of the above, let me know if there are any adjustments to make and if the current list of submenus is sufficient:

SubSort2.mp4

@teejusb
Copy link
Collaborator

teejusb commented Jan 1, 2025

While I strongly support this feature, I know we talked about the implementation in DMs. My preference would be to easily lay out the wheel options so that's much easier to see how the categories are laid out. A quick glance at this PR makes it seem like it doesn't address that concern. The below was the example I had provided:

local function AddFavorites = function()
  for player in ivalues(GAMESTATE:GetHumanPlayers()) do
    local path = getFavoritesPath(player)
    if FILEMAN:DoesFileExist(path) then
      return {"MixTape", "Preferred"}
      break
    end
  end
  return nil
end

local function DownloadsExist = function()
  return SL.GrooveStats.IsConnected and ThemePrefs.Get("AutoDownloadUnlocks")
end

local wheel_options = {
  { {"FeelingSalty", "TestInput"}, GAMESTATE:IsEventMode() },
  { {"TakeABreather", "LoadNewSongs"} }, -- no condition means always available
  { {"NeedMoreRam", "ViewDownloads"}, DownloadsExist() },
  AddFavorites(), -- can support functions for more complicated entries/conditions
  {
    {"Order Please!", "SortBy"},
    {  -- existence of a table indicates sub-menu.
      { {"", "Title"} },
      { {"", "Artist"} },
      { {"", "Genre"}, some_condition } -- nested ones can also be conditional (can reuse code)
    }
  }
}

If you think it'd be better to go through with this PR first and then redesign it we can potentially opt to do that too, but I'm concerned that it would be more difficult down the line.

Regarding playlists. I don't think I agree with the implementation of putting them in the Other directory. That is a hard to navigate to folder, especially on public cabs where people don't have access to the theme. I'm also currently unsure about its general usage and would need to think a bit about it. For now, I think my preference would be to break it out of this PR and we can add it as a separate feature request PR where we can mull over its implementation.

Rework how the wheel options are organized. They're now defined by one master table
@CrashCringle12 CrashCringle12 changed the title Add Subcategories to the SortMenu + Playlist Support Add Subcategories to the SortMenu Jan 2, 2025
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

Successfully merging this pull request may close these issues.

2 participants