Adds a hook in preview.tsx where global storybook mocks could be added
passes the same default mocks that are used in Jest tests into that hook
merges those mocks with any provided by the mswDecorator for a particular story
* chore: use pnpm to manage dependencies
* Fix CI errors
* Don't report Docker image size for external PRs
* Fix pnpm-lock.yaml formatting
* Fix module versions
* Ignore pnpm-lock.yaml
* Upgrade Cypress action for pnpm support
* Set up node and pnpm before Cypress
* Fix typescript issues
* Include patches directory in Dockerfile
* Fix Jest tests in CI
* Update lockfile
* Update lockfile
* Clean up Dockerfile
* Update pnpm-lock.yaml to reflect current package.json files
* remove yarn-error.log from .gitignore
* formatting
* update data exploration readme
* type jest.config.ts
* fix @react-hook issues for jest
* fix react-syntax-highlighter issues for jest
* fix jest issues from query-selector-shadow-dom
* fix transform ignore patterns and undo previous fixes
* add missing storybook peer dependencies
* fix nullish coalescing operator for storybook
* reorder storybook plugins
* update editor-update-tsd warning to new npm script
* use legacy ssl for chromatic / node 18 compatibility
* use pnpm for visual regression testing workflow
* use node 16 for chromatic
* add @babel/plugin-proposal-nullish-coalescing-operator as direct dependency
* try fix for plugin-server
* cleanup
* fix comment and warning
* update more comments
* update playwright dockerfile
* update plugin source types
* conditional image size reporting
* revert react-native instructions
* less restrictive pnpm verions
* use ref component name in line with style guide
Co-authored-by: Jacob Gillespie <jacobwgillespie@gmail.com>
* feat(calendar): option to show Sunday first
* add week_start to app context
* support weekStart in LemonCalendar
* use the weekStart from appContext
* run with newer black
* add storybook context
* feat: test a11y with Cypress
* axe test more pages
* archive a11y violations on success too
* remove date from file path
* don't warn if no accessibility files to upload... they're not on all test jobs
* support switching accessibility tests to failing
* support aria label on lemon buttons
* add story book axe add-on
* Defuckulate the tests
* oops
* can't stop skipping a11y failures for home just yet
* storybook form stories
* improve form story
* improve form story
* chore(npm): upgrade typescript
* upgrade kea-forms
* upgrade to new kea-forms with better value/onChange support
* fix feature flags form
* fix few other forms
* update stories
* sort and description
* Put building block component stories under "Lemon UI"
* Use `LemonTable` in `icons` story
* Add Lemon UI overview
* Update `LemonRow` JSDoc
* Fix story titles
* Fix `LemonTable` header height
* Update some stories
* Fix `IconMagnifier` size
* Use `Spinner` in `LemonSwitch` loading state
* Use `Spinner` in `LemonSwitch` and make `LemonRow` mandatory
* Move `LemonTextArea` to "Lemon UI" in Storybook
* Update Lemon UI.stories.mdx
* Fix some buttons
* Refactor `LemonSwitch` a bit and add stories
* Refactor `AlertMessage` a bit and add stories
* Remove old `IconRocket`
* Add `LemonModal` story
* Refactor `LemonCheckbox` stories
* Update Lemon UI.stories.mdx
* Tune styles
* Update `LemonSpacer` (`LemonDivider`) and `LemonRow` disabled state
* Add `Lettermark` and `Splotch`
* Add `LettermarkColor.Default`
* Fix imports
* Update LemonSwitch.stories.tsx
* add tips
* rename newDashboardForm to newDashboardLogic
* don't be tight with words
* remove unused code
Co-authored-by: Michael Matloka <dev@twixes.com>
* thrown an explicit error if can't render react app (shown on the toolbar authorize scene)
* remove reverse logic connection
* upgrade kea, remove deprecated code
* don't permanently auto-connect this logic
* add few direct connections
* remove automatic mount
* fix few extra setState calls
* improve howto create stories
* refactor new dashboard form
* use new form component for flags
* new flag story
* refactor scene stories to use <App />
* add even more default mocks
* fix two bugs
* fix more test issues
* increase the quality of mocked data
* fix new dashboard redirect logic, simplify code even further
* fix test
* update docs
* add storysource
* get source loading to work
* rename DataDisplay to Components, must opt out of code panels
* clean up scene names in code
* default to docs view, start with welcome page, fix more stories
* clean up page names, add howtos
* set view modes
* storybook filters scenes
* event list preview
* rename some stories
* support ctx.f() in mocks
* redo story
* rename some
* all insights card and list views
* wrap LineGraph in an error boundary
* fix charts not loading on storybook
* new trends graphs
* new insight stories
* separate to clean
* rearrange stories
* fix bug in storybook with mock data
* convert to TS, fix static path deprecation
* wrap all scenes with KeaStory, deprecate getReduxState
* remove old text
* don't complain about postcss
* remove ApiSelector, revert to ".js" main
* preview ".ts"
* fix msw
* move kea story
* fix urls
* add /decide handler
* mount logics that are there on app
* reduce boilerplate
* refactor history list storybook api
* separate data
* refactor(taxonomic-filter): add api mock functions
* chore: remove makeApi from storybook preview.js
* feat(correlation): add multiselect for property names
Previously we had a simple text input box that was splitting the input
to get a list of property names. This doesn't give the greatest user
experience.
Now we have a simple select box that includes:
1. search filtering for options
2. multiselecting options
3. a select $all, although this is pretty poorly implemented at the
moment, for instance you can select $all, at the same time as
selecting a subset of properties.
* add a little commentary around PropertyNamesSelect
* add deps to useEffect
* ignore return type eslint issues
* just use console.log instead of actions
* remove unused import
* chore: add error condition
* chore(correlation): update styling of property select
This puts it more in line with
https://www.figma.com/file/gQBj9YnNgD8YW4nBwCVLZf/PostHog-App?node-id=4200%3A30715
* Add no search results message
* input focus border
* fix type
* use onBlur
* make checkbox checked colour change
* make query bold in no results message
* add clear
* Implement search highlighting
* fix typing
* add regex split comment
* if no property names selected, default to $all
* typo
* Add test for selection component
* Add test highlighting onChange lag and clicking outside
* click out side should depend on hide
* make sure onChange triggered on clear or select all
* chore(correlation): funnel story with correlation events and properties
This commit:
1. adds msw so we can easily mock the API requests
2. starts msw on storybook page load
3. adds the `mockServiceWorker.js` to storybook public folder so it can
be loaded by the frontend
4. adds a Funnel story that defines the funnel and correlation
responses
Note that we also define types for requests and responses. These could
be shared with the actual application code, so we can explicitly couple
the application changes to updating storybooks, i.e. to help avoid
stories going stale.
The requests and responses are quite basic, but they are sufficient to
be able to easily see and make changes. It has a requirement that it
should be easy for anyone else who comes to the code to easily parse and
be able to make updates. We don't want these to be rotten stories but
*the place* that people go to first when making their changes.
Having simple handwritten request/responses also introduces the
stability needed to, for example, use regression tests. Changes are
deliberate.
* refactor(storybook): move funnel stories to their own file
This also does quite a bit of cleaning up of the storybook and funnel
story code. Trying to come down on an acceptable way to manage the
sample data.
* dev(storybook): specify public dir when building storybook
I'm hoping this means that chromatic will function properly 🙏
* chore: add back the withApi decorator
* setup msw first
* dev(storybook): Make posthogjs work in chromatic
* dont use as cast for response types
* make hot module reload work
* initial storybook setup
* fix storybook babel config
* add two stories
* don't load if loaded
* make sure preflightLogic is loaded
* more examples for propertyKeyInfo
* kea storybook provider
* expose getReduxState on dev instances to make stories fast
* history for kea story provider
* remove old kea provider
* stories for insights
* stories for events
* fix .mdx support
* fix preloadedState type