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
A constant called controllerName exists which holds the name of the controller.
A constant called controllerMetadata exists which holds the metadata for the state.
The default state object (defaultState) is extracted to a function called getDefaultOnboardingControllerState.
OnboardingController inherits from BaseController.
The OnboardingController constructor signature is updated to take a partial state option instead of initState (which is of type Partial<Omit<OnboardingControllerState, 'onboardingTabs'>>), as well as messenger.
The OnboardingController constructor is updated to super to the superclass.
The way that default state is mixed into given state is simplified.
this.state is used to access state instead of this.store.getState.
this.update is used to update state instead of this.store.updateState.
Supporting types exist.
The OnboardingControllerState type exists and represents the current shape of the state object.
The OnboardingControllerGetStateAction and OnboardingControllerStateChangeEvent types exist.
The AllowedActions and AllowedEvents types exist.
The OnboardingControllerMessenger type exists and expects no actions or events to be allowed.
OnboardingControllerState exists and represents the current shape of the state object.
The tests are updated to follow suit.
onboardingController.state is used to access state instead of onboardingController.store.getState().
onboardingController.store.updateState is not mocked, as this is no longer possible.
Instead of using beforeEach to initialize the controller in each test, a setupController function exists and is called in each test.
Stakeholder review needed before the work gets merged
Engineering (needed in most cases)
Design
Product
QA (automation tests are required to pass before merging PRs but not all changes are covered by automation tests - please review if QA is needed beyond automation tests)
What is this about?
Following the Wallet Framework team's OKRs for Q3 2024, we want to bring
OnboardingController
up to date with our latest controller patterns.Scenario
No response
Design
No response
Technical Details
No response
Threat Modeling Framework
No response
Acceptance Criteria
controllerName
exists which holds the name of the controller.controllerMetadata
exists which holds the metadata for the state.defaultState
) is extracted to a function calledgetDefaultOnboardingControllerState
.OnboardingController
inherits fromBaseController
.OnboardingController
constructor signature is updated to take a partialstate
option instead ofinitState
(which is of typePartial<Omit<OnboardingControllerState, 'onboardingTabs'>>
), as well asmessenger
.OnboardingController
constructor is updated tosuper
to the superclass.this.state
is used to access state instead ofthis.store.getState
.this.update
is used to update state instead ofthis.store.updateState
.OnboardingControllerState
type exists and represents the current shape of the state object.OnboardingControllerGetStateAction
andOnboardingControllerStateChangeEvent
types exist.AllowedActions
andAllowedEvents
types exist.OnboardingControllerMessenger
type exists and expects no actions or events to be allowed.OnboardingControllerState
exists and represents the current shape of the state object.onboardingController.state
is used to access state instead ofonboardingController.store.getState()
.onboardingController.store.updateState
is not mocked, as this is no longer possible.beforeEach
to initialize the controller in each test, asetupController
function exists and is called in each test.Stakeholder review needed before the work gets merged
References
The text was updated successfully, but these errors were encountered: