Create ColorPicker component - #571
Conversation
55ddd02 to
288266e
Compare
|
@skjnldsv I don't think there's the need to use the color generator algorithm here. If a user opens this it's because he wants to choose a color so IMO the simple picker should have a selection of nice hard-coded colors only. What do you think? |
Yes, that is why the colour generator is here. It's generating the exact same colours everytime and that are the one we're using all over nextcloud :) |
|
Hey @nextcloud/designers, this is the current state of things, the design has changed since the mock-up so I need some feedback:
I took out one line of colors to make things more compact, i think that 12 is more than enough for the simple picker.
I brought back the 'current color' circle and dropped the idea of using the picker itself as current color indicator. for feedbacks and animations check out this video: https://cloud.ma12.co/index.php/s/KaRRTfP9iDExGZ5 What do u think? |
|
|
thanks @skjnldsv!
This one is because of the hover state of the 'back' button: |
|
got it @skjnldsv, it was a margin coming from the server's css. |
958ecfe to
fb78026
Compare
| ``` | ||
| <Popover> | ||
| <ColorPicker value="" @update:value="doSomething" /> | ||
| <ColorPicker value="#someHexColor" @update:value="doSomething" /> |
There was a problem hiding this comment.
Maybe also add an example with a simple v-model?
|
Great stuff @ma12-co! :) Agree with @skjnldsv’s points:
|
|
Thanks @jancborchardt!
I'll try this and we'll see how it looks :)
Nice catch! this is indeed the intended behavior but it's not properly implemented atm!
makes sense :) |
|
@jancborchardt, everything updated, I'm not a fan of the 'choose' text instead of the checkmark button though, I think it takes up a lot of space and it's a bit invasive.. Here it is: |
Agreed, shall we move to a white bg and primary border? |
Or just emit the change event on change, not only on save and get rid of that button completely? |
I actually think it's nice to wait for a validation. On android I found both use cases:
I actually like the (2), like the calendar for example, you could update the whole ui accordingly and let the user change colours until it fits. I always have to click a few colours to see how well it matches with the other calendars that I have :) It gives you a little better sense of control over the setting. ALso, on mobile, clicking outside cannot be the only way to quit a popup, so if you want to cancel, you'll need a button for it. Choose is fine if the user did not changed anything. |
|
@ma12-co Somehow I'm too stupid to test this. Could you push an example branch to https://github.com/skjnldsv/vueexample? I added a |
The popover component is not here yet, just use a standard ColorPicker with a v-model on a default value. |
|
Sorry @georgehrke, that's totally my fault. Docs are a misleading as we still don't have the popover component. And the colorpicker now works properly only with |
Signed-off-by: Marco Ambrosini <marcoambrosini@pm.me>
Signed-off-by: Marco Ambrosini <marcoambrosini@pm.me>
Signed-off-by: Marco Ambrosini <marcoambrosini@pm.me>
Signed-off-by: Marco Ambrosini <marcoambrosini@pm.me>
Signed-off-by: Marco Ambrosini <marcoambrosini@pm.me>
cd367a1 to
5d30440
Compare
|
@ma12-co please rebase and squash :) |
Signed-off-by: Marco Ambrosini <marcoambrosini@pm.me>
Signed-off-by: Marco Ambrosini <marcoambrosini@pm.me>
Signed-off-by: Marco Ambrosini <marcoambrosini@pm.me>
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
Signed-off-by: Marco Ambrosini <marcoambrosini@pm.me>
Signed-off-by: Marco Ambrosini <marcoambrosini@pm.me>
Signed-off-by: Marco Ambrosini <marcoambrosini@pm.me>
Signed-off-by: Marco Ambrosini <marcoambrosini@pm.me>
5d30440 to
47ce301
Compare
|
Done! |
Signed-off-by: Marco Ambrosini <marcoambrosini@pm.me>
|
🎉 |







Fix #138

design: https://www.figma.com/file/4th1eQVONZguVoDXMwnDJT/nc-color-picker?node-id=0%3A1
Please use this app.vue for testing