Commit Graph

7 Commits

Author SHA1 Message Date
Tobias Skarhed 60fed679c4
Scopes: Add filterNode and toggleExpandNode to ScopesSelectorService (#111553)
Add filterNode and toggleExpandNode to ScopesSelectorService
2025-09-26 11:52:28 +02:00
Tobias Skarhed dac6d04e24
Scopes: Arrow key selection support (#110155)
* Add basic arrow key navigation support

* Add shortcut for applying scopes

* Support expanding nodes with arrow keys

* Make useEffect non-conditional

* Add a11y and error boundary

* Fix preventDefault

* Add test for keyboardinteractions

* Add tests and expanded status to treeitem

* Reset highlight when disabled and change styles

* Fix tests

* Update i18n

* Remove unused var

* Reset enterprise imports from main

* Move failing test to correct quite

* Remove test outside fo context

* Remove unused import

* Use highlitghted ID instead of index

* Extract all highlighing functionality into its own hook

* Remove unused imports
2025-09-01 16:59:50 +02:00
Tobias Skarhed 3048fc6205
Scopes: Save parent node with recent scope (#108795)
* Read and write recent scopes

* Store entire ScopeNode, load from localSotrage

* Load nodes form localStorage on init

* Add runtime type validation

* Add tests

* Remove unused import

* Add parentNode name to selector integration test

* Deep clone

* Schema validation with zod

* Add comment

* Use zod for schema validation of scope object

* Update type validation of recent scope nodes

* Add comment

* Add expect ts error

* Fix nit
2025-08-05 12:09:58 +00:00
Tobias Skarhed 66bebe94e0
Scopes: Add autofocus, aria-label and search area to selector (#108906)
* Add autofocus, aria-label and search area

* Clean up search area

* Clean up search area

* Add test

* Remove superflous memo

* Undo values change
2025-07-31 10:28:24 +02:00
Andrej Ocenas 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
Tobias Skarhed 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
Bogdan Matei 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