0
0
mirror of https://github.com/PostHog/posthog.git synced 2024-11-21 21:49:51 +01:00
Commit Graph

6 Commits

Author SHA1 Message Date
Harry Waye
01873b1780
feat(correlation): add multiselect for property names (#6407)
* 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
2021-10-20 14:12:32 +00:00
Harry Waye
88262c0e05
chore(correlation): funnel story with correlation events and properties (#6389)
* 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
2021-10-13 04:45:51 +00:00
Marius Andra
528f7d0dda
Storybook API connection toolbar (#5871)
* basic api selector toolbar

* api history
2021-09-11 00:34:15 +02:00
Marius Andra
c080d5f114
Deploy storybook.posthog.net (#5833)
* Deploy storybook.posthog.net

* test why this fails

* another experiment

* again...

* turn addon panels off by default

* debug ci script

* add welcome story

* try with other paths

* commit via action

* better welcome story

* remove branch exception

* keep the CNAME file

* remove branch exception

* remove duplicate checkout, fix paths

* remove branch exception
2021-09-07 12:00:44 +00:00
Marius Andra
a4221e4499
Onboarding storybook (#5827)
* remove stories folder

* return `null` like a component type can

* un-default exports

* add onboarding stories
2021-09-07 11:05:35 +02:00
Marius Andra
365a0f68d4
Storybook (#5714)
* 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
2021-08-25 10:38:33 +02:00