Allow simultaneous display of segment and stop labels
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.
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.
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.