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

docs: add randomness toggle on fit stacked series story #892

Merged
merged 2 commits into from
Nov 6, 2020

Conversation

nickofthyme
Copy link
Collaborator

Summary

Add randomness toggle on fit stacked series story per chat with @wylieconlon. Should be disabled by default to easily see the difference.

Screen Recording 2020-11-05 at 02 01 PM

Checklist

  • Proper documentation or storybook story was added for features that require explanation or tutorials

@nickofthyme nickofthyme added the :docs Anything related to documentation, API, storybook label Nov 5, 2020
Copy link
Member

@markov00 markov00 left a comment

Choose a reason for hiding this comment

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

I think we should use the RND_SEED in the Stroybook build process to have the same local and deployed version of storybook

@@ -158,7 +159,7 @@ export const Example = () => {
const parsedEndValue: number | 'nearest' = Number.isNaN(Number(endValue)) ? 'nearest' : Number(endValue);
const value = number('Explicit value (using Fit.Explicit)', 5);
const xScaleType = dataKey === 'ordinal' ? ScaleType.Ordinal : ScaleType.Linear;
const rng = getRandomNumberGenerator();
const rng = getRandomNumberGenerator(randomizeBoundingData ? undefined : '__seed__');
Copy link
Member

Choose a reason for hiding this comment

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

This, running locally doesn't have an effect because, by default, the getRandomNumberGenerator picks up the RNG_SEED passed when running the storybook.
It has only an effect on the deployed version because we don't build Storybook with that SEED.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Good point. I conditionally show the toggle if RNG_SEED is defined. I think it would be confusing for that boolean to have no effect in such case.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@codecov-io
Copy link

codecov-io commented Nov 6, 2020

Codecov Report

Merging #892 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #892   +/-   ##
=======================================
  Coverage   69.58%   69.58%           
=======================================
  Files         321      321           
  Lines       10636    10636           
  Branches     2196     2196           
=======================================
  Hits         7401     7401           
  Misses       3226     3226           
  Partials        9        9           
Flag Coverage Δ
unittests 69.58% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.


Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 9cd3459...9fc5157. Read the comment docs.

Copy link
Member

@markov00 markov00 left a comment

Choose a reason for hiding this comment

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

LGTM

@nickofthyme nickofthyme merged commit 3734537 into elastic:master Nov 6, 2020
@nickofthyme nickofthyme deleted the docs-fix-randomness branch November 6, 2020 15:48
@markov00
Copy link
Member

🎉 This PR is included in version 24.1.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@markov00 markov00 added the released Issue released publicly label Nov 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:docs Anything related to documentation, API, storybook released Issue released publicly
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants