-
Notifications
You must be signed in to change notification settings - Fork 7
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
feat: add possibility to style map features and elements #137
Conversation
WalkthroughThe recent changes enhance the Google Maps Addon by introducing a new API for customizing map styles, including the ability to hide points of interest (POIs). A new method, Changes
Assessment against linked issues
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configuration File (
|
Quality Gate passedIssues Measures |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (9)
- src/main/java/com/flowingcode/vaadin/addons/googlemaps/GoogleMap.java (2 hunks)
- src/main/java/com/flowingcode/vaadin/addons/googlemaps/maptypestyle/ElementType.java (1 hunks)
- src/main/java/com/flowingcode/vaadin/addons/googlemaps/maptypestyle/FeatureType.java (1 hunks)
- src/main/java/com/flowingcode/vaadin/addons/googlemaps/maptypestyle/MapStyle.java (1 hunks)
- src/main/java/com/flowingcode/vaadin/addons/googlemaps/maptypestyle/StyleRules.java (1 hunks)
- src/main/java/com/flowingcode/vaadin/addons/googlemaps/maptypestyle/Stylers.java (1 hunks)
- src/main/java/com/flowingcode/vaadin/addons/googlemaps/maptypestyle/Visibility.java (1 hunks)
- src/test/java/com/flowingcode/vaadin/addons/googlemaps/GooglemapsDemoView.java (1 hunks)
- src/test/java/com/flowingcode/vaadin/addons/googlemaps/StyleFeaturesDemo.java (1 hunks)
Additional comments not posted (11)
src/main/java/com/flowingcode/vaadin/addons/googlemaps/maptypestyle/Visibility.java (1)
1-37
: EnumVisibility
is well-defined.The enum correctly represents visibility options for map elements and uses Lombok to manage the
value
field efficiently.src/main/java/com/flowingcode/vaadin/addons/googlemaps/maptypestyle/Stylers.java (1)
1-40
: EnumStylers
is well-defined.The enum provides a comprehensive set of styling options for map elements, leveraging Lombok for field management.
src/test/java/com/flowingcode/vaadin/addons/googlemaps/GooglemapsDemoView.java (1)
50-50
: Addition ofStyleFeaturesDemo
is appropriate.The new demo enhances the demo view by showcasing the new styling capabilities, aligning with the PR objectives.
src/main/java/com/flowingcode/vaadin/addons/googlemaps/maptypestyle/ElementType.java (1)
1-81
: EnumElementType
is well-defined.The enum provides a detailed list of element types for map features, leveraging Lombok for field management.
src/main/java/com/flowingcode/vaadin/addons/googlemaps/maptypestyle/MapStyle.java (1)
1-87
: ClassMapStyle
is well-implemented.The class provides a flexible way to define map styling configurations and convert them to JSON, aligning with the PR objectives.
src/test/java/com/flowingcode/vaadin/addons/googlemaps/StyleFeaturesDemo.java (3)
41-70
: LGTM! Verify the demo functionality.The method correctly creates and styles Google Maps instances. Ensure the demo behaves as expected and showcases the styling features effectively.
72-79
: LGTM!The method correctly initializes a
GoogleMap
with default settings.
81-85
: LGTM!The method correctly creates a
Span
with bold text.src/main/java/com/flowingcode/vaadin/addons/googlemaps/maptypestyle/StyleRules.java (1)
37-135
: LGTM! Verify JSON conversion.The class is well-structured and uses
Optional
effectively ingetJson
. Ensure the JSON conversion works as expected with various style configurations.src/main/java/com/flowingcode/vaadin/addons/googlemaps/maptypestyle/FeatureType.java (1)
29-206
: LGTM!The enum is comprehensive and well-documented, covering a wide range of map feature types.
src/main/java/com/flowingcode/vaadin/addons/googlemaps/GoogleMap.java (1)
855-867
: LGTM! Verify styling functionality.The method is well-implemented and enhances map customization. Ensure the styling functionality works as expected with various style configurations.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Close #123
This PR includes new API that allows to add styling to map features and elements by defining style rules using stylers.
(See style-reference for more information).
This also includes a new demo call StyleFeaturesDemo that adds an example on how to use this new API. Specifically adds an example of how to hide POIs as it was the original request on #123. The demo features a comparison between a map without any style and a styled one, so differences can be observed and understood better.
Summary by CodeRabbit
New Features
Bug Fixes