[#16935] Workspace creation with Policy Draft info - #29256
Conversation
| success | ||
| text={translate('workspace.new.newWorkspace')} | ||
| onPress={() => App.createWorkspaceAndNavigateToIt('', false, '', false, !isSmallScreenWidth)} | ||
| onPress={() => App.createWorkspaceWithPolicyDraftAndNavigateToIt()} |
There was a problem hiding this comment.
I can't just do
onPress={App.createWorkspaceWithPolicyDraftAndNavigateToIt}
because the onPress send a button event, and that object is passed and it breaks the calls
| } | ||
|
|
||
| /** | ||
| * Create a new Draft workspace and navigate to it |
There was a problem hiding this comment.
| * Create a new Draft workspace and navigate to it | |
| * Create a new draft workspace and navigate to it |
| return; | ||
| } | ||
|
|
||
| App.savePolicyDraftByNewWorkspace(props.policyDraft.id, props.policyDraft.name, '', false, '', !isSmallScreenWidth); |
There was a problem hiding this comment.
| App.savePolicyDraftByNewWorkspace(props.policyDraft.id, props.policyDraft.name, '', false, '', !isSmallScreenWidth); | |
| App.savePolicyDraftByNewWorkspace(props.policyDraft.id, props.policyDraft.name, '', false); |
| { | ||
| onyxMethod: Onyx.METHOD.SET, | ||
| key: `${ONYXKEYS.COLLECTION.POLICY_DRAFTS}${policyID}`, | ||
| value: null, | ||
| }, | ||
| { | ||
| onyxMethod: Onyx.METHOD.SET, | ||
| key: `${ONYXKEYS.COLLECTION.POLICY_MEMBERS}${policyID}`, | ||
| value: null, | ||
| }, |
There was a problem hiding this comment.
I think updates are done in order. It seems safer to clear the draft policy at last.
|
This is causing a crash if we try to access the admin/announce room offline Screen.Recording.2023-10-13.at.3.09.35.AM.mov |
@s77rt can you send me the steps, I'm not able to reproduce it. I just pushed, there was a typo, I wasn't deleting the |
|
I can't reproduce the bug now. Seems working fine. Probably related to the typo |
Reviewer Checklist
Screenshots/VideosWebweb.movMobile Web - Chromemweb-chrome.movMobile Web - Safarimweb-safari.movDesktopdesktop.moviOSios.movAndroidandroid.mov |
|
@gedu Great work! Day & night UX difference. Thanks! |
marcochavezf
left a comment
There was a problem hiding this comment.
LGTM, thank you guys!
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🚀 Deployed to staging by https://github.com/marcochavezf in version: 1.3.85-0 🚀
|
|
🚀 Deployed to production by https://github.com/francoisl in version: 1.3.85-4 🚀
|
|
🚀 Deployed to staging by https://github.com/marcochavezf in version: 1.3.86-0 🚀
|
|
🚀 Deployed to production by https://github.com/francoisl in version: 1.3.86-5 🚀
|
| accessibilityLabel={translate('workspace.new.newWorkspace')} | ||
| success | ||
| text={translate('workspace.new.newWorkspace')} | ||
| onPress={() => App.createWorkspaceAndNavigateToIt('', false, '', false, !isSmallScreenWidth)} |
There was a problem hiding this comment.
@gedu Shouldn't we update all instances of createWorkspaceAndNavigateToIt ? Or is it intentionally updated only for this specific case? The lack of updating other occurrences has resulted in inconsistency. For example, when creating a new workspace from the global menu, it still navigates to the workspace #admins room.
There was a problem hiding this comment.
Good point, I think we do not need this in the other flows either.
Details
Created 2 new keys to save Policy and PolicyMembers information,
PolicyDraftandPolicyMembersDraft. Those keys are filled with basic Policy information just for fast navigation to the Workspace Init Page, where those drafts are removed and the Policy data are saved and a request is made.Fixed Issues
$ #16935
PROPOSAL: #16935 (comment)
Tests
Offline tests
QA Steps
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)myBool && <MyComponent />.src/languages/*files and using the translation methodWaiting for Copylabel for a copy review on the original GH to get the correct copy.STYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)/** comment above it */thisproperly so there are no scoping issues (i.e. foronClick={this.submit}the methodthis.submitshould be bound tothisin the constructor)thisare necessary to be bound (i.e. avoidthis.submit = this.submit.bind(this);ifthis.submitis never passed to a component event handler likeonClick)StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG))Avataris modified, I verified thatAvataris working as expected in all cases)ScrollViewcomponent to make it scrollable when more elements are added to the page.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos
Android: Native
createWorkspace_android.mp4
Android: mWeb Chrome
createWorkspace_androidWeb.mp4
iOS: Native
createWorkspace_iphone.mp4
iOS: mWeb Safari
createWorkspace_iphoneWeb.mp4
MacOS: Chrome / Safari
createWorkspace_chrome.mp4
createWorkspace_safari.mp4
MacOS: Desktop
createWorkspace_desktop.mp4