-
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
Users by badge #5261
base: develop
Are you sure you want to change the base?
Users by badge #5261
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
7af1c40
to
b3f2f6e
Compare
a2a7260
to
18405b7
Compare
b3f2f6e
to
c6e18b3
Compare
@aapeliv Is this ready for review? I can't tell! Feel free to move the status to "PR" if so! |
18405b7
to
8affa65
Compare
consolidated hooks for the badges feature
I thought having a clickable chip with a tooltip is a common scenario we might want to make use of later, so I extracted this functionality originally built out in the features/profile/view/Badges file into a ToolChipLink component. The Badge component is then just a wrapper around that where you pass in a Badge resource. This uses a URL scheme for badges at /badges/{id}
These are better user-facing descriptions of the available badges
Designed to look the same as the index page
also added some better styling to the instructions text on the index page
c6e18b3
to
f8cdbbc
Compare
This is ready for review now! |
const { data, ...rest } = useQuery(badgesKey, () => | ||
service.resources.getBadges().then((result) => | ||
result.badgesList.reduce( | ||
(badgesResult, badge) => { | ||
badgesResult.badges[badge.id] = badge; | ||
return badgesResult; |
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.
Could you switch this over to async await syntax instead? The .then
is a bit outdated IMO.
It means you'll need to turn the first into its own variable but that also is more readable.
const useStyles = makeStyles((theme) => ({ | ||
badgeContainer: { | ||
marginTop: theme.spacing(1), | ||
}, | ||
badge: { | ||
marginInlineStart: theme.spacing(1), | ||
marginBottom: theme.spacing(1), | ||
}, | ||
const StyledContainer = styled("div")(({ theme }) => ({ | ||
marginTop: theme.spacing(1), |
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.
Yaaay!
FYI @aapeliv Shirley just added the mobile designs to the description! |
This builds on top of #5259, which itself builds on #5253 and #5254!Taking over from #5250. Continues the frontend part of #4389.
TODO:
making the badges pretty on the user pageWeb frontend checklist
yarn format
yarn lint --fix
Mobile Design
The badges will be aligned and wrapped around. Also made the text white for easier reading against harsh BG colors. Filtering badges only work one at a time as of now. Pls refer to the desktop version for the mini bio of each badge!