-
Notifications
You must be signed in to change notification settings - Fork 79
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
frontend - feat: add new list view of users on map #4848 #5294
base: develop
Are you sure you want to change the base?
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
@marco-digennaro this is looking really good! I'm super excited to this feature to be rolled out as is should improve mobile QoL by a lot. Here are a few things I noticed in the preview (from a UI/UX perspective, I'm not a FE dev): The spacing between the cards is too much and takes up a lot of screen real estate: When the user selects a single pin, it should not show the expand drawer arrow ^ because there is no point of expanding the drawer upward for a single user card. Also, the spacing above and below the card is too much: When no pin is selected, the drawer still appears, which should not happen: After clicking on a pin, if the user zooms in and clicks on "search in this area" the card for the previously clicked pin persists, even if that pin is no longer in the search area: It's possible some of the map behavior issues may be caused by the next instance, but I'm not sure. Perhaps @nabramow and/or @darrenvong can assist here in helping assess the causes. |
this is so cool feature 🤩 , thanks for this! |
code looks great, once the UI feedback is done, and the build isn't red I can re-check and most likely approve :) |
const useStyles = makeStyles((theme) => ({ | ||
drawer: { | ||
/* */ | ||
width: "100%", | ||
height: "350px", | ||
overflowY: "auto", | ||
"&[data-open-state='true']": { | ||
height: "100%", | ||
top: "56px", | ||
position: "fixed", | ||
bottom: 0, | ||
left: 0, | ||
zIndex: theme.zIndex.drawer, | ||
backgroundColor: theme.palette.background.default, | ||
}, | ||
}, | ||
singleResult: { | ||
width: "100%", | ||
display: "flex", | ||
flexDirection: "column", | ||
justifyContent: "center", | ||
alignItems: "center", | ||
maxHeight: "400px", | ||
paddingBottom: theme.spacing(2), | ||
overflowY: "auto", | ||
}, | ||
verticalList: { | ||
display: "flex", | ||
flexDirection: "column", | ||
gap: theme.spacing(2), | ||
padding: theme.spacing(2), | ||
"& .MuiCard-root": { | ||
height: "auto", | ||
width: "100%", | ||
[theme.breakpoints.down("md")]: { | ||
height: "auto", | ||
"& .MuiCardContent-root": { | ||
height: "auto", | ||
}, | ||
"& .MuiCardActionArea-root": { | ||
height: "100%", | ||
}, | ||
}, | ||
}, | ||
}, | ||
openButton: { | ||
width: "100%", | ||
marginLeft: 0, | ||
}, | ||
closeButton: { | ||
width: "100%", | ||
marginLeft: 0, | ||
position: "sticky", | ||
top: 0, | ||
backgroundColor: theme.palette.background.default, | ||
borderRadius: 0, | ||
zIndex: theme.zIndex.drawer, | ||
}, | ||
icon: { | ||
fontSize: "3rem", | ||
}, | ||
})); |
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.
Since this is a new component, could you please use the new MUI styled way of doing the CSS? We're slowly trying to remove all of this way as it's not compatible with the next MUI version.
Just search "Styled" for some examples or you can look at: app/web/components/Footer/Footer.tsx.
yes, i tried to investigate, it's cause of this piece of code if (!wasResultFound && selectedUserData.data) { |
@bakeiro @nabramow @jesseallhands made some adjustments, please check :) |
The spacing issues are completely resolved! Thanks! While testing, I ran into an issue where when I clicked on certain pins, it would not center the card within the drawer (it would land somewhere in between cards) see video below: Screen_Recording_20241205_200746_Firefox_1.mp4There is also some strange behavior when drawer initially opens. It's almost as if it is showing my own card (and the Chevron for the drawer) just before opening or just before closing. See video: Screen_Recording_20241205_201332_Firefox.mp4In addition to resolving that problem, I would also recommend using mountOnEnter and unmountOnExit so the drawer slides in from the bottom upward, which also hints to the user that it is a slidable drawer. I think the same can be used to slide down the drawer when minimizing from the "full screen" list view to the Single-Card view and also when closing the drawer altogether. Thanks once again for working on this feature! I'm very excited about it and I think mobile users will really love it! |
Although I agree on this I am not sure how we can solve this as first it is nothing new, it is something old [and in production already....] The behavior we see on the video is the difference between openning a result which is on the loaded list vs opening a result which isn't in this list, (you may wonder which list is the one on the left in the desktop version). the background for this is, at the beginning I implemented to show only a subset of results, plus the pagination, what happened is that we wanted to implement to show all users at the first render, because it was something that sold very well. Since loading all users in the list isn't possible (cause it's to big) therefore, when you click on a user, if this is within the list, it moves and puts the user in the center, otherwise it clears the list temporarily and shows specifically that particular user. Edit:
apart of this we can create a investigation ticket to find a better solution |
i think there's a different behaviour of the map between mobile and desktop, and apparently i can't reproduce that bug on desktop browser with mobile view. PS: where can i find the vercel previews? |
|
it didnt work, i need to investigate further why it happens, or if @bakeiro knows already where to look, please write me so i'll try to fix :) |
I believe that both issues can be solved if we solve the list issue, as I say before depends how we want to solve it
if other person has other suggestion/solution please say, I personally think the best one it's to do the first solution [not show the list at the beginning] and then create a re-search ticket for the future. If this solution is outside the scope of this PR/ticket I can create another ticket for this :) [then we can merge both PRs together, or you can do a PR from this PR as you prefer...] write me on Slack if you need more info about this! |
Update: Marco and I talked about this, our plan it's to merge this PR (unless a new bug is found, code suggestions or whatever) and then we will do pair programming to see how to address these bugs [in another PR/ticket] |
@@ -174,52 +172,35 @@ export default function SearchPage({ | |||
locationResult.location.lat, | |||
]); | |||
|
|||
/** |
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.
fixes the bug when a selected result remains even after searching
@@ -123,6 +128,10 @@ export default function SearchResultsList({ | |||
.flatMap((page) => page.resultsList) | |||
.filter((result) => result.user); | |||
|
|||
if (isMobile && !wasSearchPerformed && !searchFromDashboard) { |
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.
fix blinking
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.
Okay two things here:
-
The up and down arrows are really big, thick and have a lot of padding around them. That seems non-standard to me. Especially since mobile space is limited, could you make the arrow smaller and less pixels of padding above and below?
-
Can we just always show this version on mobile even if there is only one result? It seems confusing that it switches when there's more results. I think it's fine if it shows even with one result for consistency.
Otherwise works great functionality-wise so just those 2 design things!
I totally agree here, the problem is that we show all the users the first time (bc is a big selling point apparently) and this creates issues, since we need to change the behavior after the user performs a search/applies a filter, I've been complaining about this during long time, I've created this ticket to explore different solutions #5348 we can talk about this (and we should) but is basically this switch between the first render and after the search which causes a lot of issues, but apparently is better this behavior inconsistency than not showing all the users at the first render... |
I'm thinking about a solution for this... I came up with this idea: I feel this way it's better than re-locating the list on the button to display the selected user... [basically something like airbnb is doing!] more info #5405 |
small CSS change pushed :) |
@bakeiro This looks way better, thanks for making that change! Way more consistent this way. Just that one comment about the arrow then, would it be possible to make the arrow a bit smaller? Especially the up arrow seems huge and on mobile it's usually thinner and smaller. |
making arrow smaller again, please, let me know if its good enough now @nabramow :) |
Closes #4848
Web frontend checklist
yarn format
yarn lint --fix