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.
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(web): preset layer style #1156
feat(web): preset layer style #1156
Changes from 6 commits
9fe6b34
e9cb911
af10d68
87b4b74
81d8897
8156831
00fc035
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
🛠️ Refactor suggestion
Consider extracting menuItems definition for improved maintainability.
The
menuItems
array is well-structured and comprehensive, with proper use of internationalization and consistent onClick handlers. However, its large size might impact readability and maintainability of the component.Consider extracting the
menuItems
definition to a separate file or function. This would make the component more focused and easier to maintain. For example:menuItems.ts
in the same directory.menuItems
array to this file, exporting it as a function that takest
andhandleLayerStyleAddition
as parameters.Example:
This refactoring will improve the component's readability and make it easier to maintain and update the menu items in the future.
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.
🛠️ Refactor suggestion
Consider adding stroke properties for more flexibility.
The
polygonStyle
constant provides basic styling for polygons. However, it lacks stroke-related properties that were present in other styles.Consider adding
stroke
,strokeColor
, andstrokeWidth
properties to provide more styling options. This would make the style more consistent with other polygon styles and offer greater flexibility.