Document `WCF.ColorPicker` deprecation (#197)
authorMatthias Schmidt <gravatronics@live.com>
Fri, 2 Jul 2021 09:28:11 +0000 (11:28 +0200)
committerGitHub <noreply@github.com>
Fri, 2 Jul 2021 09:28:11 +0000 (11:28 +0200)
See WoltLab/WCF#4353

docs/migration/wsc54/deprecations_removals.md
docs/migration/wsc54/javascript.md

index 3ec2fc349b271f455d3240c744295a6503d814ea..3113cfa0e390b7953e3c53ad1b6cba0dad213abd 100644 (file)
@@ -86,6 +86,7 @@ With version 5.5, we have deprecated certain components and removed several othe
 
 - `WBB.Board.MarkAsRead` (use `WoltLabSuite/Forum/Ui/Board/MarkAsRead` instead)
 - `WBB.Board.MarkAllAsRead` (use `WoltLabSuite/Forum/Ui/Board/MarkAllAsRead` instead)
+- `WCF.ColorPicker` (see [migration guide for `WCF.ColorPicker`](javascript.md#wcfcolorpicker))
 - `WCF.ACP.Style.ImageUpload` ([WoltLab/WCF#4323](https://github.com/WoltLab/WCF/pull/4323))
 - `WCF.Like.js` ([WoltLab/WCF#4300](https://github.com/WoltLab/WCF/pull/4300))
 - `WCF.Message.UserMention` ([WoltLab/WCF#4324](https://github.com/WoltLab/WCF/pull/4324))
index 83d382ba267c6eb8780ab32d7ac7aa6e75a51f01..cb74f11c75b13b4fe37c85ac27b95139ff42c295 100644 (file)
@@ -1,5 +1,22 @@
 # Migrating from WSC 5.4 - TypeScript and JavaScript
 
+## `WCF.ColorPicker`
+
+We have replaced the old jQuery-based color picker `WCF.ColorPicker` with a more lightweight replacement `WoltLabSuite/Core/Ui/Color/Picker`, which uses the build-in `input[type=color]` field.
+To support transparency, which `input[type=color]` does not, we also added a slider to set the alpha value.
+`WCF.ColorPicker` has been adjusted to internally use `WoltLabSuite/Core/Ui/Color/Picker` and it has been deprecated.
+
+Be aware that the new color picker requires the following new phrases to be available in the TypeScript/JavaScript code:
+
+- `wcf.style.colorPicker.alpha`,
+- `wcf.style.colorPicker.color`,
+- `wcf.style.colorPicker.error.invalidColor`,
+- `wcf.style.colorPicker.hexAlpha`,
+- `wcf.style.colorPicker.new`.
+
+See [WoltLab/WCF#4353](https://github.com/WoltLab/WCF/pull/4353) for more information.
+
+
 ## CodeMirror
 
 CodeMirror, the code editor we use for editing templates and SCSS, for example, has been updated to version 5.61.1 and we now also deliver all supported languages/modes.