Alerting: Add a button to try out the new list page (#103855)

* Add user-facing feature toggle functionality for the new alerting list view

- Implemented `useFeatureToggle` hook to manage feature toggles using local storage.
- Added unit tests for `useFeatureToggle` to verify behavior for various toggle states.
- Updated `RuleList` components to utilize the new feature toggle for alerting list view.
- Introduced `RuleListPageTitle` component to handle toggling between list views with a badge indicator.

* Add tests

* Fix imports and remove unused code

* Add a new feature flag for list v2 preview button

* Hide v2 preview button behind the new feature flag

* Update list v2 feature toggle stage

* Alerting: List view feature toggle button PR review (#104161)

* Add test for undefined feature toggles case

* Tweak tests to use test utils and user

* Add i18n for toggle button and tweak props spreading

* Update translations

---------

Co-authored-by: Tom Ratcliffe <tom.ratcliffe@grafana.com>
This commit is contained in:
Konrad Lalik
2025-04-22 10:50:34 +02:00
committed by GitHub
co-authored by Tom Ratcliffe
parent 17e4a3b386
commit 512df0091a
28 changed files with 397 additions and 23 deletions
+1 -1
View File
@@ -11,8 +11,8 @@ import (
"regexp"
"strings"
sqlite "github.com/mattn/go-sqlite3"
"github.com/grafana/grafana/pkg/util/xorm/core"
sqlite "github.com/mattn/go-sqlite3"
)
var (