-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
Added workspace Settings Modal #3602
Conversation
I know this is a WIP but going to start leaving some design feedback here so you have it. If you take a look at the original mockups, I think the goal is to have the workspace appear as a modal on wide screens - similar to how viewing an attachment looks. On smaller screens, we basically just repeat the same navigation pattern as the chat portion of the app where we have a menu (the left list of chats) where you can navigate to a specific page (aka a chat). There's a couple of other small tweaks I am noticing - the background color on the right side should be white, there should be a small border between the left and the right pane (on desktop), and the "Borton Enterprises" area should basically reuse the exact styling when you view your own profile and see an avatar + name underneath. Also cc @michelle-thompson to follow along for this one too. |
I am not sure what would be the Mobile behavior for this. But I have used Q: Please let me know what would be mobile look and behavior of this?
Here the property is wrong but I improvised. So we have three different conditions.
Questions:
|
Thanks, @shawnborton I was about to tag you. Please look at the above questions. |
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.
Looks like a really great start to me overall. I left mostly small comments and non blockers but there are a few requests. 🚀
src/libs/Navigation/AppNavigator/WorkspaceSettingsDrawerNavigator.js
Outdated
Show resolved
Hide resolved
src/libs/Navigation/AppNavigator/fullscreenModalcardStyleInterpolator.js
Outdated
Show resolved
Hide resolved
Please help me with these questions @marcaaron. #3602 (comment) |
This behavior makes sense to me, but perhaps @shawnborton has another idea. My feeling is that we can start with this and switch it up later, but probably design has a better idea than me of what would be best.
I'll let @shawnborton take those.
This should be
I think the language here is perhaps confusing and there is no need to check whether they have "no VBA" or "any number of VBAs" since that would cover all possible scenarios 😅 So, I think the relevant information we need is just:
cc @MitchExpensify @kevinksullivan to make sure that last assumption is correct |
I think it would behave just like navigating to a chat from the home screen.
Apologies as I am not following here - what is the link that you referencing? |
@marcaaron this is correct, so we do not have to check whether a VBA exists or not. Just if the user is on a public domain and if not, whether that domain has an enabled expensify card already. Public domain
Non-Public Domain, Expensify Card already enabled
Non-Public Domain, Expensify Card not enabled
|
@roryabraham How to check if |
@roryabraham |
@shawnborton I checked the profile page Avatar size and font size for the name but that seems smaller in comparison to the mockups here. Their font size is 17 and the avatar size is 80x80. What are the values here? |
@marcaaron I assume that the Close button on both sidebar and Card page should close the whole workspace Modal and the back arrow should just shift back in history. I have used HeaderWithbackbutton Component and it does not seem to work well. The back arrow and close button on the sidebar do not do anyting and the Close button on Arrow sometimes closes the modal and sometimes takes us back to the Report Page. I would like to ask what should I do here. I am thinking custom handler for the card page back button to |
That's correct.
No, I don't think it would change the history. We will want to just open the drawer for the new drawer navigator. You can take a look at how we handle this for the ReportView + sidebar here e.g. https://github.com/Expensify/Expensify.cash/blob/2c831b06e70b19a932165921416741d8b5561d56/src/pages/home/ReportScreen.js#L90-L93 But let me know if this doesn't work and I can help figure out alternatives. |
@shawnborton Any input? Thanks. |
@marcaaron I did
added check for workspace route here. Code is updated to reflect that. |
Will pull down the branch in a bit and see if I can think of anything. |
@michelle-thompson Could you please help me deciding this #3602 (comment)? |
@parasharrajat it seems like what's happening here is that we do not remove the I believe this is because those methods will refer to the drawer navigator that is on the top of the stack. So, what we need to do is:
diff --git a/src/libs/Navigation/Navigation.js b/src/libs/Navigation/Navigation.js
index 55a222d15..1cab26ba4 100644
--- a/src/libs/Navigation/Navigation.js
+++ b/src/libs/Navigation/Navigation.js
@@ -78,6 +78,11 @@ function dismissModal(shouldOpenDrawer = false) {
// This should take us to the first view of the modal's stack navigator
navigationRef.current.dispatch((state) => {
+ // If this is a nested drawer navigator then we must pop this screen
+ if (state.type === 'drawer') {
+ return StackActions.pop();
+ }
+
// If there are multiple routes then we can pop back to the first route
if (state.routes.length > 1) {
return StackActions.popToTop(); I tested this change and I think it will work, but let me know what you think. |
That makes sense to me. let me try. |
That worked like a charm. Thanks for the help. Code pushed. Waiting for Final Design related questions. It seems that I have spent most of the time waiting for getting answers related to designs. |
@shawnborton It slipped from my mind. I will be needing those icons on the left sidebar. I know that this was not part of original task but thought it can be combined so I made the sidebar as well. |
I think the people icon already exists as we use it in the Create menu for Groups. Here is the Expensify Card icon: expensifycard.svg.zip |
@parasharrajat regarding your comment above about the avatar and font size, I think ideally we use the same avatar and font size as this view here: |
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.
Just a few comments mostly looking great to me.
@@ -43,7 +43,7 @@ function goBack() { | |||
* @param {String} route | |||
*/ | |||
function navigate(route = ROUTES.HOME) { | |||
if (route === ROUTES.HOME) { | |||
if (route === ROUTES.HOME || route === ROUTES.WORKSPACE) { |
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.
NAB, when we are navigating to /workspace
we are assuming that we're already navigated to /workspace/card
or some other route. We should maybe add a comment to clarify what's happening here and the intended behavior e.g.
If someone tries to navigate to
/workspace
when the workspace drawer is not open the home drawer will toggle. In this case, we should navigate to a sub-route of workspace instead e.g./workspace/card
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.
Actually, this also kind of makes me think that it might be incorrect to have this check in general right?
We already established that calling Navigation.goBack()
will toggle the drawer. So maybe we can do that instead of navigating to /workspace
when we want to toggle the workspace sidebar open?
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.
But when we will navigate over the WorkspaceSetting Modal, then go back will switch those screens, Let's say first we got Card page then people page. So on the people page, goback should take us to Card apge.
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.
@marcaaron Please tell me if I need to do these changes as well. Otherwise, PR is ready for review.
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.
I'm not really following as there's no way to access the the /workspace/people
from /workspace/card
, but it's not a blocker for me just something that seems weird / confusing.
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.
Ok. I think it's better than we can adjust that later when we implement other pages like /workspace/people.
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.
LGTM, great work @parasharrajat ! 🙇
✋ 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 in version: 1.0.73-4🚀
|
🚀 Deployed to production in version: 1.0.74-0🚀
|
@marcaaron @roryabraham Please review. I believe needs improvements.
Details
Fixed Issues
Fixes #3566
Tests
QA Steps
Tested On
Screenshots
Web
Overall design
workspace.mp4
When user is on Private Domain
When user Is on public Domain
When the user has card Enabled
Final Web | Desktop
workspace-w.mp4
Mobile Web
workspace-m.mp4
iOS
Android
workspace-a.mp4