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

ColorPicker: Make color field resizable #8717

Open
2 tasks done
digitaldirk opened this issue Apr 16, 2024 · 1 comment · May be fixed by #8744
Open
2 tasks done

ColorPicker: Make color field resizable #8717

digitaldirk opened this issue Apr 16, 2024 · 1 comment · May be fixed by #8744
Assignees
Labels
enhancement New feature or request wants to do a PR

Comments

@digitaldirk
Copy link
Contributor

Feature request type

Enhance component

Component name

MudColorPicker

Is your feature request related to a problem?

The color field on the color picker is too big for my purposes and adjusting the css only visually works. There are two private values (_maxY/_maxX) which drive the calculation for getting color.

For example if I do:

.mud-picker-color-picker {
     height: 125px;
}

Then visually the color field is half the size, but it only lets you select half the color range:
image
I should get a value of around #000000 but I am still in the grays.

Describe the solution you'd like

I would like at least for _maxY to become a public parameter so the height of the color field can be changed. This would require setting up the css so the .mud-picker-color-picker height would also change as that is hardcoded currently.

For a test, I made _maxY a public parameter, and hardcoded the css height to 125px:
image

<MudColorPicker _maxY="125" PickerVariant="PickerVariant.Static" />

<style>
  .mud-picker-color-picker {
    height: 125px;
  }
</style>

Would we want to make both _maxY/_maxX public? When adjusting _maxX the color field is not centered so if we did make X public then we should probably change the css:

image

image
Something like:

<style>
  .mud-picker-color-picker {
    width: 156px;
    display: block;
    margin-left: auto;
    margin-right: auto;
  }
</style>

Have you seen this feature anywhere else?

No response

Describe alternatives you've considered

No response

Pull Request

  • I would like to do a Pull Request

Code of Conduct

  • I agree to follow this project's Code of Conduct
@digitaldirk digitaldirk added enhancement New feature or request triage labels Apr 16, 2024
Copy link

👋 Thanks for wanting to do a PR @digitaldirk !
We will try to merge all (non-breaking) bugfix PRs and we will deliberate the value of feature PRs for the community. But be warned that there is no guarantee that new features will be merged. If you want to be sure before investing the work please contact the team about your planned feature PR

@digitaldirk digitaldirk changed the title ColorPicker: Make color field ColorPicker: Make color field resizable Apr 16, 2024
@digitaldirk digitaldirk linked a pull request Apr 18, 2024 that will close this issue
7 tasks
@henon henon removed the triage label May 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request wants to do a PR
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants