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

Enable turning off marks when step is define in slider components #115

Merged
merged 16 commits into from
Oct 18, 2023

Conversation

nadijagraca
Copy link
Contributor

@nadijagraca nadijagraca commented Oct 16, 2023

Description

Alterations of slider and range_slider code.

  • Enabling users to turn off marks when step argument is provided.
  • Setting marks argument to default to {} instead of None

Users can now set step, but turn off visible marks on their sliders by providing marks=None

Screenshot

Checklist

  • I have not referenced individuals, products or companies in any commits, directly or indirectly
  • I have not added data or restricted code in any commits, directly or indirectly
  • I have updated the docstring of any public function/class/model changed
  • I have added the PR number to the change description in the changelog fragment, e.g. Enable feature XXX ([#1](https://github.com/mckinsey/vizro/pull/1)) (if applicable)
  • I have added tests to cover my changes (if applicable)

Types of changes

  • Docs/refactoring (non-breaking change which improves codebase)
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Notice

  • I acknowledge and agree that, by checking this box and clicking "Submit Pull Request":

    • I submit this contribution under the Apache 2.0 license and represent that I am entitled to do so on behalf of myself, my employer, or relevant third parties, as applicable.
    • I certify that (a) this contribution is my original creation and / or (b) to the extent it is not my original creation, I am authorized to submit this contribution on behalf of the original creator(s) or their licensees.
    • I certify that the use of this contribution as authorized by the Apache 2.0 license does not violate the intellectual property rights of anyone else.

@nadijagraca nadijagraca added Status: Ready for Review ☑️ Issue/PR is ready for review - all tests have passed Issue: Bug Report 🐛 Issue/PR that report/fix a bug labels Oct 16, 2023
@nadijagraca nadijagraca self-assigned this Oct 16, 2023
Copy link
Contributor

@huong-li-nguyen huong-li-nguyen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for fixing the bug! 🚀

Copy link
Contributor

@huong-li-nguyen huong-li-nguyen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this!! 🚀

Could you answer one of the users who asked that this is now natively supported after merging? :)

Copy link
Contributor

@huong-li-nguyen huong-li-nguyen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@nadijagraca I just saw that you've changed the default of the step size to 1 - what I meant was to keep the default untouched and just to configure step=1 and marks=None in the app.py if possible?

I don't think we should change the default to 1 - e.g. what happens if min and max are 0 and 1? The defaults should be similar to the underlying component.

@nadijagraca nadijagraca merged commit 4868535 into main Oct 18, 2023
25 checks passed
@nadijagraca nadijagraca deleted the bug/components_range_slider_mark_step_bugfix branch October 18, 2023 17:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Issue: Bug Report 🐛 Issue/PR that report/fix a bug Status: Ready for Review ☑️ Issue/PR is ready for review - all tests have passed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants