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

Composition: Allow refs versions in config #11294

Merged
merged 8 commits into from
Jun 24, 2020

Conversation

ndelangen
Copy link
Member

Issue: -testing versions is hard- also -users might manually know their list of versions-

What I did

I made it possible for users to specify in main.js their list of versions fr a ref!

// main.js
module.exports = {
  refs: {
    ember: {
      id: 'ember',
      title: 'Ember',
      url: 'https://next--storybookjs.netlify.app/ember-cli',
      versions: {
        next: 'https://next--storybookjs.netlify.app/ember-cli',
        master: 'https://master--storybookjs.netlify.app/ember-cli',
      },
    },
    cra: 'https://next--storybookjs.netlify.app/cra-ts-kitchen-sink',
  },
};

@ndelangen ndelangen added this to the 6.0 milestone Jun 24, 2020
@ndelangen ndelangen requested review from shilman and mrmckeb June 24, 2020 14:24
@ndelangen ndelangen self-assigned this Jun 24, 2020
@shilman shilman changed the title Fix/allow refs versions in config Composition: Allow refs versions in config Jun 24, 2020
Copy link
Member

@shilman shilman left a comment

Choose a reason for hiding this comment

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

LGTM

@ndelangen ndelangen requested a review from stijnkoopal as a code owner June 24, 2020 22:25
@shilman shilman modified the milestones: 6.0, 6.0 composition Jun 24, 2020
@shilman shilman merged commit 826f328 into next Jun 24, 2020
@tmeasday
Copy link
Member

@ndelangen which takes precedence? The user specified one or the /metadata.json one (assuming both exist)?

I think the user one should (also people might want an easy way to cull the list of versions without manually spec-ing URLs). But this can come later I am thinking.

@ndelangen
Copy link
Member Author

metadata.json would take precedence if it was loaded

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants