Skip to content
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

Sorting + Skeleton loading state #724

Merged
merged 12 commits into from
Aug 25, 2021
Merged

Sorting + Skeleton loading state #724

merged 12 commits into from
Aug 25, 2021

Conversation

dan13ram
Copy link
Member

Closes #503

@dan13ram dan13ram added frontend Front end related issues / features ready-for-review Add this label to your PR when its ready for review labels Jul 27, 2021
@vercel
Copy link

vercel bot commented Jul 27, 2021

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/metafam/the-game/6vJMvT6Neac1dLfd7czF7X1DYqaC
✅ Preview: https://the-game-git-feat-sorting-metafam.vercel.app

@alalonde
Copy link
Contributor

alalonde commented Aug 3, 2021

Cool! Love the loading state.

I did some testing on https://the-game-9t0xeliie-metafam.vercel.app/players and noticed a few things:

  • I don't think the XP label is very clear (e.g. XP: 675 (4392)), not sure if that was "officially" designed or not
  • fearlessthompson is 516 (986) in the seasonal XP sort mode, but XP: 1024 in the normal sort mode.

@dan13ram
Copy link
Member Author

dan13ram commented Aug 3, 2021

@alalonde please take a look at https://the-game-git-feat-sorting-metafam.vercel.app
Not sure which commit that link you shared is from.

I don't think the XP label is very clear (e.g. XP: 675 (4392)), not sure if that was "officially" designed or not

This was something me and @davort came up with. Please suggest a better alternative if you have one in mind :)

fearlessthompson is 516 (986) in the seasonal XP sort mode, but XP: 1024 in the normal sort mode.

This seems like an issue with caching. A refresh and it should work fine. Now it shows 1024 for both cases for me.

@davort
Copy link

davort commented Aug 3, 2021

@alalonde please take a look at https://the-game-git-feat-sorting-metafam.vercel.app
Not sure which commit that link you shared is from.

I don't think the XP label is very clear (e.g. XP: 675 (4392)), not sure if that was "officially" designed or not

This was something me and @davort came up with. Please suggest a better alternative if you have one in mind :)

Indeed, this was a low cost fix for showing seasonal XP, while still providing info on total XP in the same view. For the sake of clarity, we would have them show separately, and with accompanying text labels: SEASONAL XP: 123 TOTAL XP: 1000

And when sorted by total XP, show only TOTAL XP: 1000

If this isn't too much work, I'd suggest going with that. It will make the cards longer, since the XP metadata will most likely take up another row, if formatted like this. We may want to compensate by shortening the "ABOUT" text to three rows, so as to not elongate the cards further, and make scanning the page easier. Let me know your thoughts on this idea please, @alalonde and @dan13ram

Finally, one thing I noticed, that happens for me at least, is that the cards in the same row aren't of the same height
CleanShot 2021-08-03 at 08 30 33
CleanShot 2021-08-03 at 08 30 50

@dan13ram – is it just me or do you notice the same? If it's the same for you too, could you please take a look into that?

@alalonde
Copy link
Contributor

alalonde commented Aug 4, 2021

Indeed, this was a low cost fix for showing seasonal XP, while still providing info on total XP in the same view. For the sake of clarity, we would have them show separately, and with accompanying text labels: SEASONAL XP: 123 TOTAL XP: 1000

Yup, this sounds good to me. Do we display what the current season is somewhere? A name, dates, etc

@alalonde
Copy link
Contributor

alalonde commented Aug 4, 2021

Noticed this too, if it's not a regression I can just create another issue

Screen Shot 2021-08-03 at 10 47 19 PM

Copy link
Contributor

@alalonde alalonde left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good overall, I have some minor concerns about some of these shared components starting to do too much. Probably not worth blocking an approval / merge.

Apologies for the delay in review.

tagLabel =
title.toLowerCase() === 'availability' ? `>${value.value}` : value.value;
let title = selectTitle;
if (title.toLowerCase() === 'availability' && value.length > 0) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This sort of logic should probably not be in a component in the design-system package as those components are intended to be generic and reusable, no? Could you e.g. pass in the value of tagLabel instead?

packages/web/components/Patron/PatronTile.tsx.bak Outdated Show resolved Hide resolved
@dysbulic
Copy link
Member

dysbulic commented Aug 9, 2021

If I load the test site and click on "Sorted By" → "Seasonal XP", I get an error.

2021-08-09@06.08.11.mp4

@lucidcyborg
Copy link
Member

The error comes up for all the sorting options when it's already checked.

Also, can you make the dropdown close when selecting an option?
For me it stays open until I click somewhere else

@lucidcyborg
Copy link
Member

I'll create a separate issue for the close on click. So this can be merged

@dan13ram
Copy link
Member Author

@alalonde @dysbulic @mquellhorst Thank you for your reviews! Apologies for taking this long to fix the PR.
Please take a look now and let me know if its good to merge.

@alalonde
Copy link
Contributor

Thanks! Created #786 for the issue @dysbulic mentioned

@alalonde alalonde merged commit 21e76b4 into develop Aug 25, 2021
@alalonde alalonde deleted the feat/sorting branch August 25, 2021 14:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
frontend Front end related issues / features ready-for-review Add this label to your PR when its ready for review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[MyMeta] Add filters to /players page
5 participants