Commit Graph

10 Commits

Author SHA1 Message Date
Jack Westbrook
0e73c4d387
Storybook: Bump to 8.1.6 (#88899)
* chore(storybook): bump to latest 8.1.6

* chore(yarn): dedupe yarn.lock post storybook update

* chore(typescript): align react types across repo
2024-06-07 14:31:31 +02:00
Ashley Harrison
6f9527b4c2
DashboardGrid: Ensure drag handle always follows the cursor (#88099)
use flushSync in react-grid-layout
2024-05-28 09:46:04 +01:00
Jack Westbrook
65b2834420
Grafana UI: Bump to Storybook 8 (#87722)
* chore(storybook): run yarn dlx storybook@latest upgrade

* chore(storybook): remove storybook/blocks patch

* chore(yarn): clean up storybook dependencies

* feat(storybook): migrate to v8 config via migration codemods

* refactor(storybook): update stories to use v8 types via codemod

* refactor(storybook): update stories to use preview-api instead of client-api

* refactor(storybook): replace mdx usage of ArgsTable with PureArgsTable

* refactor(storybook): migrate remaining mdx files to v8 storybook/blocks api

* refactor(storybook): clean up mdx imports and blocks component names

* chore(storybook): clean up typescript configuration

* fix(frontend): align types/react versions across monorepo so grafana ui can be built

* fix(storybook): pub back react-docgen-typescript and use ArgTypes so props tables work

* chore(storybook): patch blocks package to expose Preview component

* revert(storybook): revert changes related to using Canvas component in mdx files

* Storybook upgrade: Fix icon typing (#87793)

fix iconOptions typing

* refactor(storybook): prefer as const over asserting types

* revert(storybook): put back correct case in box.mdx

---------

Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2024-05-15 15:49:00 +02:00
Gilles De Mey
390408b1ce
Alerting: Fix incorrect decoding for alert rules with % characters (#76148)
* fixes incorrect decoding for alert rules with % characters

* Patch history package to stop decoding path

* Rename rule id extraction function, update tests

* Fix patch file

* Fix copyFrom parameter encoding

* Fix conflict commit

* Fix test

---------

Co-authored-by: Konrad Lalik <konrad.lalik@grafana.com>
Co-authored-by: Sonia Aguilar <soniaaguilarpeiron@gmail.com>
2023-10-19 11:51:52 +02:00
Jack Westbrook
cc590599de
Chore: Bump storybook 7.4.5 (#75652)
* Wip

* chore(grafana-ui): bump storybook to 7.4.5 and patch blocks
2023-10-03 16:35:29 +02:00
Jack Westbrook
33ba5310ab
Chore: Upgrade Storybook to v7 (#65943)
* chore(grafana-ui): begin migration to storybook7

* refactor(storybook): begin cleanup of storybook and addon configs

* chore(storybook): add storybook/blocks to keep yarn berry happy

* chore(storybook): rename intro story for storybook 7

* chore(stories): rename internal stories to support SB7 story name mapper

* chore(betterer): update glob to support internal story renaming

* chore(stories): silence TS errors for subcomponents in SB7

* fix(clickoutsidewrapper): window | document can be undefined not null

* chore(storybook): remove patch for 6.5.16

* revert(storybook): put back story globs

* docs(storybook): replace removed <Props /> with <ArgsTypes /> in mdx files

* docs(storybook): use ArgTypes instead of ArgsTable

* chore(storybook): use correct ArgTypes import name in mdx files

* chore(storybook): patch blocks to expose Preview component for docs

* chore(storybook): rename deprecated ComponentStory and ComponentMeta for v7

* feat(storybook): add STORY env var to customise which stories storybook should load

* chore(storybook): bump to 7.0.4

* fix(storybook): set esbuild minify target to fix erroring docs in production builds

* fix(toolbarbuttonrow): fix import path to prevent error in storybook doc

* docs(storybook): fix up some more stories

* chore(storybook): more config updates to match storybook documentation

* chore(storybook): bump to 7.0.5

* Apply suggestions from code review

Co-authored-by: Joao Silva <100691367+JoaoSilvaGrafana@users.noreply.github.com>

* chore(storybook): fix broken merge causing types issues

* chore(storybook): mimic broken alphabetical storySort and docs overview ordering

* docs(storybook): fix button docs adding p tags due to mdx2

* chore(storybook): bump to 7.0.10

* chore(storybook): apply patch on yarn install

* chore(text): update stories for storybook 7

* fix(storybook): make sure globs don't include internal stories in production

---------

Co-authored-by: Joao Silva <100691367+JoaoSilvaGrafana@users.noreply.github.com>
2023-05-11 14:26:12 +02:00
Ashley Harrison
1261345b81
Chore: Upgrade to react 18 (#64428)
* update react 18 related deps

* fix some types

* make sure we're on react-router-dom >= 5.3.3

* Use new root API

* Remove StrictMode for now - react 18 double rendering causes issues

* fix + ignore some @grafana/ui types

* fix some more types

* use renderHook from @testing-library/react in almost all cases

* fix storybook types

* rewrite useDashboardSave to not use useEffect

* make props optional

* only render if props are provided

* add correct type for useCallback

* make resourcepicker tests more robust

* fix ModalManager rendering

* fix some more unit tests

* store the click coordinates in a ref as setState is NOT synchronous

* fix remaining e2e tests

* rewrite dashboardpage tests to avoid act warnings

* undo lint ignores

* fix ExpanderCell types

* set SymbolCell type correctly

* fix QueryAndExpressionsStep

* looks like the types were actually wrong instead :D

* undo this for now...

* remove spinner waits

* more robust tests

* rewrite errorboundary test to not explicitly count the number of renders

* make urlParam expect async

* increase timeout in waitFor

* revert ExplorePage test changes

* Update public/app/features/dashboard/containers/DashboardPage.test.tsx

Co-authored-by: Alex Khomenko <Clarity-89@users.noreply.github.com>

* Update public/app/features/dashboard/containers/PublicDashboardPage.test.tsx

Co-authored-by: Alex Khomenko <Clarity-89@users.noreply.github.com>

* Update public/app/features/dashboard/containers/PublicDashboardPage.test.tsx

Co-authored-by: Alex Khomenko <Clarity-89@users.noreply.github.com>

* Update public/app/features/dashboard/containers/PublicDashboardPage.test.tsx

Co-authored-by: Alex Khomenko <Clarity-89@users.noreply.github.com>

* skip fakeTimer test, ignore table types for now + other review comments

* update package peerDeps

* small tweak to resourcepicker test

* update lockfile...

* increase timeout in sharepublicdashboard tests

* ensure ExplorePaneContainer passes correct queries to initializeExplore

* fix LokiContextUI test

* fix unit tests

* make importDashboard flow more consistent

* wait for dashboard name before continuing

* more test fixes

* readd dashboard name to variable e2e tests

* wait for switches to be enabled before clicking

* fix modal rendering

* don't use @testing-library/dom directly

* quick fix for rendering of panels in firefox

* make PromQueryField test more robust

* don't wait for chartData - in react 18 this can happen before the wait code even gets executed

---------

Co-authored-by: kay delaney <kay@grafana.com>
Co-authored-by: Alex Khomenko <Clarity-89@users.noreply.github.com>
2023-04-11 10:51:54 +01:00
Jack Westbrook
f3f9697914
Storybook: Bump dark-mode addon to 2.0.4 and remove patch (#60384)
chore(storybook): bump dark-mode addon to 2.0.4 and remove patch
2022-12-19 10:43:21 +01:00
renovate[bot]
6856784134
Update Storybook updates to v6.5.10 (#49793)
* Update Storybook updates to v6.5.6

* refactor(storybook): fix up dependencies and webpack configs

* chore(storybook): bump to 6.5.7

* chore(yarn): refresh lock file

* chore(storybook): bump storybook to 6.5.10

* refactor(storybook): update configuration to use babel, tidy webpack config, clean dependencies

* chore(storybook): bump to 6.5.12

* chore(storybook): bump storybook-dark-mode to 1.1.2

* chore(storybook): workaround resolving storybook-docs addon for yarn pnp

* refactor(storybook): remove preview-head.html in favour of global theme styles

* chore(storybook): patch storybook-dark-mode to work with SB 6.5.x and yarn PnP

* feat(storybook): move to using MDXv2

* fix(icon): make sure icon story doesn't disappear offscreen and is scrollable

* chore(grafana-ui): clean up dependencies related to storybook

* feat(storybook): enable webpack5 filesystem cache

* feat(storybook): replace babel with esbuild

* fix(emotionperftest): fix jsx pragma for esbuild

* fix(emotionperftest): force jsxRuntime to classic so esbuild and babel compile without error

Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: Jack Westbrook <jack.westbrook@gmail.com>
2022-10-03 09:23:47 +02:00
kay delaney
a70aba1384
Chore: Update slate and related packages (#54566)
* Chore: Update slate and related packages
2022-09-06 15:23:48 +01:00