80 Commits

Author SHA1 Message Date
31903c7abc Command palette: Add tests for scope actions (#106660)
* Don't show result from other parents

* Use global search hook for scopes even inside scopes category

* Remove console.log

* Move code to separate files

* Add tests

* Renamed utils file
2025-06-16 14:38:27 +02:00
d284cceb67 Command palette: Don't show dashboard search result from different parent (#106536)
* Don't show result from other parents

* Use global search hook for scopes even inside scopes category

* Remove console.log

* Don't show non leaf scopes in global search
2025-06-12 11:53:04 +02:00
2b8c74de2e i18n: removes useTranslate hook (#106556)
* i18n: removes useTranslate hook

* chore: fix duplicate imports

* chore: fix import sorting and hook dependencies
2025-06-12 11:03:52 +02:00
1aaf8adee4 Scopes: Global scopes search in command palette (#105597)
* Add pills in search bar for context

* Add scope actions

* Add selection functionality

* Show selected scope on secondary row

* Fix selected scope titles

* Add some basic tests

* Test for toggle by name

* Remove unnecessary mocking

* Small cleanups

* Lint fixes

* Fix test

* Update public/app/features/scopes/selector/ScopesSelectorService.ts

Co-authored-by: Tobias Skarhed <1438972+tskarhed@users.noreply.github.com>

* Bump input and breadcrumbs test

* Change breadcrumbs color

* Makes the breacrumb spacing consistent

* Add basic global search

* Change scope selector data structures

* Fix scope selector functionality

* Fix errors in selector and cmdk actions

* Fix cmdk actions

* Fix global search in cmdk

* Fix some merge edits

* merge diffs

* Small merge fixes

* Fix ScopesSelectorService.test.ts

* Fix tests

* Remove unrelated lint fixes

* Move ScopesTreeItemList.tsx into separate file

* Simplify if condition

* Use node.title in the scopesRow

* Use better dependency array for actions

* Make recentScopes more robust

* Fix beterrer

* Update betterer file

* Add test for changeScopes early return

* Fix input tooltip title access

---------

Co-authored-by: Tobias Skarhed <1438972+tskarhed@users.noreply.github.com>
2025-06-10 10:21:43 +02:00
abb885c585 I18n: Move eslint rule to package (#105860) 2025-05-29 16:11:59 +02:00
bd22c854b2 Scopes: Add wrapping to selected scopes in command palette (#105828)
Add wrapping to selected scopes
2025-05-28 14:55:54 +02:00
71a60e2734 i18n: Add shortcut/command palette item to toggle pseudo locale (#105826) 2025-05-22 19:12:17 +03:00
119d5897ea i18n: imports use @grafana/i18n (#105177)
* i18n: everything should target @grafana/i18n

* wip

* chore: updates after PR feedback

* Trigger build

* Trigger build

* Trigger build

* chore: skip flaky tests

* chore: skip flaky tests

* chore: skip flaky tests

* chore: skip flaky tests

* chore: skip flaky tests

* chore: skip flaky tests

* chore: revert all flaky tests

* chore: some incorrect usages of useTranslate
2025-05-15 09:17:14 +02:00
1716696175 Chore: Improve how mock API is enabled/disabled (#104675) 2025-05-08 20:03:51 +03:00
8435eb2876 Scopes: Command Palette (#103720)
* Add pills in search bar for context

* Add scope actions

* Add selection functionality

* Show selected scope on secondary row

* Fix selected scope titles

* Add some basic tests

* Test for toggle by name

* Remove unnecessary mocking

* Small cleanups

* Lint fixes

* Fix test

* Update public/app/features/scopes/selector/ScopesSelectorService.ts

Co-authored-by: Tobias Skarhed <1438972+tskarhed@users.noreply.github.com>

* Bump input and breadcrumbs test

* Change breadcrumbs color

* Makes the breacrumb spacing consistent

---------

Co-authored-by: Tobias Skarhed <1438972+tskarhed@users.noreply.github.com>
2025-05-05 14:00:20 +02:00
8021dee6f1 Scopes: Add recent scopes selectors (#103534)
* Add recent scopes to command palette

* Remove parent action

* Support updating select set of scopes

* Filter out currently selected scope

* Add recent scopes to drawer

* Add expandable section

* Add recent scopes component

* Only show recommended for leaf nodes

* Small style fixes

* Always write to recent after fetching new scopes

* Add feature toggle check for command palette

* Use i18n

* Remove unused prop

* Add test cases for recent scopes in selector

* Add more test cases

* Add clear test action

* Remove unused imports
2025-04-17 17:00:10 +02:00
5661cf244a Invite User: Add invite user button in mega menu and command palette (#103934) 2025-04-11 19:00:06 -03:00
a420e2f8f2 Internationalisation: More markup (#103634)
* some manual markup

* more markup

* update count names
2025-04-09 11:31:48 +01:00
577ea8f6a9 GrafanaUI: Remove blurred background from overlay backdrops to improve performance (#103563)
* default noBackdropBlur to enabled

* move blur from hacks to theme.components, tweak backdrop colour

* remove toggle completely

* fix unused import
2025-04-08 11:58:19 +01:00
687e207b48 SingleTopNav: Clean up and remove code + toggle (#97937)
* clean up almost all of the toggle

* betterer

* clean up searchBarHidden and extract translations

* fix remaining unit tests

* remove redundant topPosition
2024-12-17 13:32:38 +00:00
19cc2efaf2 Chore: Fix unnecessary nullish-coalescing (#97555)
* Fix unnecessary nullish-coalescing

* Fix nullish use as per code review

* Fix other incorrect use of nullish coalescing
2024-12-11 17:34:06 +00:00
f51b58488c EmptyState: Add event tracking to CommandPalette and BrowseDashboards (#97780) 2024-12-11 12:24:19 +01:00
1ff0978efe Chore: Remove sharemodal and search service barrel files (#97563)
* refactor(search-service): delete barrel file and update imports across frontend

* refactor(sharemodal): delete barrel file and update imports

* refactor(search-service): update features/search/service imports

* chore(betterer): update results file
2024-12-06 16:44:30 +01:00
324063eb3d SingleTopNav: Fix positioning of command palette (#95041)
fix positioning of command palette when singleTopNav is enabled
2024-10-21 14:06:44 +03:00
a44f718c09 SingleTopNav: align Command Palette to the input (#94614) 2024-10-18 15:27:04 +02:00
8c702d4a6b Plugin extensions: Make sure core features use new hooks (#92723)
* use new extensions APIs across grafana core

* setup setPluginLinksHook

* fix tests

* fix mock

* fix more broken tests

* use plugin components hook

* remove unused func

* fix tests

* remove unused import
2024-09-13 09:23:18 +02:00
47f8717149 React: Use new JSX transform (#88802)
* update eslint, tsconfig + esbuild to handle new jsx transform

* remove thing that breaks the new jsx transform

* remove react imports

* adjust grafana-icons build

* is this the correct syntax?

* try this

* well this was much easier than expected...

* change grafana-plugin-configs webpack config

* fixes

* fix lockfile

* fix 2 more violations

* use path.resolve instead of require.resolve

* remove react import

* fix react imports

* more fixes

* remove React import

* remove import React from docs

* remove another react import
2024-06-25 12:43:47 +01:00
fb1acb45a2 Search: Announce to screen reader when query returns no result (#87382)
* Add alert role to not-found variant

* Provide role prop and apply for two cases
2024-05-22 14:15:56 +02:00
804c726413 PluginExtensions: Make the extensions registry reactive (#83085)
* feat: add a reactive extension registry

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

* feat: add hooks to work with the reactive registry

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

* feat: start using the reactive registry

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

* feat: update the "command palette" extension point to use the hook

* feat: update the "alerting" extension point to use the hooks

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

* feat: update the "explore" extension point to use the hooks

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

* feat: update the "datasources config" extension point to use the hooks

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

* feat: update the "panel menu" extension point to use the hooks

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

* feat: update the "pyroscope datasource" extension point to use the hooks

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

* feat: update the "user profile page" extension point to use the hooks

* chore: update betterer

* fix: update the hooks to not re-render unnecessarily

* chore: remove the old `createPluginExtensionRegistry` impementation

* chore: add "TODO" for `PanelMenuBehaviour` extension point

* feat: update the return value of the hooks to contain a `{ isLoading }` param

* tests: add more tests for the usePluginExtensions() hook

* fix: exclude the cloud-home-app from being non-awaited

* refactor: use uuidv4() for random ID generation (for the registry object)

* fix: linting issue

* feat: use the hooks for the new alerting extension point

* feat: use `useMemo()` for `AlertInstanceAction` extension point context

---------

Co-authored-by: Levente Balogh <balogh.levente.hu@gmail.com>
2024-04-24 09:33:16 +02:00
40c148ba48 EmptyState: Provide custom messages for existing empty states (#86021)
provide custom messages for existing empty states
2024-04-12 11:08:14 +02:00
7ad2ec9665 EmptyState: use not-found empty state variant everywhere in core (#85007)
* use EmptyState component everywhere in core

* remove GrotNotFound core component

* update unit tests

* search -> not-found

* fix 3 more
2024-03-27 12:15:12 +00:00
b0848c9726 Empty state: Add animation for Grot (#83770)
* add animation for grot not found

* extract default interval out into constant

* improve relative path

* extract magic numbers out into constants + throttle properly

* better width/height definitions

* use consistent background + apply to PageNotFound as well

* increase gap in command palette empty state
2024-03-11 14:46:53 +00:00
ef6e315322 Chore: use Box in command palette empty state (#82101)
* use Box

* use paddingTop/paddingBottom
2024-02-07 17:39:15 +02:00
8c38ebfeae Command Palette: Add empty state (#81903)
* add an empty state for the command palette

* cleaner logic
2024-02-06 10:37:56 +00:00
1cb3cc4ad1 Navigation: handle cloud id when modifying connections url (#80965)
cloud id is different than onprem... who knew?
2024-01-22 13:02:47 +00:00
d72c035ea6 CommandPalette: Pass matched tag as a search query to 'Add new connection' page (#80556)
* add some special logic to pass the matched tag to the add new connection page

* extend action type to accept callback for url
2024-01-18 16:16:41 +00:00
15af2e5053 Connections: Pass keywords from the backend to CommandPalette (#80276)
* pass keywords from the backend to CommandPalette

* add csv and json to keywords
2024-01-15 11:30:55 +00:00
d680a020cc Command Palette: Adjust command palette extensions priority (#79992)
adjust command palette extensions priority
2024-01-03 16:18:27 +00:00
09cef892a5 OptionsPicker: Use fuzzy search and improve ranking of matches (#79286) 2023-12-12 16:41:50 -06:00
f040a8321b Plugins: Add Command Palette extension point (#78098)
Co-authored-by: Marcus Andersson <marcus.andersson@grafana.com>
2023-12-12 08:52:09 +00:00
f32bc17422 Navigation: Use LoadingBar in CommandPalette (#77506)
try using LoadingBar in CommandPalette
2023-11-03 09:54:25 +00:00
13c0268d6b Chore: Upgrade react-redux (#77296)
* try upgrading react-redux

* memoize getNavModel selector, don't return a new object in command palette selector

* use createSelector to memoize some alert manager selectors correctly

* memoize selectors correctly in appNotifications

* memoize some datasource selectors

* use fake timers to avoid the debounce causing flakiness

* remove duplicate import

* just use memoize-one
2023-10-31 16:24:34 +00:00
45fec1ae26 CommandPalette: Remove parent search and fuzzy search for pages (#71825)
* user essentials mob! 🔱

lastFile:public/app/features/commandPalette/useMatches.ts

* user essentials mob! 🔱

---------

Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
Co-authored-by: joshhunt <josh@trtr.co>
Co-authored-by: eledobleefe <laura.fernandez@grafana.com>
Co-authored-by: Joao Silva <joao.silva@grafana.com>
Co-authored-by: L-M-K-B <48948963+L-M-K-B@users.noreply.github.com>
Co-authored-by: Roxana Turc <anamaria-roxana.turc@grafana.com>
2023-07-18 11:00:26 +01:00
db44ba305e Command palette: Include help links (#70234)
enrich help node with frontend links
2023-06-19 13:29:26 +01:00
9eb8ec9fa9 Command Palette: Links opened in a new tab now route correctly when Grafana is served under a subpath (#69845)
don't strip base from url since we're not using locationSrv.push anymore
2023-06-12 15:58:38 +01:00
9e4b532979 Chore: Refactor Search out-of-order fix (#68445) 2023-05-18 16:14:59 +01:00
446885bd1a Command Palette: Prevent stale search results from overwriting newer results (#68377)
* only update the state if this is the most recent request

* fix empty state as well

* improve perf of recent dashboards
2023-05-12 16:23:20 +01:00
b24ba7b7ae FieldValues: Use plain arrays instead of Vector (part 3 of 2) (#66612)
Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2023-04-20 17:59:18 +03:00
590b07539f Core: Update components to have standard radii (#65065)
* Update core border radii

* Add non-default border-radius on some grafana-ui items
2023-03-21 12:24:50 +01:00
4f13e78d11 Chore: Avoid explicit React.FC<Props> when possible (round 2) (#64749) 2023-03-15 16:56:09 +02:00
3336327306 Navigation: Fix Home logo always going to /login (#62658)
* only redirect to /login when anonymous access is disabled

* only search for dashboards when not logged in if anon access is enabled

* fix go logic

* add unit tests
2023-03-09 16:42:45 +00:00
a534119c44 Command Palette: Sign out link now works correctly (#63742)
* pass target to command palette urls so sign out link works correctly

* improve types
2023-03-01 15:59:32 +00:00
27635e6f7b Command Palette: Display dashboard location (#63807)
* show folder for dashboard, adjust how ancestors are displayed, clamp to single line

* fix keys

* better responsiveness

* use subtitle consistently

* use span instead of div
2023-03-01 09:46:46 +00:00
91d2df59fc CommandPalette: Remove topnav command palette feature flag (#63620)
* CommandPalette: Remove topnav command palette feature flag

* Restore search shortcuts if topnav isnt enabled

* fix unused imports
2023-02-24 07:14:53 -05:00
36c090416a Command palette: Enable folder searching (#62663)
search folders as well as dashboards in the command palette
2023-02-09 16:31:05 +00:00