-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
[docs] Add distance expression entry; update other expressions #9655
Conversation
@colleenmcginnis I tried to push my branch to our staging server but it didn't work. Not sure if it's possible for this part of our documentation? |
It's possible, but it's not something we do often. It would require updating the submodule in /mapbox-gl-js-docs to this commit and then pushing to If you were just pushing to staging to check the formatting, that's something I (or likely someone from the GL JS team) could do as a part of a PR review. In the future we could pair on something like this, but unfortunately this week is a busy one for our team so if this is an urgent change I'd recommend asking for a reviewer to check formatting locally instead. |
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.
🙇 for docs improvements
Noting here that the the unit test failure is from a missing implementation:
|
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.
Looks OK to me as far as the iOS/macOS compatibility entries.
The iOS/macOS code generation scripts try to reformat the doc
strings into jazzy format (Doxygen for block-level formatting, Markdown for inline formatting, with specific formatting for symbol references). That step would be insufficient for these strings, both before and after the changes, but fortunately the NSExpression documentation is handwritten separately instead of generated from the style specification. The NSExpression documentation doesn’t go into quite as much detail about distance
, but it does link to the published style specification for additional details.
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.
👍
@mapbox/gl-js I added screenshots previewing all of the expressions doc updates in the first post of this ticket. This PR pairs with this branch in mapbox-gl-js-docs. @ryanhamley I wasn't sure about the "needle / haystack" terminology in the It's a tough trade-off between clarity and consistency. I tried the version below first and I do think it's too messy and unclear with the multiple |
@chloekraw I think if that's what we've standardized the rest of the docs around then it's ok to make it more generic. I definitely prefer the TLDR: I'm not married to the |
@ryanhamley thanks! yeah, I think that makes sense, and I do appreciate that your version is clearer about the usage. I think we can also achieve that goal through creating a GL JS example. I was trying to think of a way to add a sentence to the expression definition that could clarify the first vs. second argument, but I came up blank. I think the first argument could be described as a e.g. "search query" but I couldn't really think of a general term for the second argument. If you have a suggestion, let me know! |
@asheemmamoowala @ryanhamley @ansis @1ec5 @zmiao @alexshalamov thanks for all the feedback! I'm going to merge this and cherrypick to |
* Update style specification compatibility tables (release-vanillashake) (#9509) Updated the style specification compatibility tables for Android map SDK v9.1.0, iOS map SDK v5.8.0, and macOS map SDK v0.15.0. * ios-v5.9.0, macos-v0.16.0 compatibility Updated the compatibility tables for iOS map SDK v5.9.0 and macOS map SDK v0.16.0. * [docs] Add distance expression entry; update other expressions; update symbol-z-order (#9655) fix #9617 * [docs] Add android version support for stretchable icons (#9672) Co-authored-by: Minh Nguyễn <mxn@1ec5.org> Co-authored-by: Chloe Krawczyk <chloe.krawczyk@mapbox.com>
Changelog:
distance
:within
:format
:image
expression explicitly in the documentation entryindex-of
:in
expressionget
andhas
use "second argument." Considering["index-of", needle, haystack, fromIndex]
, it's the third argument that can be optionally provided to configure the start index of the search.slice
:in
expressionString
toLookup
becauseslice
is closer to thein
andindex-of
expressions in function than other expressions in theString
group. No other expressions in theString
group work on arrays.["slice", input, startIndex, endIndex]
, it's the third argument that can be optionally provided to configure the end index.match
:-
instead of*
for formatting bullet pointsinterpolate
: no changes madecc @lbutler @zmiao @alexshalamov @1ec5