daattali / daattali/colourpicker
Feature request: allow user-defined colour names to be returned.
- Dominant language
- JavaScript
- Stars
- 227
- Forks
- 26
- PR merge metrics
- No merged PRs in 30d
Description
It `palette` is `"limited"`, `permittedCols` is named, and `returnName` is `TRUE`, return the name of the name selected element of `permittedCols` rather than its value.
I hope this is a fairly easy change. I cloned the repo with the intention of providing a solution myself, but it looks as if the change needs to be made in JavaScrip rather than R, and that's outside my skillset.
It looks like the relevant code is on lines 61 & 62 of `inst/srcjs/input_binding_colour.js`...
If this isn't possible, or doesn't fit with your vision for the package, that's not a problem. It's easy to implement in the app's server function. It would just be cleaner if the input widget didn't it for you.
Thank you for your always excellent contributions to the R community, Dean.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start in inst/srcjs/input_binding_colour.js at lines 61-62 and trace how the selected value is returned when palette is "limited". Exercise the widget with named permittedCols and returnName set to TRUE; done means it returns the selected colour name rather than its value.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, r
- Domain
- frontend
- Issue type
- Feature
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Quiet
- Clarity
- Clearly specified
- Newbie friendliness
- 72/100