-
Notifications
You must be signed in to change notification settings - Fork 291
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add first party mode datastore. #9642
base: develop
Are you sure you want to change the base?
Conversation
Build files for 91da16e are ready:
|
Size Change: +364 B (+0.02%) Total Size: 1.88 MB
ℹ️ View Unchanged
|
abd3121
to
8709b75
Compare
8709b75
to
f6712b6
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, @techanvil. This almost looks good. However, I've left a couple of comments for your review.
*/ | ||
setFirstPartyModeEnabled() { | ||
return { | ||
type: SET_FIRST_PARTY_MODE_ENABLED, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we return a payload
property?
type: SET_FIRST_PARTY_MODE_ENABLED, | |
type: SET_FIRST_PARTY_MODE_ENABLED, | |
payload: { isEnabled }, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for spotting that, @hussain-t! I've updated it to provide a payload 👍
switch ( type ) { | ||
case SET_FIRST_PARTY_MODE_ENABLED: { | ||
state.firstPartyModeSettings = state.firstPartyModeSettings || {}; | ||
state.firstPartyModeSettings.isEnabled = true; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we set it from the payload
instead of hardcoding it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated, cheers.
|
||
const baseControls = {}; | ||
|
||
const baseReducer = createReducer( ( state, { type } ) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
const baseReducer = createReducer( ( state, { type } ) => { | |
const baseReducer = createReducer( ( state, { type, payload } ) => { |
Summary
Addresses issue:
Relevant technical choices
PR Author Checklist
Do not alter or remove anything below. The following sections will be managed by moderators only.
Code Reviewer Checklist
Merge Reviewer Checklist