Review main Abandoned

68107[WIP][TASK] Use vanilla-picker as color picker

Benni Mack CR 0 V 0 Hard +264 −315 updated 10/27/21, 19:32

Commit message

This change aims to replace "jquery.minicolrs" with
a plain JS library called "vanilla-picker".

ToDo:
- Improve the styling with a custom layout

Commands used:
  yarn add vanilla-picker
  yarn remove @claviska/jquery-minicolors
  grunt build

Review

  • Code review CR 0
  • Verified V 0

Issues 1

Files 19

Review log 1728

Show 13 earlier messages
  1. Benni Mack uploaded patch set 1 02/25/21, 11:33

  2. TYPO3com voted on patch set 1 V +1 02/25/21, 11:42 Completed build in 08m 51s on Thu, 25 Feb, 11:42 AM Test Summary: 32706 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-9715

  3. core-ci voted on patch set 1 V +1 02/25/21, 11:43 Core CI is happy: https://core.b13.com/typo3-core/typo3.cms/-/pipelines/995

  1. Benjamin Franzke uploaded patch set 2 04/22/21, 20:50

  2. TYPO3com voted on patch set 2 V +1 04/22/21, 20:56 Completed build in 06m 42s on Thu, 22 Apr, 08:56 PM Test Summary: 33307 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-10814

  3. core-ci voted on patch set 2 V +1 04/22/21, 21:03 Core CI is happy: https://gitlab.typo3.org/TYPO3/CI/cms/-/pipelines/10616

  4. Benjamin Franzke uploaded patch set 3 04/22/21, 21:51

  5. TYPO3com voted on patch set 3 V +1 04/22/21, 21:58 Completed build in 07m 04s on Thu, 22 Apr, 09:58 PM Test Summary: 33307 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-10819

  6. core-ci voted on patch set 3 V +1 04/22/21, 22:02 Core CI is happy: https://gitlab.typo3.org/TYPO3/CI/cms/-/pipelines/10621

  7. Benjamin Franzke uploaded patch set 4 04/22/21, 22:15

  8. TYPO3com voted on patch set 4 V +1 04/22/21, 22:21 Completed build in 06m 28s on Thu, 22 Apr, 10:21 PM Test Summary: 33307 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-10820

  9. core-ci voted on patch set 4 V +1 04/22/21, 22:27 Core CI is happy: https://gitlab.typo3.org/TYPO3/CI/cms/-/pipelines/10622

  10. Martin Kutschker commented on patch set 4 V -1 04/23/21, 08:56

    I cannot use the colour picker with a keyboard. See https://github.com/Sphinxxxx/vanilla-picker/issues/35
  11. Oliver Hader commented on patch set 4 04/23/21, 09:01

    Does the current jquery colorpicker support keyboard navigation?
  12. Oliver Hader uploaded patch set 5 04/23/21, 10:35

  13. Oliver Hader commented on patch set 5 04/23/21, 10:35

    Just rebased...
  14. TYPO3com voted on patch set 5 V +1 04/23/21, 10:43 Completed build in 07m 28s on Fri, 23 Apr, 10:43 AM Test Summary: 33307 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-10824

  15. Oliver Hader commented on patch set 5 04/23/21, 10:46

    Current jquery colorpicker does not seem to support keyboard interaction with arrow keys - just regular, tab, esc, enter, submit hex values (see https://github.com/claviska/jquery-minicolors/blob/master/jquery.minicolors.js#L1099-L1126) Thus, switching to another library does not seem to be a regression (in terms of removing accessibility functionality). Extending those requested a11y behaviors would be a feature request then.
  16. Martin Kutschker commented on patch set 5 04/23/21, 12:13

    Reply

    Yes and no. Why put effort into integrating code that does not meet the a11y goals? The lib doesn't look to be maintained actively. Making the thing work with a keyboard is probably done in a couple of hours. Yet, nothing has been done. So any issues that will arise with future browsers ties us to the look and feel of this lib. What are the pros for this lib beside that it does not use jQuery?
  17. Benni Mack commented on patch set 5 04/23/21, 19:57

    Reply

    Hey Masi. Migrating away from jQuery and going Vanilla JS increases performance. We have approx 3 jQuery plugins left until we can going jQuery-free. So, choosing this lib over other Vanilla-JS tools are: * small * contains the feature-set we need, nothing more * more (!) actively maintained than other compared libraries * license fits our TYPO3 needs * approach over native HTML5 color picker: has a unified look+feel across all browsers If you have other JS-based libs that meet this PLUS keyboard navigation, that'd be good. However, it would indeed be good to contribute to this lib (or fork it) and add the features we need to make it even better. But sure, any alternatives are welcome too. Worst scenario for this area would be to keep the status quo as is IMHO
  18. Martin Kutschker commented on patch set 5 04/23/21, 20:22

    Reply

    A quick search brought up nothing better. Still plenty of jQuery stuff around and rather weird pickers as well. If a fork is an option I'll try to fix the original lib an submit a pull request. There is still enough time for the LTS to decide to use the fixed original or a custom version.
  19. Benni Mack commented on patch set 5 04/23/21, 20:23

    Reply

    That would be AMAZING!!!
  20. Benni Mack uploaded patch set 6 04/27/21, 20:46

  21. core-ci voted on patch set 6 V +1 04/27/21, 20:56 Core CI is happy: https://gitlab.typo3.org/TYPO3/CI/cms/-/pipelines/10790

  22. Benni Mack uploaded patch set 7 05/03/21, 08:38

  23. Benni Mack commented on patch set 6 05/03/21, 08:39

    After rebasing I get a strange JS error, and the colorpicker is not showing up
  24. core-ci voted on patch set 7 V +1 05/03/21, 08:50 Core CI is happy: https://gitlab.typo3.org/TYPO3/CI/cms/-/pipelines/11044

  25. Benni Mack abandoned the change 10/27/21, 19:32

    abandoned for the time being