break: condense and deprecate redundant styling-related props#473
Merged
jessicamcinchak merged 4 commits intomainfrom Aug 6, 2024
Merged
break: condense and deprecate redundant styling-related props#473jessicamcinchak merged 4 commits intomainfrom
jessicamcinchak merged 4 commits intomainfrom
Conversation
✅ Deploy Preview for oslmap ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
jessicamcinchak
commented
Aug 6, 2024
|
|
||
| /** | ||
| * @deprecated - please set `drawColor` regardless of `drawType` | ||
| */ |
Member
Author
There was a problem hiding this comment.
My thinking is we'll do a NPM prerelease with the @deprecated annotations, then fully remove them ahead of the stable release - sound like a decent plan?
DafyddLlyr
approved these changes
Aug 6, 2024
Contributor
DafyddLlyr
left a comment
There was a problem hiding this comment.
Super helpful and clear PR description thanks 🙌
| let featureColor = feature.get("color") || this.geojsonColor; // Use the geojsonColor if no color property exists | ||
|
|
||
| // Read color from geojson feature `properties` if set or fallback to prop | ||
| let featureColor = feature.get("color") || this.geojsonColor; |
Contributor
There was a problem hiding this comment.
nit: It looks like this could actually be a const?
Another "pre v1" task might be to set up linting here to catch a few of these type of things?
Member
Author
There was a problem hiding this comment.
Yep great shout - will handle in a followup PR 👍
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.
Our styling-related props haven't always been so consistent, so let's tidy them up with a v1 release in mind & flag some as deprecated.
Here's a quick overview of exisitng & changing style-related props based on various modes/functionalities:
drawColor(string) - fill automatically applied at 20% (used to be 10%)now deprecated - it's only possible to set a singledrawPointColor(string)drawTypeat a time anyways, sodrawColoris sufficientnow deprecateddrawFillColor(string)drawPointer(enum)markerColor(string)markerImage(enum)geojsonColor(string)geojsonFill(boolean) - 20% if truefeatureColor(string)featureFill(boolean) - 20% if truenow deprecatedfeatureBorderNone(string)Any other votes for deprecation or refactoring?