-
-
Notifications
You must be signed in to change notification settings - Fork 50
feat: replace Spectrum with Coloris #2042
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
Conversation
|
Tested and functions in:
|
|
If you filter the preference pane to just show painter and open the final color picker, the preference pane extends lower so that the color picker's full height is accessible by scrolling down; this is good. Dismissing the color picker scrolls you back up, and opening it again leaves you scrolled up; this is fine. Something we could do if desired is enforcing a minimum height for the configuration pane, making it appear that the search option filters the feature items down atop a—surface—okay, yeah, I don't know the UI design terminology for this. Anyway, that would probably feel better in this specific case, but I don't know that it would be worth it, as in most cases it probably feels more natural not to see the surface(?) behind the feature items except in the "no results found" case. |
Hmm, the jump is a little weird now that you point it out... but this is definitely out of scope for this PR. Feel free to open an enhancement issue if you want. (If you don't, I will probably forget about this completely by the end of the day!) |
If you have any idea how to force the popup to be wider on mobile Safari without messing up the semi-auto width logic on desktop Firefox/Chrome, please please PR it, because this screenshot makes me sad. |
|
I never bothered to understand how the width logic worked normally, so I don't :D Maybe someday I'll just throw stuff at the wall until something sticks. |
|
Ah, that's fair, I did just throw stuff at the wall until I understood it too... XKit-Rewritten/src/action/popup.css Lines 49 to 53 in 6e0c6bc
I'm guessing that iPad Safari's popup viewport has its own intrinsic width that means we shrink to fit it. Question is, would the popup viewport width grow if we didn't? And how would we reliably detect iPadOS to unset the |

Description
This colour picker looks more modern and does not have any major security vulnerabilities (see lack of comments on this PR from CodeQL). Might also improve touchscreen compatibility? When I try to use Spectrum with Firefox simulating a touchscreen, the picker doesn't stay open...
While I was here, I added some Tumblr brand colours as colour picker shortcuts. Spectrum supports this as well, but I just haven't had a reason to touch our implementation until now.
Testing steps
(If a non-colour would be present in the constructed gradient, the gradient simply doesn't get applied, leaving an uncoloured border on the top of the affected posts)