You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
## Motivation for features / changes
Following #6821 As pin data is accumulated, unwanted pins can easily
crowd the dashboard. Therefore, this PR adds a button that allows users
to conveniently clear all pins at once.
## Technical description of changes
* 57c6a47 Introduced new action called `metricsClearAllPinnedCards`
* When `metricsClearAllPinnedCards` is dispatched, the reducer removed
all pinned cards in the state.
* a04c2d7 Added `clear all pins` button in the pinned view container.
* The button will be shown if there's at least one pinned card.
* f0c3a54 Implemented `removeAllScalarPins` method in the saved pins
data source.
* This method removes stored pins from local storage.
* e97b110 Added `removeAllPins` effect in the `metrics/effects/index.ts`
* When `metricsClearAllPinnedCards` action is called, this effect will
call `removeAllScalarPins` method defined in the saved pin data source.
* c0edd37 guarded UI feature (button) with feature flag and added
related tests.
## Screenshots of UI changes (or N/A)
### Light mode

### Dark mode

## Detailed steps to verify changes work correctly (as executed by you)
Unit test pass & cl TAP presubmit pass
## Alternate designs / implementations considered (or N/A)
I also considered a feature to select a pinned card and remove the
selected pinned card, but I thought that this would be the same as
pressing the 'unpin' button individually from the user's perspective. So
I implemented a 'clear all pins' button that removes all pinned cards.
Any feedback is appreciated!
0 commit comments