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

Render SelectFields as MUI Selects #4059

Draft
wants to merge 20 commits into
base: main
Choose a base branch
from
Draft

Render SelectFields as MUI Selects #4059

wants to merge 20 commits into from

Commits on Dec 1, 2024

  1. Render SelectFields as MUI Selects

    This renders most drop-down selection prompts inside Heroic. In turn, these
    dropdowns now work inside the Gamescope session.
    
    Current issues:
    - Controller navigation does not work, hitting "Down" opens the dropdown, with
      no way to navigate further down to other components
    - There is a black box in the top-left of the component, where the label should
      be
    CommandMC committed Dec 1, 2024
    Configuration menu
    Copy the full SHA
    e9a5931 View commit details
    Browse the repository at this point in the history
  2. fix some styling issues

    Etaash-mathamsetty authored and CommandMC committed Dec 1, 2024
    Configuration menu
    Copy the full SHA
    ae6f01c View commit details
    Browse the repository at this point in the history
  3. bug fix

    Etaash-mathamsetty authored and CommandMC committed Dec 1, 2024
    Configuration menu
    Copy the full SHA
    dc992b3 View commit details
    Browse the repository at this point in the history
  4. fix lint

    Etaash-mathamsetty authored and CommandMC committed Dec 1, 2024
    Configuration menu
    Copy the full SHA
    2766277 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    120d4cc View commit details
    Browse the repository at this point in the history
  6. Misc: Selector ordering

    CommandMC committed Dec 1, 2024
    Configuration menu
    Copy the full SHA
    39ede5e View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    eb4d94b View commit details
    Browse the repository at this point in the history
  8. Hide black box using MUI sx prop

    MUI CSS class names are not stable, they cannot be used like this
    CommandMC committed Dec 1, 2024
    Configuration menu
    Copy the full SHA
    efa634c View commit details
    Browse the repository at this point in the history
  9. Hide 2nd arrow with sx as well

    I prefer to use this over CSS rules in a separate file since it can sometimes be
    unclear where "the magic happens". Having layout and style together is clearer
    IMO
    CommandMC committed Dec 1, 2024
    Configuration menu
    Copy the full SHA
    0186309 View commit details
    Browse the repository at this point in the history
  10. Misc: Consolidate rules

    CommandMC committed Dec 1, 2024
    Configuration menu
    Copy the full SHA
    6df69d4 View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    ddc7bf1 View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    3f1be93 View commit details
    Browse the repository at this point in the history
  13. Use MUI Dialogs to render our Dialogs

    This will definitely break things, but it makes selects work
    CommandMC committed Dec 1, 2024
    Configuration menu
    Copy the full SHA
    938ee99 View commit details
    Browse the repository at this point in the history
  14. Controller navigation fixes, part 1

    Navigating "over" selects now works
    
    This is done by simulating Tab/Shift-Tab key presses when pressing the
    respective buttons while focussing a MUI select element
    
    I've gone ahead and removed our home-grown `GamepadInputEvent` type, as it's
    just a lesser version of Electron's input events
    CommandMC committed Dec 1, 2024
    Configuration menu
    Copy the full SHA
    828571b View commit details
    Browse the repository at this point in the history
  15. Controller navigation fixes, part 2

    This makes dialogs closeable with the back button again
    CommandMC committed Dec 1, 2024
    Configuration menu
    Copy the full SHA
    7918e00 View commit details
    Browse the repository at this point in the history
  16. Misc style fixes

    CommandMC committed Dec 1, 2024
    Configuration menu
    Copy the full SHA
    0d5ab0e View commit details
    Browse the repository at this point in the history
  17. Controller navigation hacks: Transferring focus

    Restoring the focussed element on dialog close is already handled by MUI, we
    don't need this code ourselves
    
    Moving focus on dialog open *should* work automatically as well, however it
    doesn't. I've tried various methods with element properties and JS, nothing
    seems to work. As a band-aid fix for now, we simulate 1-2 tab presses to focus
    the dialog content
    CommandMC committed Dec 1, 2024
    Configuration menu
    Copy the full SHA
    e88d290 View commit details
    Browse the repository at this point in the history
  18. Controller navigation fixes, part 3

    Closing selects with the B/Circle button
    CommandMC committed Dec 1, 2024
    Configuration menu
    Copy the full SHA
    8f241cd View commit details
    Browse the repository at this point in the history
  19. Fix theme selector empty when not specifically having selected a theme

    MUI treats an empty value as "don't show anything selected", while native
    selects show the first option
    CommandMC committed Dec 1, 2024
    Configuration menu
    Copy the full SHA
    45a8bd2 View commit details
    Browse the repository at this point in the history
  20. Configuration menu
    Copy the full SHA
    f327b2a View commit details
    Browse the repository at this point in the history