Closed
Description
Description
Currently, the state of the widget stack on the NTP is binary:
export type StackWidget = 'rewards' | 'binance'
interface NTPState {
currentStackWidget: StackWidget
}
This doesn't allow for ease of adding more widgets to it, which we plan to do. This attribute should be moved to a list, which is enumerated over and controls the display of the widgets in the stack. This will result in 0 change to the user experience, but will pave the way for the future widgets we plan to add. The piece of work should also migrate older states when upgrading to this new format.
Test Plan
- Clean Profile
- Perform a general regression test of the widget stack, which includes showing/hiding Binance and Rewards, as well as toggling between the two to move them between the foreground and background.
- Ensure that turning the widgets on and off via
brave://settings/newTab
works as expected. - Upgrade from a previous profile, with varying states of the widget stack (ex: each in foreground, one off, one on, both off) and ensure that the state is preserved upon upgrade.