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

mark.channels is an object #994

Merged
merged 2 commits into from
Jul 15, 2022
Merged

mark.channels is an object #994

merged 2 commits into from
Jul 15, 2022

Conversation

mbostock
Copy link
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
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
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