Fix stale ColorPickerController API examples in README and docs site - #192
Open
iprashantpanwar wants to merge 1 commit into
Open
Fix stale ColorPickerController API examples in README and docs site#192iprashantpanwar wants to merge 1 commit into
iprashantpanwar wants to merge 1 commit into
Conversation
- README.md: replace removed setWheelRadius/setWheelColor/setWheelAlpha/setWheelImageBitmap calls with direct property assignment (wheelRadius, wheelColor, wheelAlpha, wheelBitmap) - README.md: replace removed setPaletteContentScale controller method with the paletteContentScale parameter on ImageColorPicker - docs/ApiControllerScreen.kt: same wheel property fix - docs/ApiImageColorPickerScreen.kt: same paletteContentScale fix
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
馃幆 Goal
ColorPickerController's public API was refactored at some point, the wheelcustomization functions (
setWheelRadius,setWheelColor,setWheelAlpha,setWheelImageBitmap) became plain properties, andsetPaletteContentScalewas replaced by a
paletteContentScaleparameter onImageColorPicker. TheREADME and the documentation website were never updated to match, so
copy-pasting these examples currently fails to compile. This PR brings both
docs surfaces back in sync with the current API.
馃洜 Implementation details
README.md"Custom Wheel" section: replaced the four.setWheelXxx(...)calls with direct property assignment on the controller
(
controller.wheelRadius = ..., etc.)README.md"PaletteContentScale" section: replacedcontroller.setPaletteContentScale(...)with thepaletteContentScaleparameter on the
ImageColorPickercomposabledocs/src/wasmJsMain/kotlin/docs/screen/ApiControllerScreen.kt: appliedthe same wheel property fix to the live docs site's code sample
docs/src/wasmJsMain/kotlin/docs/screen/ApiImageColorPickerScreen.kt:applied the same
paletteContentScalefix to the live docs site's codesample
No functional/library code was changed this PR only touches documentation
(
README.md) and the docs website's Kotlin/Wasm source (docs/module).鉁嶏笍 Explain examples
Before ((unresolved reference - these methods don't exist on
ColorPickerController):After: