Commit Graph
100 Commits
Author SHA1 Message Date
Ashley Harrison 9cbbe65243 Move cloud link app to the Administration section (#58578) 2022-11-10 17:02:41 +00:00
Ashley HarrisonandTorkel Ödegaard 159607fe6f Navigation: Convert PluginDetails page to use new Page extensions (#58509)
* Added labels

* App page fixes

* Switch to switch

* wip

* Updates

* I am stuck

* Minor tweak

* This props interface could work

* removed change

* use new page extensions in plugin details page

* add link separator, fix action button spacing

* some renaming

* Move PageInfo into it's own folder + add tests

* add support for new props in old page header

* remove PluginDetailsHeader as it's no longer used

* Fix unit tests

* fix some badge alignments

* center align actions

* badge alignment + only show downloads for community/commercial plugins

* better link alignment

* conditionally render description

* move install control warnings to below subtitle + refactor

Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
2022-11-09 14:44:38 +00:00
Ashley Harrison b3c761aaa7 Navigation: Expose new props to extend Page/PluginPage (#58465)
* add extensions and customisation to `Page`

* adjust alignment
2022-11-09 09:05:01 +00:00
Ashley Harrison 831ecb467c Add new PageInfo component (#58421) 2022-11-08 14:20:05 +00:00
Ashley Harrison 334b498632 group d3 updates together (#58309) 2022-11-07 10:30:23 +00:00
Ashley Harrison ca3bcc691c hide sectionnav items when collapsed, ensure focus ring overlays active items (#58250) 2022-11-04 16:42:34 +00:00
Ashley Harrison 871d98e550 hopefully improve slate test reliability (#58171) 2022-11-04 09:20:03 +00:00
Ashley Harrison c1c8dc8749 remove e2e-api-tests + axios dependency (#58148) 2022-11-03 13:52:58 +00:00
Ashley Harrison 514d3111f4 Accessibility: Enable rule jsx-a11y/no-noninteractive-element-interactions (#58077)
* fixes for no-noninteractive-element-interactions

* remaining fixes

* add type="button"

* fix unit tests
2022-11-03 10:55:58 +00:00
Ashley Harrison c3206167a6 increase select placeholder contrast to be WCAG AA compliant (#58034) 2022-11-03 10:45:57 +00:00
Ashley Harrison f76ba90078 Accessibility: Enable jsx-a11y/mouse-events-have-key-events (#58050)
* implement VizLegend keyboard accessibility

* add onBlur/onFocus
2022-11-03 10:22:50 +00:00
Ashley Harrison b8303fd431 Chore: Convert SpanTreeOffset test to RTL (#56195)
* convert SpanTreeOffset tests to RTL (minus mouseenter/mouseleave tests)

* fix remaining tests
2022-11-03 09:31:09 +00:00
Ashley Harrison f1f0a6f88b Revert "Update React Aria (#57975)" (#58001)
This reverts commit 44069b64cd.
2022-11-02 09:39:32 +00:00
Ashley Harrison e5c68f40c2 Accessibility: enable rule jsx-a11y/label-has-associated-control (#57964)
* use labels correctly

* fix opentsdb labels

* fix unit tests

* use aria-label instead of data-testid
2022-11-01 14:37:58 +00:00
Ashley Harrison cff6d1cf8b Chore: group some packages to reduce number of PRs (#57912)
* group some packages to reduce number of PRs

* Group slate + slate-react together

* kick drone
2022-11-01 11:52:17 +00:00
Ashley HarrisonandMarcus Andersson d2a70bc42d Chore: more any/type assertion improvements (#57450)
* more friday any/type assertion improvements

* Apply suggestions from code review

Co-authored-by: Marcus Andersson <marcus.andersson@grafana.com>

* Update public/app/angular/promiseToDigest.test.ts

Co-authored-by: Marcus Andersson <marcus.andersson@grafana.com>

Co-authored-by: Marcus Andersson <marcus.andersson@grafana.com>
2022-10-25 11:04:35 +02:00
Ashley Harrison 7e631e7239 A11y: Enable jsx-a11y/interactive-supports-focus (#57391)
* first batch of fixes for interactive-supports-focus

* remove role and aria attributes since this won't be focusable to a screenreader anyway
2022-10-21 13:52:46 +01:00
Ashley Harrison 630c18d79d make border-radius part of the base styles so focus styles are consistent (#57353) 2022-10-20 13:34:14 +01:00
Ashley Harrison 2987734832 only get organizations if user is signed in (#57279) 2022-10-19 14:24:52 +01:00
Ashley Harrison 96660992f4 Navigation: Ignore null children in ToolbarButtonRow (#57201)
* filter out any null buttons to prevent padding being added for them

* ignore null children in toolbarbuttonrow
2022-10-19 10:00:57 +01:00
Ashley Harrison 178b05160a make betterer a required step on PRs again (#57099) 2022-10-18 12:22:13 +01:00
Ashley Harrison 3cca8e3676 any/type assertion fixes (#57009) 2022-10-17 10:10:10 +01:00
Ashley Harrison a904372269 Accessibility: enable rule jsx-a11y/no-noninteractive-element-to-interactive-role (#56870)
* enable rule `jsx-a11y/no-noninteractive-element-to-interactive-role` and switch to extending recommended preset

* fix unit tests

* better unit test
2022-10-14 11:02:01 +01:00
Ashley Harrison 5af36e48ba convert ThresholdsEditor to RTL (#56791) 2022-10-13 08:56:36 +01:00
Ashley Harrison 61fd369b3f ensure the first item in the sectionnav is always the section root (#56815) 2022-10-12 17:02:31 +01:00
Ashley Harrison 8846778f9b fix title of config node (#56810) 2022-10-12 16:37:14 +01:00
Ashley Harrison 7d18460d8f Chore: convert MetricSelect test to RTL (#56801)
* convert MetricSelect test to RTL

* remove type param
2022-10-12 16:33:12 +01:00
Ashley Harrison dd9e1498f9 only render direct children on the landing page routes (#56720) 2022-10-12 10:01:33 +01:00
Ashley Harrison 90cf76e05e Navigation: Integrate Explore actions into topnav (#56381)
* integrate Explore actions into topnav toolbar

* add keys

* fix unit test

* fix bug with ToolbarButtonRow overflow

* make the render function a bit more readable

* fix overflow not updating when children change
2022-10-11 12:59:17 +01:00
Ashley Harrison 8348f486d9 Navigation: Make sure topnav is translated (#56643)
* initial translation progress

* more nav translations

* add subtitle translations

* more specific gitignore path

* fix unit tests
2022-10-11 11:45:58 +01:00
Ashley Harrison ff41b9544b Chore: more typing improvements to @grafana/ui (#56544)
* improve grafana-ui types

* more type improvements

* better useState type
2022-10-07 15:22:21 +01:00
Ashley Harrison c5171b84a0 actually convert Cloudwatch ConfigEditor test to RTL (#56461) 2022-10-06 12:14:41 +01:00
Ashley HarrisonandTorkel Ödegaard 78a57f2064 Navigation: use ToolbarButton in TopSearchBar for consistency (#56371)
* use ToolbarButton in TopSearchBar for consistency

* Removed unnessary styles

Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
2022-10-05 12:22:47 +01:00
Ashley Harrison 7ac7f844f4 improve some grafana-ui types (#56318) 2022-10-05 09:04:10 +01:00
Ashley Harrison d293055ef6 enable rule jsx-a11y/iframe-has-title (#56292) 2022-10-04 16:04:28 +01:00
Ashley Harrison d3f50f791c Convert test to RTL (#56279) 2022-10-04 15:37:47 +01:00
Ashley Harrison e942a3d99d enable jsx-a11y/no-autofocus (#56288) 2022-10-04 12:54:14 +01:00
Ashley Harrison ab09f2783c fix section root styling, parentItem will be the home item now (#56266) 2022-10-04 11:17:12 +01:00
Ashley Harrison 7e5509891a Navigation: adjust megamenu position in mobile (#56262)
* adjust megamenu position in mobile

* improve mobile breadcrumb logic
2022-10-04 10:40:34 +01:00
Ashley Harrison 317b353b34 Navigation: Collapsible section nav implementation (#55995)
* initial collapsible section nav implementation

* fix unit tests

* automatically collapse sectionnav when below lg size

* fix unit tests

* only register 1 event listener each time

* fix display name for SectionNavToggle
2022-10-04 09:19:23 +01:00
Ashley Harrison 8984507291 Navigation: show breadcrumbs correctly when on the home page (#55759)
* show breadcrumbs correctly when on the home page

* adjust breadcrumb unit tests

* update betterer

* fix backend tests

* update getSectionRoot to look at the home nav id

* remove redundant setting of home dashboard

* construct a home navmodelitem in the backend

* fix cases when the feature toggle is off

* fix unit test

* fix more unit tests

* refactor how buildBreadcrumbs works

* use HOME_NAV_ID

* move homeNav useSelector into NavToolbar

* remove unnecesary cloneDeep

* don't need locationUtil here

* restore using getUrlForPartial in DashboardPage

* special case for the editview query param

* remove commented out code

* add comment to clarify splice behaviour

* slightly cleaner syntax
2022-10-03 15:05:19 +01:00
Ashley Harrison f2b06abb33 Convert SpanDetail/index.test.js to RTL (#56019) 2022-10-03 10:22:50 +01:00
Ashley Harrison 3e688ecf7d Navigation: remove description from the backend navmodel and use subTitle instead (#56155)
* remove description from the backend navmodel and use subTitle instead

* only add admin subtitle in topnav
2022-10-03 10:09:32 +01:00
Ashley Harrison 5b1fdd535a Accessibility: turn on jsx-a11y/no-noninteractive-tabindex + fix/ignore errors (#56084)
* turn on jsx-a11y/no-noninteractive-tabindex + fix/ignore errors

* update comments
2022-09-30 13:20:39 +01:00
Ashley Harrison 27abc32608 fix lockfile (#56003) 2022-09-29 06:52:33 -04:00
Ashley Harrison 97f1524b66 Chore: move the a11y rules to the overrides section so they don't apply to t… (#55848)
* move the a11y rules to the overrides section so they don't apply to tests

* turn alt-text back off
2022-09-27 16:59:35 +01:00
Ashley Harrison 11eb02a183 enable rule role-has-required-aria-props (#55841) 2022-09-27 11:17:26 -04:00
Ashley Harrison 527c00dae5 enable rule jsx-a11y/role-supports-aria-props (#55839) 2022-09-27 15:42:46 +01:00
Ashley Harrison 422b22a513 enable img-redundant-alt rule (#55833) 2022-09-27 10:26:32 -04:00
Ashley Harrison afdb094983 turn on tabindex-no-positive rule (#55830) 2022-09-27 15:18:24 +01:00
Ashley Harrison 1a830e6f45 don't add folder breadcrumb if there is no folderUid (#55739) 2022-09-26 14:02:50 +01:00
Ashley Harrison 366731d8d9 Navigation: Add descriptions to NavModelItems (#55669)
* add some descriptions!

* Update some descriptions

* Tweak playlist description

* fix unit tests + betterer
2022-09-23 16:08:08 +01:00
Ashley Harrison c65a8d3cab reenable active state for home (#55566) 2022-09-23 16:03:01 +01:00
Ashley Harrison 480a3b92d2 dispatch clearFilters when an item is selected (#55512) 2022-09-23 14:46:21 +01:00
Ashley Harrison 80c49688a1 turn on all the rules that are working anyway (#55679) 2022-09-23 09:18:23 -04:00
Ashley Harrison 717e9b0a34 add eslint-plugin-jsx-a11y (#55677) 2022-09-23 14:02:16 +01:00
Ashley Harrison cf19baf80f improve responsiveness of breadcrumbs (#55572) 2022-09-21 15:52:06 +01:00
Ashley Harrison 1978b935ba remove underlay fade out animation (#55578) 2022-09-21 10:42:08 -04:00
Ashley Harrison bd19a06fa9 Update create/edit playlist pages to work with topnav (#55104) 2022-09-13 16:18:50 +01:00
Ashley Harrison 14d4e0eeca set font-weight correctly (#55074) 2022-09-13 13:34:02 +02:00
Ashley Harrison 031c186617 convert AlertRuleList test to RTL (#55045) 2022-09-13 09:29:29 +01:00
Ashley Harrison b90260b3ae Chore: convert LogRowContextProvider tests to RTL (#55031)
* convert LogRowContextProvider tests to RTL

* remove act
2022-09-12 15:00:09 +01:00
Ashley Harrison 4c3e08db91 Chore: Convert ShareLink tests to RTL (#55026)
* Convert ShareLink tests to RTL

* use findByRole instead of findByLabelText to be more robust
2022-09-12 14:34:06 +01:00
Ashley Harrison 58e17f8144 CustomScrollbar: Add optional scroll indicators to CustomScrollbar (#54705)
* Add general scroll indicator behaviour to CustomScrollbar

* Extract ScrollIndicators logic into it's own file

* add scroll indicators to MegaMenu
2022-09-12 11:18:45 +01:00
Ashley Harrison cc5f8b9180 bump eslint sdk (#54968) 2022-09-12 10:00:09 +01:00
Ashley Harrison 4866898529 make sure AppRoot is lazily loaded (#54954) 2022-09-09 16:09:34 +01:00
Ashley HarrisonandTorkel Ödegaard a861c10f1b Navigation: Integrate search into topnav (#54925)
* behaviour mostly there

* slight performance improvement

* slightly nicer...

* refactor search and add it to the store

* add comments about removing old component

* remove unneeded logic

* small design tweak

* More small tweaks

* Restore top margin

* add onCloseSearch/onSelectSearchItem to useSearchQuery

Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
2022-09-09 11:01:31 +01:00
Ashley Harrison 8e8d0a08f9 reobserve elements when children change (#54827) 2022-09-07 15:07:35 +01:00
Ashley Harrison 4825707853 Add basic unit tests for landing pages (#54696) 2022-09-07 12:40:53 +01:00
Ashley Harrison 66ce33bc5b make Browse the root item of Dashboards when topnav is enabled (#54782) 2022-09-07 09:24:10 +01:00
Ashley Harrison a4566eaf32 add unit tests for buildBreadcrumbs (#54785) 2022-09-06 16:43:59 +01:00
Ashley Harrison a423c7f22e Add scrolling to SectionNav (#54698) 2022-09-05 12:39:54 +01:00
Ashley Harrison 8d489dfd9b Navigation: Landing pages behind feature toggles (#54576)
* super quick attempt

* feature toggle everything

* only construct alertNav if there are navChildren

* fix toggle name

* plugin landing pages poc

* add apps route + put behind feature toggle

* use toIconName

* rename to NavLandingPage

* feature toggle new routes

* don't modify GetServerAdminNode

* some fairly hacky code to check if the plugin has a root page

* remove trailing slash
2022-09-05 10:07:13 +01:00
Ashley Harrison 0ab548a8b5 Chore: fixing some anys/type assertions (#54661)
* fixing some anys/type assertions

* make types consistent
2022-09-02 16:39:09 +00:00
Ashley Harrison 3e8d178fc1 convert LokiQueryEditor test to RTL (#54639) 2022-09-02 15:11:13 +01:00
Ashley Harrison 22e5ee3b52 update LokiExploreQueryEditor test to RTL (#54644) 2022-09-02 14:46:14 +01:00
Ashley Harrison 11689c0385 convert ConfigEditor test to RTL (#54636) 2022-09-02 12:48:37 +01:00
Ashley Harrison 9e74050472 Update latest.json (#54484) 2022-08-31 09:17:59 +01:00
Ashley Harrison db4a2d58a1 convert DerivedField test to RTL (#54334) 2022-08-30 10:28:06 +01:00
Ashley Harrison 5e394c0385 Convert influxdb ConfigEditor test to RTL (#54332) 2022-08-30 09:30:10 +01:00
Ashley Harrison 91948ce554 Convert elasticsearch ConfigEditor.test.tsx to RTL (#54301) 2022-08-26 13:29:31 +01:00
Ashley Harrison 15e19cef95 Navigation: improve page toolbar responsiveness (#54223)
* improve page toolbar responsiveness

* rename emotion style to be more descriptive

* remove unnecessary max-width
2022-08-25 16:21:29 +01:00
Ashley Harrison d765aaff49 use navId + pageNav on datasource pages (#54218) 2022-08-25 13:58:41 +01:00
Ashley Harrison 211c9991c5 Navigation: Add responsive behaviour to ToolbarButtonRow (#53739)
* hacky first attempt

* slightly cleaner...

* behaviour mostly working...

* remove unnecessary wrapper

* css tweaks

* much cleaner implementation with intersectionobserver

* set style props directly on children

* separate story, integrate when toggle is off

* improve story, integrate when toggle is on

* remove styles from DashNavTimeControls

* mock IntersectionObserver for all unit tests

* prettier

* don't use dropdown anymore

* add some basic documentation

* add right alignment to scenes toolbarbuttonrow

* just use the react children api to prevent duplicating children
2022-08-24 11:19:36 +01:00
Ashley Harrison 3cf95d7eee Chore: fix some anys pt.2 (#53928)
* correctly type some more any's

* undo this change for now...
2022-08-22 16:51:33 +01:00
Ashley Harrison 0f4b8c5e54 convert AzureCredentialsForm test to RTL (#53959) 2022-08-22 13:22:19 +01:00
Ashley Harrison f91f05f32c Chore: convert DebugSection test to RTL (#53965)
* convert DebugSection test to RTL

* remove unused import
2022-08-22 13:19:46 +01:00
Ashley Harrison 0b322a0f5d fix some anys (#53789) 2022-08-19 16:46:58 +01:00
Ashley Harrison b6835ef87d convert TestRuleResult to RTL (#53953) 2022-08-19 15:00:53 +01:00
Ashley Harrison 0550808126 use navId over navModel, add page descriptions + create pageNav for child pages (#53936) 2022-08-19 13:32:43 +01:00
Ashley Harrison 78995e252a implement responsive breadcrumb behaviour (#53764) 2022-08-19 09:17:52 +01:00
Ashley Harrison 7eab08364e Navigation: Improve responsiveness of TopSearchBar (#53777)
* remove some magic numbers + used grid for better responsiveness

* remove old responsive styles
2022-08-16 15:09:22 +01:00
Ashley Harrison 6cdeeeda3c remove UseState from last 2 stories (#53596) 2022-08-11 16:28:22 +01:00
Ashley Harrison f32c0058a1 remove UseState from legacy Select story (#53519) 2022-08-10 15:30:02 +01:00
Ashley Harrison 26e81cad21 Add tests for Breadcrumbs (#53514) 2022-08-10 12:56:25 +01:00
Ashley Harrison e51c80f8dd Storybook: remove UseState from ButtonSelect story (#53509)
* remove UseState from ButtonSelect story

* leave this type assertion for now
2022-08-10 07:00:19 -04:00
Ashley Harrison aaccb592cc remove UseState from Drawer story (#53503) 2022-08-10 11:40:33 +01:00
Ashley Harrison 6d495a6a8e Navigation: Improve breadcrumb accessibility (#53471)
* refactor breadcrumbs into their own folder, add appropriate accessibility

* rename Breadcrumb to BreadcrumbItem
2022-08-10 09:24:21 +01:00
Ashley Harrison d38e86f3a6 Storybook: add controls support + remove UseState from RelativeTimeRangePicker story (#53459)
* add controls support + remove UseState from RelativeTimeRangePicker story

* don't need this displayName

* exclude onChange
2022-08-10 08:55:22 +01:00
Ashley Harrison e73e3cac11 add controls support + remove UseState from WeekStartPicker.story.tsx (#53455) 2022-08-09 16:00:39 +01:00