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

feat(tabs): Implement a couple of features and fix bugs of tabs #47

Merged
merged 66 commits into from
Aug 28, 2020
Merged
Show file tree
Hide file tree
Changes from 57 commits
Commits
Show all changes
66 commits
Select commit Hold shift + click to select a range
1257eb2
feat(tabs): fix/add feature to the Tabs component
GuichiZhao Aug 4, 2020
a243b95
refactor(development): better dev/doc experience
GuichiZhao Aug 4, 2020
517711d
Merge remote-tracking branch 'origin/dev' into Loading
GuichiZhao Aug 4, 2020
3b60d1e
docs(tabs): add docs
GuichiZhao Aug 4, 2020
c852e77
test(tabs): remove invalid test
GuichiZhao Aug 4, 2020
a58f4de
Merge remote-tracking branch 'origin/dev' into Tabs
GuichiZhao Aug 4, 2020
134d651
fix(tabs): unidentified ts build error
GuichiZhao Aug 4, 2020
3a54512
fix(tabs): fix ts error
GuichiZhao Aug 5, 2020
fe3df09
feat(tabs): add controlled componet style
GuichiZhao Aug 5, 2020
60d38ae
test(tabs): improve coverage
GuichiZhao Aug 5, 2020
2f95105
Merge remote-tracking branch 'origin/dev' into Tabs
GuichiZhao Aug 5, 2020
f4ace93
style(tabs): ts lint
GuichiZhao Aug 5, 2020
b74b1f9
test(tabs): update snapshot
GuichiZhao Aug 5, 2020
e388dcf
feat(tabs): style is more customizable
GuichiZhao Aug 6, 2020
5b0cdc9
feat(tabs): seperate label and bottom
GuichiZhao Aug 7, 2020
1b69f08
feat(playground): load component as playground
GuichiZhao Aug 9, 2020
fbf3558
Merge branch 'dev' into Tabs
zctocm Aug 11, 2020
d4603d8
Merge branch 'dev' into Tabs
zctocm Aug 11, 2020
3ba4711
feat(tabs and playground): add playground loader; Add useImperative f…
GuichiZhao Aug 11, 2020
10faa03
Merge branch 'Tabs' of github.com:Conflux-Chain/react-ui into Tabs
GuichiZhao Aug 11, 2020
0656c49
fix: fix a syntax error due to merge possibly
GuichiZhao Aug 11, 2020
a307b3c
Merge branch 'dev' into Tabs
GuichiZhao Aug 12, 2020
2ab805a
test(tabs): add coverage
GuichiZhao Aug 12, 2020
4c92ba0
Merge remote-tracking branch 'origin/dev' into Tabs
GuichiZhao Aug 13, 2020
7c086d6
feat(navigation): app Navigation Component
GuichiZhao Aug 13, 2020
a38e90d
test(add expects to test): add expect
GuichiZhao Aug 14, 2020
e93fabb
test(add expects to test): add expect
GuichiZhao Aug 14, 2020
620f1eb
fix(tabs): use variables in style
GuichiZhao Aug 14, 2020
7aabc95
fix(tabs): changes names to handle
GuichiZhao Aug 14, 2020
61fca68
Merge branch 'Nav' into Tabs
GuichiZhao Aug 14, 2020
ff56c41
fix(tabs): fix merge conflict
GuichiZhao Aug 19, 2020
c6aa71f
docs(tabs): rename files
GuichiZhao Aug 19, 2020
e91a2d3
docs(tabs): update docs to conform with API
GuichiZhao Aug 19, 2020
418740e
fix(tabs): types defination
GuichiZhao Aug 19, 2020
4b126d6
test(tabs): add coverage
GuichiZhao Aug 19, 2020
2cfb3a7
test(tabs): update sanpshot
GuichiZhao Aug 19, 2020
3f964c4
Merge remote-tracking branch 'origin/dev' into Tabs
GuichiZhao Aug 19, 2020
bbb1132
fix(tabs): update snapshot
GuichiZhao Aug 19, 2020
5558f8b
fix(tabs): change nav from a function to a component
GuichiZhao Aug 20, 2020
8e22237
fix(tabs): change nav from a function to a component
GuichiZhao Aug 20, 2020
f4e5854
Merge branches 'Tabs' and 'Tabs' of github.com:Conflux-Chain/react-ui…
GuichiZhao Aug 20, 2020
e918834
fix(tabs): fix styles
GuichiZhao Aug 20, 2020
36c7d4a
fix(tabs): fix styles
GuichiZhao Aug 20, 2020
9a849c0
Merge branch 'Tabs' of github.com:Conflux-Chain/react-ui into Tabs
GuichiZhao Aug 20, 2020
6ca921e
fix(tabs): match design color
GuichiZhao Aug 20, 2020
0408e6d
Merge branch 'dev' into Tabs
zctocm Aug 24, 2020
8e797ca
style(tabs): changes some inlie styles to css
GuichiZhao Aug 24, 2020
71a6b1a
Merge branches 'Tabs' and 'Tabs' of github.com:Conflux-Chain/react-ui…
GuichiZhao Aug 24, 2020
84a8a70
style(tabs): fix colors
GuichiZhao Aug 24, 2020
4ce96d1
test(tabs): unpdate snapshot
GuichiZhao Aug 24, 2020
e60ccae
style(tabs): change file name
GuichiZhao Aug 25, 2020
7facfaa
style(tabs): change file name
GuichiZhao Aug 25, 2020
1aa4b37
Merge branch 'Tabs' of github.com:Conflux-Chain/react-ui into Tabs
GuichiZhao Aug 25, 2020
a7f5f69
fix(tabs): fix code review
GuichiZhao Aug 25, 2020
e7c436a
style(tabs): fix tabs
GuichiZhao Aug 25, 2020
0666b0b
Merge remote-tracking branch 'origin/dev' into Tabs
GuichiZhao Aug 25, 2020
bb8cca6
feat(tabs): update the snapshot
GuichiZhao Aug 25, 2020
b9f542a
Merge branch 'dev' into Tabs
yqrashawn Aug 26, 2020
c274f04
refactor(tabs): style.ts
yqrashawn Aug 26, 2020
13cb45d
Merge remote-tracking branch 'origin/tabs-style-fix' into Tabs
GuichiZhao Aug 26, 2020
346cc75
feat(tabs): remove code folder from ignore listy
GuichiZhao Aug 26, 2020
1913a63
Merge remote-tracking branch 'origin/dev' into Tabs
GuichiZhao Aug 27, 2020
c47b8fe
chore(github): update codeowners
GuichiZhao Aug 27, 2020
8179eb9
test(tabs): add a expect in a test case
GuichiZhao Aug 27, 2020
1e21ecc
test(tabs): use snapshot
GuichiZhao Aug 27, 2020
0222538
no message
GuichiZhao Aug 28, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 2 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,6 @@ esm/*
public/*
scripts/*
tests/*
loaders/*
pages/code/*

Choose a reason for hiding this comment

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

why ignore the code examples

Copy link
Author

Choose a reason for hiding this comment

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

For the same reason as loaders

Copy link
Author

Choose a reason for hiding this comment

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

done

Choose a reason for hiding this comment

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

I think we do need to lint example codes

Choose a reason for hiding this comment

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

I think so

*.config.js
2 changes: 2 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,12 @@ module.exports = {
},
parserOptions: {
project: './tsconfig.json',
projectFolderIgnoreList: ['/node_modules/'],
ecmaFeatures: {
jsx: true,
},
},

rules: {
indent: 0,
'@typescript-eslint/indent': 0,
Expand Down
14 changes: 14 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,20 @@
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "Launch via NPM",
"request": "launch",
"runtimeArgs": [
"run-script",
"docs-collect"
],
"runtimeExecutable": "npm",
"skipFiles": [
"<node_internals>/**"
],
"type": "pwa-node"
},
Comment on lines +8 to +19

Choose a reason for hiding this comment

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

there's a new auto attach feature in vscode debugger, there's no need to specify a launch.json config if it's just for temporary use

Choose a reason for hiding this comment

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


{
"type": "node",
"name": "vscode-jest-tests",
Expand Down
1 change: 0 additions & 1 deletion components/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ export { default as useMessages } from './use-messages'
export { default as useToasts } from './use-toasts'
export { default as useInput } from './input/use-input'
export { default as useModal } from './modal/use-modal'
export { default as useTabs } from './tabs/use-tabs'
export { default as useBodyScroll } from './use-body-scroll'
export { default as useClickAway } from './use-click-away'
export { default as useClipboard } from './use-clipboard'
Expand Down
8 changes: 4 additions & 4 deletions components/link/__tests__/__snapshots__/index.test.tsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ exports[`Link should render correctly 1`] = `
.link :global(.right) {
margin-right: 0;
}
</style></a><a href=\\"https://react.zeit-ui.co\\" class=\\"link \\"><span class=\\"icon left\\"><svg viewBox=\\"0 0 24 24\\" width=\\"24\\" height=\\"24\\" stroke=\\"currentColor\\" stroke-width=\\"1.5\\" stroke-linecap=\\"round\\" stroke-linejoin=\\"round\\" fill=\\"none\\" shape-rendering=\\"geometricPrecision\\" style=\\"color: currentColor;\\"><path d=\\"M18 13v6a2 2 0 01-2 2H5a2 2 0 01-2-2V8a2 2 0 012-2h6\\"></path><path d=\\"M15 3h6v6\\"></path><path d=\\"M10 14L21 3\\"></path></svg><style>
</style></a><a href=\\"https://react.zeit-ui.co\\" class=\\"link \\"><span class=\\"icon left\\"><svg fill=\\"none\\" stroke=\\"currentColor\\" stroke-linecap=\\"round\\" stroke-linejoin=\\"round\\" stroke-width=\\"1.5\\" shape-rendering=\\"geometricPrecision\\" viewBox=\\"0 0 24 24\\" height=\\"24\\" width=\\"24\\" style=\\"color: currentColor;\\"><path d=\\"M18 13v6a2 2 0 01-2 2H5a2 2 0 01-2-2V8a2 2 0 012-2h6M15 3h6v6M10 14L21 3\\"></path></svg><style>
.icon {
margin: 0 5px;
display: inline-flex;
Expand Down Expand Up @@ -231,7 +231,7 @@ exports[`Link should render correctly 1`] = `
.link :global(.right) {
margin-right: 0;
}
</style></a><a href=\\"https://react.zeit-ui.co\\" class=\\"link \\">link<span class=\\"icon right\\"><svg viewBox=\\"0 0 24 24\\" width=\\"24\\" height=\\"24\\" stroke=\\"currentColor\\" stroke-width=\\"1.5\\" stroke-linecap=\\"round\\" stroke-linejoin=\\"round\\" fill=\\"none\\" shape-rendering=\\"geometricPrecision\\" style=\\"color: currentColor;\\"><path d=\\"M18 13v6a2 2 0 01-2 2H5a2 2 0 01-2-2V8a2 2 0 012-2h6\\"></path><path d=\\"M15 3h6v6\\"></path><path d=\\"M10 14L21 3\\"></path></svg><style>
</style></a><a href=\\"https://react.zeit-ui.co\\" class=\\"link \\">link<span class=\\"icon right\\"><svg fill=\\"none\\" stroke=\\"currentColor\\" stroke-linecap=\\"round\\" stroke-linejoin=\\"round\\" stroke-width=\\"1.5\\" shape-rendering=\\"geometricPrecision\\" viewBox=\\"0 0 24 24\\" height=\\"24\\" width=\\"24\\" style=\\"color: currentColor;\\"><path d=\\"M18 13v6a2 2 0 01-2 2H5a2 2 0 01-2-2V8a2 2 0 012-2h6M15 3h6v6M10 14L21 3\\"></path></svg><style>
.icon {
margin: 0 5px;
display: inline-flex;
Expand Down Expand Up @@ -276,15 +276,15 @@ exports[`Link should render correctly 1`] = `
.link :global(.right) {
margin-right: 0;
}
</style></a><a href=\\"https://react.zeit-ui.co\\" class=\\"link \\"><span class=\\"icon left\\"><svg viewBox=\\"0 0 24 24\\" width=\\"24\\" height=\\"24\\" stroke=\\"currentColor\\" stroke-width=\\"1.5\\" stroke-linecap=\\"round\\" stroke-linejoin=\\"round\\" fill=\\"none\\" shape-rendering=\\"geometricPrecision\\" style=\\"color: currentColor;\\"><path d=\\"M18 13v6a2 2 0 01-2 2H5a2 2 0 01-2-2V8a2 2 0 012-2h6\\"></path><path d=\\"M15 3h6v6\\"></path><path d=\\"M10 14L21 3\\"></path></svg><style>
</style></a><a href=\\"https://react.zeit-ui.co\\" class=\\"link \\"><span class=\\"icon left\\"><svg fill=\\"none\\" stroke=\\"currentColor\\" stroke-linecap=\\"round\\" stroke-linejoin=\\"round\\" stroke-width=\\"1.5\\" shape-rendering=\\"geometricPrecision\\" viewBox=\\"0 0 24 24\\" height=\\"24\\" width=\\"24\\" style=\\"color: currentColor;\\"><path d=\\"M18 13v6a2 2 0 01-2 2H5a2 2 0 01-2-2V8a2 2 0 012-2h6M15 3h6v6M10 14L21 3\\"></path></svg><style>
.icon {
margin: 0 5px;
display: inline-flex;
align-self: center;
color: currentColor;
width: 1rem;
}
</style></span>link<span class=\\"icon right\\"><svg viewBox=\\"0 0 24 24\\" width=\\"24\\" height=\\"24\\" stroke=\\"currentColor\\" stroke-width=\\"1.5\\" stroke-linecap=\\"round\\" stroke-linejoin=\\"round\\" fill=\\"none\\" shape-rendering=\\"geometricPrecision\\" style=\\"color: currentColor;\\"><path d=\\"M18 13v6a2 2 0 01-2 2H5a2 2 0 01-2-2V8a2 2 0 012-2h6\\"></path><path d=\\"M15 3h6v6\\"></path><path d=\\"M10 14L21 3\\"></path></svg><style>
</style></span>link<span class=\\"icon right\\"><svg fill=\\"none\\" stroke=\\"currentColor\\" stroke-linecap=\\"round\\" stroke-linejoin=\\"round\\" stroke-width=\\"1.5\\" shape-rendering=\\"geometricPrecision\\" viewBox=\\"0 0 24 24\\" height=\\"24\\" width=\\"24\\" style=\\"color: currentColor;\\"><path d=\\"M18 13v6a2 2 0 01-2 2H5a2 2 0 01-2-2V8a2 2 0 012-2h6M15 3h6v6M10 14L21 3\\"></path></svg><style>
.icon {
margin: 0 5px;
display: inline-flex;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -461,7 +461,7 @@ exports[`Select should render correctly when variant=text 1`] = `
line-height: calc(2.25 * 16px);
min-width: 0;
}
</style></span><svg viewBox=\\"0 0 24 24\\" width=\\"18\\" height=\\"18\\" stroke=\\"currentColor\\" stroke-width=\\"1.5\\" stroke-linecap=\\"round\\" stroke-linejoin=\\"round\\" fill=\\"none\\" shape-rendering=\\"geometricPrecision\\" style=\\"color: currentColor;\\"><path d=\\"M20 6L9 17l-5-5\\"></path></svg></div><style>
</style></span><svg fill=\\"none\\" stroke=\\"currentColor\\" stroke-linecap=\\"round\\" stroke-linejoin=\\"round\\" stroke-width=\\"1.5\\" shape-rendering=\\"geometricPrecision\\" viewBox=\\"0 0 24 24\\" height=\\"18\\" width=\\"18\\" style=\\"color: currentColor;\\"><path d=\\"M20 6L9 17l-5-5\\"></path></svg></div><style>
.option {
display: flex;
max-width: 100%;
Expand Down