0
0
mirror of https://github.com/PostHog/posthog.git synced 2024-11-28 18:26:15 +01:00
Commit Graph

20 Commits

Author SHA1 Message Date
Paul D'Ambra
36622515f1
fix: home accessibility (#11211)
* 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
2022-08-09 20:01:58 +01:00
Ben White
893c483adf
feat: LemonButton refactor (#11093) 2022-08-08 08:27:00 +02:00
Ben White
8c42c7090f
feat: Extended utility classes and updated color palette (#11047) 2022-08-01 14:09:44 +00:00
Marius Andra
9d7b53ea1b
chore(frontend): remove <Provider> (#10556)
* chore(frontend): remove <Provider>

* this is also not how we use storybook
2022-06-29 16:08:30 +02:00
Ben White
dd0695a24c
feat(subscriptions): Insight Subscriptions (#10197)
* Added modal for subscriptions
* Added unsubscribe endpoint
* Added cronjob for sending subscriptions
2022-06-14 15:14:44 +00:00
Marius Andra
c2a97ee645
feat(frontend): storybook form stories (#9173)
* 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
2022-05-10 11:36:34 +02:00
Michael Matloka
58b59c48b3
docs(storybook): Lemon UI (#9426)
* 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
2022-04-27 12:20:52 +02:00
Marius Andra
7c93054453
refactor(frontend): several tiny refactors vol 2 (#9136)
* add tips

* rename newDashboardForm to newDashboardLogic

* don't be tight with words

* remove unused code

Co-authored-by: Michael Matloka <dev@twixes.com>
2022-03-24 11:38:27 +01:00
Marius Andra
715056ab69
refactor(frontend): several tiny refactors (#9126)
* 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
2022-03-21 13:45:10 +01:00
Marius Andra
26cf7625fe
feat(storybook): cleanup volume 4 - add code blocks (#9070)
* 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
2022-03-17 07:45:47 +00:00
Marius Andra
ef7c614d44
feat(storybook): cleanup volume 3 (#9052)
* onboarding

* move to utils file

* shuffle various insights around

* web performance

* insight error states

* fix recordings

* sort stories, create readmes, rename to clean

* add instance status api mock

* dashboard

* login

* password reset

* signup

* billing

* toolbar

* mock posthog-js in tests
2022-03-16 17:42:07 +01:00
Marius Andra
a6faa54dff
feat(storybook): cleanup volume 2 (#9049)
* 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
2022-03-16 09:14:16 +01:00
Marius Andra
c271eb99a5
feat(storybook): cleanup volume 1 (#9033)
* 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
2022-03-15 17:36:51 +01:00
Marius Andra
10f2522c04
chore(storybook): update to 6.4 and add esbuild (#8893)
* upgrade to storybook 6.4

* storybook esbuild optimizations

* fix warnings reported by storybook
2022-03-08 14:17:59 +01:00
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