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

Add ui playground by storybook #691

Merged
merged 23 commits into from
Jul 17, 2020
Merged

Add ui playground by storybook #691

merged 23 commits into from
Jul 17, 2020

Conversation

baurine
Copy link
Collaborator

@baurine baurine commented Jul 15, 2020

close #593

@baurine baurine marked this pull request as draft July 15, 2020 03:33
@baurine
Copy link
Collaborator Author

baurine commented Jul 16, 2020

Current progress:

image

Remain a big issue: how to set the API client instance for all stories, still working on it.

@baurine
Copy link
Collaborator Author

baurine commented Jul 16, 2020

image

Almost done, remain some cleanup work.

@baurine
Copy link
Collaborator Author

baurine commented Jul 17, 2020

Final effects:

企业微信20200717094713

企业微信20200717094817

Btw, ideally, we should use mocked data for storybook to avoid to depend on an extra service but here we use the real data, I think it is just fine, and maybe we can change it in the later gradually. How do you think about it? @breeswish

@baurine baurine marked this pull request as ready for review July 17, 2020 01:58
export default function MultiSelect<T extends IItem>(
props: IMultiSelectProps<T>
) {
function MultiSelect<T extends IItem>(props: IMultiSelectProps<T>) {
Copy link
Collaborator Author

@baurine baurine Jul 17, 2020

Choose a reason for hiding this comment

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

Changing to this writing style to fix the storybook runtime error. Ref: storybookjs/storybook#11419 (comment)

> After the installation, TiUP displays the absolute path of the corresponding `profile` file. You need to modify the following `source` command according to the path.
> **Note:**
>
> After the installation, TiUP displays the absolute path of the corresponding `profile` file. You need to modify the following `source` command according to the path.
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Auto formatted by the git commit hook.

@baurine
Copy link
Collaborator Author

baurine commented Jul 17, 2020

@breeswish PTAL when you're free, thanks!

Copy link
Member

@breezewish breezewish left a comment

Choose a reason for hiding this comment

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

This is awesome! We can also create issues to let contributors help us supply more stories for our components.

ui/package.json Outdated
"gen:browserlist": "gulp gen:browserlist"
"gen:browserlist": "gulp gen:browserlist",
"storybook": "start-storybook -p 9009 -s public",
"build-storybook": "build-storybook -s public"
Copy link
Member

Choose a reason for hiding this comment

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

Maybe we don't need build-storybook

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I think so, will remove it soon.

@@ -0,0 +1,23 @@
import React from 'react'
Copy link
Member

Choose a reason for hiding this comment

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

We can drop the standard ant selects

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Ok.

@breezewish breezewish merged commit 4619b57 into pingcap:master Jul 17, 2020
@baurine baurine deleted the storybook branch July 17, 2020 07:52
breezewish added a commit that referenced this pull request Aug 3, 2020
* ui: Add storybook (#691)
* build(deps): bump lodash from 4.17.15 to 4.17.19 in /ui/tests (#695)
* ui: I18N for form validation (#698)
* build(deps): bump lodash from 4.17.15 to 4.17.19 in /ui (#696)
* telemetry: Report dashboard internal version (#709)
* telemetry: Update router style (#707)
*: update system report table name (#693)
* build(deps): bump elliptic from 6.5.2 to 6.5.3 in /ui (#712)
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.

ui: create playground page by storybook
3 participants