Skip to content

Conversation

jacktreg
Copy link

@jacktreg jacktreg commented Dec 13, 2024

Exposes a new Prop to ReactSpeedometer called showStopsAndCustomSegmentLabels. This Prop is not required and defaults to false to maintain existing behavior for users on earlier versions.

The logic simply allows the _renderLabels function to continue if this Prop is set to true. Previously, if isCustomLabelsPresent && isCustomLabelsValid evaluated to true the function would strictly render the custom segment labels and then exit, skipping the logic to render the segment stop labels.

@palerdot
Copy link
Owner

Thank you for the PR! I will take a look when time permits and merge this into master if it looks fine. Tests might be required and I will see if I'm able to add them for this change.

@palerdot
Copy link
Owner

Couple of things might make this PR more easier to review and merge

  • Adding an example to storybook for this particular behaviour, so that it can both act as a documentation and gives visual feedback
  • Tests. There is an existing test suite with cypress, and it would be great if there is a test for the PR.

If not, I will consider adding these myself for merging to master.

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