Skip to content

mark.channels is an object#994

Merged
mbostock merged 2 commits into
mainfrom
mbostock/channel-object
Jul 15, 2022
Merged

mark.channels is an object#994
mbostock merged 2 commits into
mainfrom
mbostock/channel-object

Conversation

@mbostock
Copy link
Copy Markdown
Member

Broken out of #979. We’re already using a channel object for mark.initialize (since #801) so it makes sense to use an object here, too.

@mbostock mbostock requested a review from Fil July 14, 2022 23:25
@mbostock
Copy link
Copy Markdown
Member Author

Maybe the channels argument to the Mark constructor should be an object, too? We might want to add some accommodation for backwards-compatibility if we change that, though.

@mbostock
Copy link
Copy Markdown
Member Author

Okay I did the above thing, and I feel good about it being more consistent. It does mean we’re slightly more lax (we won’t detect when a mark declares a channel that duplicates one already declared by the built-in styles), but I think that’s fine. I made this backwards-compatible just in case there’s a custom Mark out there. We might remove the backwards-compatibility eventually but this feels like the graceful approach.

@mbostock mbostock merged commit ddf3db9 into main Jul 15, 2022
@mbostock mbostock deleted the mbostock/channel-object branch July 15, 2022 13:26
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.

2 participants