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

feat: Add onClusterManager to Clustering to allow easy default overrides (e.g. setting minClusterSize) #473

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

darronschall
Copy link

@darronschall darronschall commented Dec 12, 2023

When using the default cluster renderer, allow callers to easily configure the minClusterSize value.

Thank you for opening a Pull Request!


Before submitting your PR, there are a few things you can do to make sure it goes smoothly:

  • Make sure to open a GitHub issue as a bug/feature request before writing your code! That way we can discuss the change, evaluate designs, and agree on the general idea
  • Ensure the tests and linter pass
  • Code coverage does not decrease (if any source code was changed)
  • Appropriate docs were updated (if necessary)

Fixes #388 🦕

Copy link

google-cla bot commented Dec 12, 2023

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@Jasperav
Copy link

I actually think it's easier to add a lambda to the current method which can look like this:

modifyDefaultClusterRenderer: (DefaultClusterRenderer) -> Unit = { }

and than users can just do whatever they want with it, so you add 1 method to the existing method and call the lambda after creating the default cluster renderer.

@darronschall darronschall force-pushed the add-min-cluster-size-to-clustering branch 4 times, most recently from 3871375 to be54c55 Compare December 13, 2023 15:00
@darronschall darronschall changed the title Allow minClusterSize to pass-through on Clustering Add onClusterManager to Clustering to allow easy default overrides (e.g. setting minClusterSize) Feb 7, 2024
@darronschall darronschall changed the title Add onClusterManager to Clustering to allow easy default overrides (e.g. setting minClusterSize) feat: Add onClusterManager to Clustering to allow easy default overrides (e.g. setting minClusterSize) Feb 7, 2024
When using the default cluster renderer, allow callers to easily configure the `minClusterSize` value.
…terManager`.

This allows callers to easily access the default `clusterManager` and renderer that the library sets up, allowing for further configuration beyond just `minClusterSize`, while keeping the number of params of `Composable` to a minimum.
@darronschall darronschall force-pushed the add-min-cluster-size-to-clustering branch from be54c55 to 9a0f38e Compare February 15, 2024 14:33
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.

Allow a way to set options for Clustering like setMinClusterSize
3 participants