5 Commits

Author SHA1 Message Date
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
1b9d062583 DashboardReload: Refactor / move state diffing out of DashboardPageStateManager and into reload behavior, simplify (#106039)
* DashboardReload refactor

* Update

* revert accidental commit

* fix

* merge fix

* fix cache issue

* Update scenes

* Update

* Update

* revert debug

* Update scenes

* Update tests

* add back reload on activation, fix infinite reload bug

* Update prevState

* Remove time range subscription

* restore iso time format

* Update scenes

* Mock console for reload tests (for now)

* Only update scopes from URL when scopes in URL change

* fix equality check inside ScopesSelectorService

* branch fix drone

* Update

* revert drone verbosity

* Update scenes

---------

Co-authored-by: Victor Marin <victor.marin@grafana.com>
Co-authored-by: Dominik Prokop <dominik.prokop@grafana.com>
2025-06-04 11:29:25 +02:00
5d2dbd7883 Scopes: Move url sync from scenes to the ScopesSelectorService (#102469)
* Add url sync

* Move the URL sync handling to ScopesService to keep persistence

* Reset location after tests

* Prettier

* Do url replace on enabling scopes

* Remove comment

* Update scenes version
2025-03-24 11:00:50 +01:00
a6c16c52e6 Scopes: Refactor services and the api client (#102042)
* Externalize api and remove dependency cycles

* fix tests

* Update comment

* Split the state observable creation in ScopesService

* Make the feature flag guard more explicit

* Change reduce to map
2025-03-14 10:48:12 +01:00
312d80e0e1 Scopes: Refactor scopes to plain React and move it to runtime (#97176)
* Scopes: Refactor scopes

* Scopes: Refactor scopes

* Scopes: Refactor scopes

* Revert data changes

* Refactorings

* Refactorings

* Refactorings

* Remove unused

* Refactorings

* Refactors

* Fixes

* Update scenes

* Rebase

* Update .betterer.results

* Fix tests

* Move scopes selector to appchrome

* More fixes

* Fix tests

* Remove ScopesFacade

* use latest canary scenes version to pass tests

* Make fields private

* Update scenes version

---------

Co-authored-by: Tobias Skarhed <tobias.skarhed@gmail.com>
Co-authored-by: Victor Marin <victor.marin@grafana.com>
Co-authored-by: Andrej Ocenas <mr.ocenas@gmail.com>
2025-03-11 11:34:33 +01:00