Skip to content
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

Accounting for IDs of cluster features when the promoteID properties is set #4899

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

popkinj
Copy link

@popkinj popkinj commented Oct 25, 2024

This is to address the issue of loosing the ID for clusters when the promoteId property is set. Talked about here.

Launch Checklist

  • Confirm your changes do not include backports from Mapbox projects (unless with compliant license) - if you are not sure about this, please ask!
  • Briefly describe the changes in this PR.
  • Link to related issues.
  • Include before/after visuals or gifs if this PR includes visual changes.
  • Write tests for all new functionality.
  • Document any changes to public APIs.
  • Post benchmark scores.
  • Add an entry to CHANGELOG.md under the ## main section.

@codecov-commenter
Copy link

codecov-commenter commented Oct 25, 2024

Codecov Report

Attention: Patch coverage is 0% with 3 lines in your changes missing coverage. Please review.

Project coverage is 90.70%. Comparing base (ea3961c) to head (4ce3f32).

Files with missing lines Patch % Lines
src/data/feature_index.ts 0.00% 3 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main    #4899   +/-   ##
=======================================
  Coverage   90.69%   90.70%           
=======================================
  Files         265      265           
  Lines       38118    38121    +3     
  Branches     3141     3156   +15     
=======================================
+ Hits        34573    34576    +3     
+ Misses       2595     2592    -3     
- Partials      950      953    +3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@HarelM
Copy link
Collaborator

HarelM commented Oct 26, 2024

Please add a test that covers this scenario and a changelog entry.
If there's an open issue in the repo please link to it.

@popkinj
Copy link
Author

popkinj commented Oct 29, 2024

Please add a test that covers this scenario and a changelog entry. If there's an open issue in the repo please link to it.
Hey @HarelM

Just a quick sanity check... So I'm guessing I'll:

  • Make a new folder here called something like promote-id-cluster.
  • Write a style to have one clustered feature and one un-clustered.
  • Set the promoteId to some attribute.
  • Style the two features based on ID? If an ID is missing it would be one colour. If the ID is there it would be another (correct) colour.
  • Then finally create an expected.png file as the control.

I'm I heading down the right direction.

@HarelM
Copy link
Collaborator

HarelM commented Oct 29, 2024

I would look into writing a unit test and not an integration test. i.e. Look for other tests for this class and add the relevant scenario you fixed in the test.
It is best to check that the test fails without the fix you did to make sure the test actually tests your fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants