Commit Graph

146 Commits

Author SHA1 Message Date
Ashley Harrison
4247696402
DockedMegaMenu: Keep undock button (#78461)
* dock undock smoothly

* handle keyboard focus

* use ref instead of state

* run i18n:extract

* undo this change

* make dock/undock first button to focus

* only focus when going to docked, add comment

* minor tweaks
2023-11-22 15:56:36 +00:00
Ashley Harrison
b6e2db7d91
Navigation: Report megamenu state when clicking a navigation item (#77705)
report megamenu state when clicking a navigation item
2023-11-06 14:32:29 +00:00
Ashley Harrison
d68d31c63c
Navigation: Hide Undock menu button when docked (#76965)
* small dock menu exploration

* fix e2e tests

* revert back to web-section-alt
2023-11-03 17:07:15 +00:00
Alex Khomenko
d62170e4ce
Grafana/ui: Move the Stack component out of unstable (#77495)
* grafana/ui: Move Stack out of unstable

* grafana/ui: Replace imports
2023-11-02 12:22:57 +02:00
Josh Hunt
e8f0f6b7c8
Page: Remove Canvas background from primary background pages (#77008)
* Remove canvas background for primary background pages

* refactor styles
2023-11-01 12:58:18 +00:00
Ashley Harrison
2d5e602b2d
Navigation: Minor tweak to dockedMegaMenu to make it slightly tighter (#77493)
minor tweak to dockedMegaMenu to make it slightly tighter
2023-11-01 13:56:58 +02:00
Ashley Harrison
78df641b38
Navigation: Make page container automatically scroll when overflowing (#77489)
add overflow: auto to page container
2023-11-01 12:41:30 +02:00
Alex Khomenko
f5cbd4f9d0
grafana/ui: Rename Flex component to Stack (#77453)
* grafana/ui: Remove Stack and rename FLex to Stack

* Update types

* Update grafana/ui imports

* Update Grafana imports

* Update docs
2023-11-01 09:48:02 +02:00
Ashley Harrison
49f8838b62
Navigation: Improve docked auto scroll behaviour (#77117)
ensure expand works on any location change, only scroll when docked
2023-10-27 09:26:38 +01:00
Ashley Harrison
85468d2a67
DockedMegaMenu: Adjust docked threshold (#77139)
* adjust docked threshold to be xl instead of md and make sure it's open by default on 1440 res

* don't show dock menu button
2023-10-25 14:41:07 +01:00
Josh Hunt
ec84caf389
Navigation: Basic e2e tests for docked mega menu (#77000)
* Navigation: Basic e2e tests for docked mega menu

* give mega menu an e2e selector

* make existing tests narrower so menu doesn't default to docked. add test for auto docking at large viewport

* use new selector in nondocked menu
2023-10-24 15:56:00 +00:00
Ashley Harrison
fbbc524cb6
Navigation: Default MegaMenu to docked when screensize > 1440 (#76960)
default megamenu to docked when screensize > 1440
2023-10-24 09:27:23 +01:00
Ashley Harrison
efea86eb52
Navigation: Expand active page hierarchy and scroll into center if not visible (#76949)
* expand page hierarchy and scroll into center if not visible

* remove unnecessary id
2023-10-23 15:47:16 +01:00
Ashley Harrison
f9a89e5cd2
Navigation: correctly mark a MegaMenuItem as active if it has active children (#76944)
correctly mark a MegaMenuItem as active if it has active children
2023-10-23 10:55:25 +01:00
Ashley Harrison
a2921d9dfb
DockedMegaMenu: More consistent spacing on active state (#76873)
* more consistent spacing on active state

* use correct secondary variant buttons
2023-10-23 09:15:39 +01:00
Ashley Harrison
f5758e9f4b
Navigation: Correctly highlight a SectionNavItem if it has children that are active (#76860)
correctly highlight a sectionnavitem if it has children that are active
2023-10-20 10:27:25 +01:00
Laura Benz
d16a274e3a
Nav: Design changes in MegaMenu (#76735)
* refactor: move expand button to front

* refactor: add grid + adjust level 2

* refactor: remove grid + fix alignment for all three levels

* refactor: first iteration alignment

* refactor: styling of MegaMenuItemIcon

* refactor: remove styling of div in MegaMenuItemIcon

* refactor: styling object

* refactor: alignment of first level

* refactor: alignment of second level

* refactor: alignment of third level and active state

* feat: add connecting line for level 3

* feat: add comment

* refactor: remove unused code

* refactor: clean up styling

* refactor: clean up styling

* refactor: clean up styling

* some small tweaks

* remove unused props from getStyles

* fix dock button position and text ellipsing

* add padding to container to prevent icon button overlapping on left side

* add active overlay

* adjust font-weight, add padding to RHS

* add border-box for overlay

* adjust menu width to 300, don't use non-integer levels

* use height: 100%

* don't think we need minWidth

* make chevrons right/down

* make url required, cut down css

* move active state to container

* remove unused class

* add padding at top and bottom of menu as well

* adjust chevron size

---------

Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2023-10-19 17:41:58 +02:00
Laura Benz
a546db4b3a
Nav: Remove and refactor MegaMenu and its sub-components (#76614)
* refactor: remove hasActiveChild

* refactor: remove unused properties from MegeMenuItemText

* refactor: remove MegaMenuItemIcon

* refactor after code review
2023-10-17 10:34:44 +02:00
Laura Benz
5423e75bf3
Nav: Replace cloneDeep() in MegaMenu (#76607)
* refactor: remove deep clone of nav tree

* refactor: fix mutation issue
2023-10-16 12:03:35 +02:00
Ashley Harrison
b6fb1e52f2
Navigation: Limit SectionNav to rendering items up to 3 levels (#76478)
* only render section nav items up to 3 levels

* extract level depth into constant, apply in DockedMegaMenu as well
2023-10-13 10:38:35 +01:00
Ashley Harrison
abd2c9c287
Navigation: Hide docked menu and dock button on mobile (#76334)
* hide docked menu and dock button on mobile

* add logic to handle hamburger menu button on mobile
2023-10-11 11:33:15 +01:00
Ashley Harrison
930c753340
Navigation: Implement logic for docking nav menu (#76188)
* Create a state for dockedMegaMenu and the function to manage it

* Add the dockedMenu icon and handle the status when clicking it

* Add Megamenu to section nav area when it is docked

* get logic working

* fix mobile

* refactor state + persist in localStorage

* adjust icon and don't use position absolute

* restore old rudderstack tracking

* use Flex instead

* adjust feature toggle to be experimental

* extract out localStorage handling into utils

* don't need separate file

* use store.set/get instead

---------

Co-authored-by: eledobleefe <laura.fernandez@grafana.com>
2023-10-10 14:55:52 +01:00
Ashley Harrison
18b237879d
DockedMegaMenu: Refactor and rename to simplify (#75872)
* tidy up some styles

* remove NavBarMenuItemWrapper + consolidate components

* lots of renaming

* use object syntax in FeatureHighlight

* fix a couple of missing find+replace

* adjust li positioning

* fix text truncation

* bit more tidy up

* refactor indent into it's own component

* memoize styles in Indent
2023-10-03 13:03:27 +01:00
Ashley Harrison
e9555d727a
Drawer: remove wrapping div preventing Drawer from scrolling properly (#75823)
remove wrapping div prevent drawer from scrolling properly
2023-10-02 16:01:28 +01:00
Ashley Harrison
efaa779c2e
Navigation: Refactor MegaMenu to separate out overlay/animation logic (#75365)
* user essentials mob! 🔱

lastFile:public/app/core/components/AppChrome/DockedMegaMenu/DockedMegaMenu.tsx

* mob start [ci-skip] [ci skip] [skip ci]

* user essentials mob! 🔱

lastFile:public/app/core/components/AppChrome/DockedMegaMenu/DockedMegaMenu.tsx

* user essentials mob! 🔱

lastFile:public/app/core/components/AppChrome/AppChrome.tsx

* fix border css + scroll

* import width from DockedMegaMenu

* extract logic out into AppChromeMenu

* fix bug with hamburger icon

* rename some styles

* one more rename

* remove janky state logic

* prevent react-aria closing the overlay when interacting with the toggle button

* don't need boolean

---------

Co-authored-by: eledobleefe <laura.fernandez@grafana.com>
2023-09-27 17:05:40 +01:00
Ashley Harrison
b374912937
Drawer: Make content scroll by default (#75287)
* deprecate scrollableContent prop and make it the default behaviour

* restore prop behaviour, just make it default to true

* Update packages/grafana-ui/src/components/Drawer/Drawer.tsx

Co-authored-by: Alexa V <239999+axelavargas@users.noreply.github.com>

---------

Co-authored-by: Alexa V <239999+axelavargas@users.noreply.github.com>
2023-09-27 13:31:57 +01:00
Laura Fernández
14f4ed0180
Navigation: enable third level on the DockedMegaMenu (#75180) 2023-09-21 15:15:11 +02:00
Laura Fernández
efeff6bbb1
Navigation: create the DockedMegaMenu component and use the toggle to switch between it and MegaMenu (#75084) 2023-09-19 17:47:03 +02:00
Laura Fernández
0c08163357
Navigation: hide sectionNav when the dockedMegaMenu feature toggle is enabled (#75026) 2023-09-19 12:34:53 +02:00
Torkel Ödegaard
5bd58cac57
Eslint: Update grafana/eslint-config that allows public accessability modifier (#73906) 2023-08-28 14:57:49 +02:00
Ashley Harrison
1f49d480a8
Drawer: Clicking a Select arrow within a Drawer no longer causes it to close (#73557)
ensure drawer doesn't close when clicking dropdown arrow
2023-08-22 16:11:18 +01:00
Dmitry Filimonov
d935e6ff57
Navigation: Remove "preview" from Pyroscope Profiles nav item (#73070)
* Pyroscope: Mark profiles as GA (removes "preview")

* update
2023-08-16 08:38:26 +00:00
Laura Fernández
7ec9a0c9da
GLDS: Move Text component from the unstable package to grafana-ui (#72660) 2023-08-02 14:58:00 +02:00
Ashley Harrison
e0587dfb30
Chore: Replace deprecated usage of shape.borderRadius() (#72672)
* properly mark borderRadius() as deprecated, replace borderRadius() with default

* undo a couple of changes

* use radius.pill in FilterPill
2023-08-01 14:46:07 +01:00
RoxanaAnamariaTurc
e7ad60bfc7
A11Y: Added the name of the section to collapse button for screenreader (#72010)
A11Y: Added the name of the section  to aria-label of the button to collapse or expand section in the navigation tree
2023-07-21 09:54:48 +01:00
Laura Fernández
47f70bdb00
GLDS: Text component (#71439) 2023-07-20 12:59:42 +02:00
Ashley Harrison
9852b24d61
Chore: Upgrade prettier to v3 (#71764)
* Update dependency prettier to v3 (#71586)

* Update dependency prettier to v3

* run prettier

* ignore prettier update in legacy select scss

* update command line arg

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>

* unplug prettier

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-07-17 15:58:22 +01:00
Ashley Harrison
5ca382c88a
Revert "Update dependency prettier to v3 (#71586)" (#71755)
This reverts commit 2e8cd1c021.
2023-07-17 14:46:15 +01:00
renovate[bot]
2e8cd1c021
Update dependency prettier to v3 (#71586)
* Update dependency prettier to v3

* run prettier

* ignore prettier update in legacy select scss

* update command line arg

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2023-07-17 09:19:27 +01:00
Torkel Ödegaard
dc71d36958
AppChromeService: Fixes update to breadcrumb parent URL (#71410)
AppChromeService: Fixes update to parent url
2023-07-12 10:34:13 +02:00
RoxanaAnamariaTurc
7fdf855932
I18n: Outstanding navigation strings (#71208)
* I18n: Outstanding navigation strings

* Resolving conflicts
2023-07-11 15:10:50 +01:00
RoxanaAnamariaTurc
535b5659e4
I18n: Outstanding navigation strings marked up for translation (#71281) 2023-07-11 14:13:46 +01:00
Ivan Ortega Alba
6ad9e386ad
DS Picker: Filter available DS based on component props (#70613)
* Apply filters consistently to every list in the picker

* Display all built-in DS when editing a panel

* Add `uploadFile` prop to toggle the CSV file DS
2023-07-06 11:50:55 +02:00
RoxanaAnamariaTurc
af9b071a78
I18n: Mark up strings on Navigation - Connections section (#70914) 2023-06-30 11:27:19 +01:00
Ashley Harrison
9ee2cc742a
Chore: Use theme.shape.radius.circle everywhere (#70896)
* use theme.shape.radius.circle everywhere

* add useTheme2 import
2023-06-29 13:56:05 +01:00
Laura Benz
24502c4c4a
Add tooltip to instances of IconButton (#68880)
* refactor: tooltip is required

* refactor: add tooltips

* refactor: add tooltips

* refactor: add tooltips

* refactor: add tooltips

* refactor: add tooltips

* refactor: add tooltips

* refactor: adjust tests

* refactor: apply changes from code review

* refactor: adjust component for e2e test

* refactor: adjust fallback

* refactor: apply changes from code review

* refactor: apply changes from code review

* refactor: set IconButton default as type=button and remove from use cases

* refactor:  remove aria-labels when duplicated and type=button from use cases

* refactor: clean up

* refactor: fix tests

* refactor: fix type errors

* refactor: remove changes in order in order to add them to a separate PR

* refactor: set IconButton default as type=button

* refactor: remove tooltip

* refactor: apply changes requested in review
2023-06-08 10:23:28 +02:00
Ashley Harrison
778963849e
News: Expose config option to disable News feed (#69365)
* customize news feed

* remove url customisation
2023-06-01 13:35:05 +01:00
Ashley Harrison
10adebd7b3
Page: Add inline rename functionality (#68828)
* initial attempt at inline rename

* handle version correctly

* refactor

* minor tweaks

* add unit tests

* prettier...

* add to other tabs, remove settings tab when feature toggle is enabled

* fix truncation

* allow title to span full width of page

* fix h1 styling when no renderTitle/onEditTitle is present

* better layout

* use input from grafana/ui, fix imports

* fix unit test

* better error handling

* don't use autosavefield

* undo changes to AutoSaveField

* remove timeout

* remove maxWidth now we're not using AutoSaveField

* rename isEditInProgress to isLoading

* sync localValue with value

* better responsive css
2023-05-31 17:03:54 +01:00
Ryan McKinley
e7da2a179e
Schema: Add schema for role+access policies (#68047) 2023-05-24 10:31:57 -07:00
Ashley Harrison
a8f91f115c
Nested folders: Add folder actions to other tabs (#68673)
* add folder actions to other tabs

* fix copy pasta

* add unit tests

* don't need tree here

* fixes some copy pasta

* move into separate fixtures file
2023-05-24 10:41:03 +01:00