-
Notifications
You must be signed in to change notification settings - Fork 179
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
chore(components): sub in storybook for styleguidist #7549
Merged
Merged
Changes from 85 commits
Commits
Show all changes
91 commits
Select commit
Hold shift + click to select a range
084411e
remove at flow, add tsconfig, change file extensions
b-cooper 86a7336
mixed to unknown and pull type imports out
b-cooper a08ddc6
add types
b-cooper 7e7e8d4
migrate synthetic mouse events over
b-cooper f926dc5
add typings for css modules dep
b-cooper 2b743ca
update loader
b-cooper c883f15
swap css modules plugin out
b-cooper b338c8a
tsx ext for jsx files
b-cooper dfeb0f5
pick at style props
b-cooper df2d557
tests with jsx ext
b-cooper 4a7ecd0
migrate more ts
b-cooper 0d7b91a
work through tsc errors
b-cooper 546b50a
jsx element return type
b-cooper 9481e40
jest styled components types
b-cooper dc17d4e
add types for react test renderer
b-cooper 8918d62
interface for prop types
b-cooper 0f1546a
misc clean up
b-cooper bb8b4d8
Merge branch 'edge' into components_port-source-to-ts
b-cooper 3db923d
shared data types
b-cooper d105565
continue clean up
b-cooper 6b65363
styled components types clean up
b-cooper 973a566
use PrimitiveComponent props
b-cooper a581bf3
knockin the errors down
b-cooper 7b71e14
address first batch of pr commments
b-cooper 2f28bf1
fine tooth combing
b-cooper eb371dd
clean up some tooltip type gunk
b-cooper be07f4b
clean up shared data stubstypes
b-cooper 8b23039
fixup: fix errors with atoms types
mcous 8f6ace7
forms bits
b-cooper baba5c3
fixup: get types working in interaction-enhancers
mcous 35c39ff
some deck comp type fixes
b-cooper 9ee75f8
memo exotic component type
b-cooper ffe808a
a couple more
b-cooper 9f82285
fixup: get types sorted in tooltips
mcous de6b1c4
correct type for deck components
b-cooper 1ec3f5d
add webpack env types and fix getDeckDefMock
b-cooper 65a9013
formatOptionLabel returns react node
b-cooper e795522
type for fill
b-cooper 6937b25
gitignore lib dir
b-cooper b3b9ce2
Well pointer events type
b-cooper 90578a0
memo exotic component
b-cooper aaead15
robot coords text extend text props
b-cooper f9ed804
indeterminate prop missing todo
b-cooper bcd9311
struggle through react select generic types
b-cooper 154b9cc
iron out select types
b-cooper 6b0c746
disabled prop fixups
b-cooper f01e901
last errors
b-cooper 7e214f1
no extension in import
b-cooper 1d5908a
add react docgen typescript
b-cooper 2c52afc
init storybook at root
b-cooper 207fdbb
try out migrating alert item to storybook
b-cooper 5bafba9
proof of concept btn and alert item in storybook
b-cooper eba7114
make stories for all atom
b-cooper 2494b20
icon stories
b-cooper b18be1a
checkbox field and dropdown field
b-cooper 0f835c0
Merge branch 'edge' into components_add-storybook
b-cooper cd9aeba
regrab deps
b-cooper 7c23b61
add tooltip story
b-cooper b39773a
house-keeping todo comments in tabbed nav and structure dirs
b-cooper dbfd400
stories for structure components
b-cooper ed529a6
add todo comment to slot map component
b-cooper 3c1b764
story for side panel
b-cooper 030eaf0
add modal stories
b-cooper c406412
add instrument stories
b-cooper b562f32
form group story
b-cooper fae5813
hoist basic story components to top
b-cooper 122d2f5
form components
b-cooper a66e8e4
select for module mode
b-cooper 62f3782
wire up storybook in place of styleguidist deploy
b-cooper 3b1d517
fix tab in makefile
b-cooper 325ea8d
add makefile to path for components build action
b-cooper 72b850f
deckLayerBlocklist control
b-cooper 82ebdb6
chore(components): sub in storybook for styleguidist
b-cooper c2a9fc8
remove duplicate lint override
b-cooper 0902454
delint
b-cooper ef32740
Merge branch 'edge' into components_add-storybook
b-cooper d0d9be0
bump flow memory capacity
b-cooper 04f18d4
nuke merge conflict
b-cooper 6aad3a7
clean up css lint
b-cooper 109785d
remove react styleguidist dep
b-cooper 0487af7
remove styleguidist markdown files
b-cooper 915478c
remove styleguide config
b-cooper 49fb4e5
remove styleguidist flow types
b-cooper 4764d83
Merge branch 'edge' into components_add-storybook
b-cooper 2d3a7b7
Merge branch 'edge' into components_add-storybook
b-cooper bcd2fdb
fixup: tweak eslint config for Storybook (#7708)
mcous 1fe352e
fixup: fix linting and storybook build
mcous 18058ca
fixup: add note about story classname
mcous 09678be
fixup: fix broken teardown and dev tasks for components
mcous f1686ff
Merge branch 'edge' into components_add-storybook
mcous df28643
fixup: fix TS linting after shared-data merge
mcous File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
const path = require('path') | ||
|
||
const { baseConfig } = require('@opentrons/webpack-config') | ||
|
||
module.exports = { | ||
webpackFinal: config => { | ||
// grab rules to parse out story files | ||
const storyRules = config.module.rules.filter(r => { | ||
return String(r.test).includes('stor') ? r : null | ||
}) | ||
return { | ||
...config, | ||
module: { | ||
...config.module, | ||
rules: [...baseConfig.module.rules, ...storyRules], | ||
}, | ||
} | ||
}, | ||
stories: ['../components/**/*.stories.@(js|jsx|ts|tsx)'], | ||
addons: ['@storybook/addon-links', '@storybook/addon-essentials'], | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
export const parameters = { | ||
actions: { argTypesRegex: '^on[A-Z].*' }, | ||
} | ||
|
||
import React from 'react' | ||
|
||
import { GlobalStyle } from '../app/src/atoms/GlobalStyle' | ||
|
||
// Global decorator to apply the styles to all stories | ||
export const decorators = [ | ||
Story => ( | ||
<> | ||
<GlobalStyle /> | ||
<Story /> | ||
</> | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
import * as React from 'react' | ||
import { AlertItem } from './AlertItem' | ||
mcous marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
import type { Story, Meta } from '@storybook/react' | ||
|
||
export default { | ||
title: 'Library/Molecules/AlertItem', | ||
component: AlertItem, | ||
argTypes: { onCloseClick: { action: 'clicked' } }, | ||
} as Meta | ||
|
||
const Template: Story<React.ComponentProps<typeof AlertItem>> = args => ( | ||
<AlertItem {...args} /> | ||
) | ||
|
||
export const Basic = Template.bind({}) | ||
Basic.args = { | ||
type: 'success', | ||
title: 'good job!', | ||
} | ||
|
||
export const OverriddenIcon = Template.bind({}) | ||
OverriddenIcon.args = { | ||
type: 'info', | ||
title: 'Alert with overridden icon', | ||
icon: { name: 'pause-circle' }, | ||
} | ||
|
||
export const Stackable: Story< | ||
React.ComponentProps<typeof AlertItem> | ||
> = args => ( | ||
<div> | ||
<Template {...args} type="warning" title={'Warning with close button'} /> | ||
<Template | ||
{...args} | ||
onCloseClick={undefined} | ||
type="warning" | ||
title={'Warning with no close button'} | ||
/> | ||
<Template {...args} type="warning" title={'Warning with no children'} /> | ||
<Template | ||
{...args} | ||
type="warning" | ||
title={'Warning with React Node children'} | ||
> | ||
<p>Some additional info</p> | ||
</Template> | ||
</div> | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
out of curiosity how come we gotta bump this up?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not bumping it can result in flow crashing with
Unhandled exception: SharedMem.Hash_table_full
🙃But yeah, as the codebase grew, we started seeing that particular flow crash. Added the config to bump it up to 20 in #4959. As Brian was working on this PR, he started seeing this crash again, and bumping it again (from 16 MB to 32 MB) seemed to resolve it.
Since Flow is on its way out, it seemed like the most straightforward thing to do to keep things chugging along rather than investigating it too deeply