refactor(layers): extract fluent style API into LayerStyleFluent delegate (stage-1 1.1) - #2887
Merged
Merged
Conversation
…gate (stage-1 1.1) Move ~200 lines of fluent style methods (color/size/texture/rotate/filter/ shape/label/animate/style + updateStyleAttribute/encodeStyle/ splitValuesAndCallbackInAttribute) from BaseLayer into a dedicated LayerStyleFluent delegate class. - LayerStyleFluent owns all fluent method logic; BaseLayer keeps thin forwarding wrappers that delegate and return this for chaining - Protected members (configService/pendingStyleAttributes/encodeStyles) accessed via ctor-injected getter lambdas for runtime mutability - encodeStyle private method fully extracted (dead code removed from BaseLayer); updateStyleAttribute/splitValuesAndCallbackInAttribute body replaced with delegation - Zero API/behavior change; all 197 core tests pass unchanged Co-Authored-By: Claude <noreply@anthropic.com>
Contributor
|
Caution The consumer version of Gemini Code Assist on GitHub has been sunset. All code review activity has officially ceased. |
|
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.
Summary
Extract ~200 lines of fluent style methods from
BaseLayerinto a dedicatedLayerStyleFluentdelegate class.Changes
LayerStyleFluent.ts(new file, +273 lines)color/size/texture/rotate/filter/shape/label/animate/styleupdateStyleAttribute/encodeStyle/splitValuesAndCallbackInAttributeconfigService/pendingStyleAttributes/encodeStyles) accessed via ctor-injected getter lambdas for runtime mutabilityBaseLayer.ts(+27, −150)this.styleFluentand returnthisfor chainingencodeStyleprivate method removed (dead code after extraction)updateStyleAttribute/splitValuesAndCallbackInAttributebody replaced with delegationlodashUtilimport (no longer needed in BaseLayer)Verification
Design
Follows the established delegate pattern from stages 1.3–1.8 (
LayerPickingManager,LayerScaleLegend,LayerVisibilityZoom, etc.). Zero API / behavior change.🤖 Generated with Claude Code