Differentiate Line/Path and add Lines/Paths alternatives #2822
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.
There are two API decisions here that I am not 100% confident about:
Line
vsPath
for sorted vs. unsorted, withPath
also preserving nulls (showing a break in the path) butLine
dropping them.Line
vsLines
(and equivalent) for using aLine2D
artist vs. aLineCollection
.One alternative would have been to have a single
Line
mark with asort: bool
parameter, and perhaps acollection: bool
parameter. I think it makes sense to expose functionality more obviously, and to try and limit mark parameters to mappables? Although, at some point the number of distinct marks would get out of control and it would be hard to find one you are looking for.The other weird thing about this convention is that many singular-named marks that draw with collections and hence are pretty fast. So the rule becomes something like; when there is a singular/plural pair, it implies that the singular mark is slow (but more fully featured or easier to work with as an artist) but a singular mark itself does not imply slowness? Kind of messy.