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

feat: add file and color controller setting types #13669

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

acolombier
Copy link
Member

Add new controller setting type, particularly useful for screen mapping.

Screencast.from.19-09-24.10.02.23.mp4

TODO:

  • Unit test
  • Improved UI

@acolombier acolombier marked this pull request as draft September 19, 2024 11:54
@acolombier acolombier mentioned this pull request Sep 19, 2024
1 task
@JoergAtGithub
Copy link
Member

These setting types are great features!

For the file selector I would expect a widget like this:
grafik
and a XML settings for the allowed file types.

More complicated might be a generic definiton for colors, as:

  • we have already certain purpose specific colormaps:
    grafik
  • but more important here, many controllers have only a small list of supported colors, as this list of named colors:
    // The S3 has a set of predefined colors for many buttons. They are not
    // mapped by RGB, but 16 colors, each with 4 levels of brightness, plus
    // white.
    this.hid.LEDColors = {
    OFF: 0x00,
    RED: 0x04,
    CARROT: 0x08,
    ORANGE: 0x0C,
    HONEY: 0x10,
    YELLOW: 0x14,
    LIME: 0x18,
    GREEN: 0x1C,
    AQUA: 0x20,
    CELESTE: 0x24,
    SKY: 0x28,
    BLUE: 0x2C,
    PURPLE: 0x30,
    FUCHSIA: 0x34,
    MAGENTA: 0x38,
    AZALEA: 0x3C,
    SALMON: 0x40,
    WHITE: 0x44
    };
  • our current color mapper API has no link to the XML yet: https://github.com/mixxxdj/mixxx/blob/main/res/controllers/color-mapper-api.d.ts
  • Maybe we need a solution to define a color map from XML instead of JavaScript?

@acolombier
Copy link
Member Author

Thanks for the early feedback!

For the file selector I would expect a widget like this:

Yes, that makes sense. It's in the todo list already :)

we have already certain purpose specific colormaps:

The current widget are more tailored for palette AFAIK, not unique colour selection, so not sure how to do this? I was thinking of adding a color indication inside/next to the pick button

but more important here, many controllers have only a small list of supported colors, as this list of named colors:

Yes, this usecase is already covered with enum, and actually used by the S4Mk3. One bits of improvement could be to add some color indication in the dropdown, I guess we could easily add an attribute on the option element if we wanted to improve the UX for those?

@Swiftb0y
Copy link
Member

I think using the Qt color picker is fine. If we want to we can pre-fill their color with for example the users currently track-color palette (the palette source could also be configured as part of the setting). But lets KISS for now until we have a good reason to couple this to our palettes. A palette selector could be interesting indeed, but that is separate from the color picker.

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

Successfully merging this pull request may close these issues.

3 participants