Skip to content

Addon Info: Remove broken prop type sort (keep defined order)#1711

Merged
danielduan merged 2 commits intostorybookjs:masterfrom
mordentware:addon-info-remove-broken-prop-sort
Aug 22, 2017
Merged

Addon Info: Remove broken prop type sort (keep defined order)#1711
danielduan merged 2 commits intostorybookjs:masterfrom
mordentware:addon-info-remove-broken-prop-sort

Conversation

@mordentware
Copy link
Copy Markdown
Contributor

@mordentware mordentware commented Aug 22, 2017

Issue: Prop Types sort is fundamentally broken. Following conversation in Discord, resolution was to remove sort (rather than add fixed name-based sort).

What I did

  • Removed the broken sort for prop types in the PropTable component within the Info addon.
  • Prop Types will now display in the order they are defined.

How to test

Put prop types for a component in a given order. They will display in that order.

Is this testable with jest or storyshots?
Yes (not currently tested for; tests for the Info addon are minimal and need fleshing out)

Does this need a new example in the kitchen sink apps?
No

Does this need an update to the documentation?
No

@mordentware
Copy link
Copy Markdown
Contributor Author

I really don't feel like the failing tests are anything to do with my change. Anyone care to comment on that?

@danielduan
Copy link
Copy Markdown
Member

looks good, thanks!

@danielduan danielduan merged commit fc1aecb into storybookjs:master Aug 22, 2017
@Hypnosphi
Copy link
Copy Markdown
Member

@mordentware @danielduan someone of you had to update storyshots (npm test -- -u)

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.

4 participants