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

Make text-max-width require symbol-placement: point #666

Closed

Conversation

LostDragonist
Copy link
Contributor

@LostDragonist LostDragonist commented May 17, 2024

When investigating maplibre/maplibre-gl-js#4124, I noticed 'text-max-width' is not used when 'symbol-placement' is anything other than 'point'. This is an attempt to document this behavior for other users.

Relevant native code: https://github.com/maplibre/maplibre-native/blob/main/src/mbgl/layout/symbol_layout.cpp#L381
Relevant JS code: https://github.com/maplibre/maplibre-gl-js/blob/main/src/symbol/symbol_layout.ts#L159

Edit: Hmm. The docs generation doesn't actually use any requires in the form of {"propery": "value"}. So the usefulness of this is pretty minimal at that moment. /shrug.

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.

This is just documenting the current code behavior. text-max-width
will be a constant value for any other symbol-placement.
@codecov-commenter
Copy link

codecov-commenter commented May 17, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 92.45%. Comparing base (c6bec09) to head (5cf0c73).
Report is 3 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #666   +/-   ##
=======================================
  Coverage   92.45%   92.45%           
=======================================
  Files         104      104           
  Lines        4624     4624           
  Branches     1303     1303           
=======================================
  Hits         4275     4275           
  Misses        349      349           

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

@LostDragonist LostDragonist marked this pull request as ready for review May 17, 2024 22:37
@HarelM
Copy link
Collaborator

HarelM commented May 18, 2024

Is this requires field used for validating the style?
Will this break any existing styles?

Thanks for the docs generation fix BTW!

@LostDragonist
Copy link
Contributor Author

Is this requires field used for validating the style? Will this break any existing styles?

Best I can tell, this is not used for any style validation and should not break existing styles. I tried running all sorts of styles through gl-style-validate and the "Requires X to be Y" construct doesn't appear to have any actual validation attached to it.

@HarelM
Copy link
Collaborator

HarelM commented May 20, 2024

I see, don't we plan to change this though? If we are planning on changing it I would wait with the docs update, wouldn't you?

@HarelM
Copy link
Collaborator

HarelM commented May 30, 2024

Closing, as I believe this is no longer relevant.
If this is not the case please let me know and I'll reopen it.

@HarelM HarelM closed this May 30, 2024
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