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

[UI] QuestList card component #427

Open
wants to merge 28 commits into
base: main
Choose a base branch
from
Open

[UI] QuestList card component #427

wants to merge 28 commits into from

Conversation

biliesilva
Copy link
Contributor

@biliesilva biliesilva commented Jan 8, 2025

Description

This pr is to send the new QuestList component hard coded for our Storybook

PS: After our new auth login is in place I can get the user info about the "Ready for Claim" quests so we can show and finalize the logic for this component in the client.

Design

image

Design Link

Storybook Link Preview

Copy link

vercel bot commented Jan 8, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
hyperplay-ui ✅ Ready (Inspect) Visit Preview Jan 31, 2025 10:02pm

Copy link
Collaborator

@eliobricenov eliobricenov left a comment

Choose a reason for hiding this comment

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

second date count should be neutral-400

Screenshot 2025-01-30 at 12 57 24 PM Screenshot 2025-01-30 at 12 57 34 PM

display: flex;
margin-top: 20px;
align-items: center;
gap: 0.5rem;
Copy link
Collaborator

Choose a reason for hiding this comment

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

can we use spacing var here

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

@@ -0,0 +1,21 @@
import { Quest } from '@hyperplay/utils'
Copy link
Collaborator

Choose a reason for hiding this comment

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

I'm not too opinionated about this but we usually define the props in the same file as the component. For consistency, can you move it to the component file, please?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done :)

@ry-animal
Copy link
Contributor

Were there requirements in this story for mobile responsiveness?
Screenshot 2025-02-10 at 7 05 24 AM

<div className={styles.readyForClaim}>
<p className={styles.readyForClaimTitle}>
<QuestIconTwo className={styles.questIconTwo} />
Ready for Claim
Copy link
Contributor

Choose a reason for hiding this comment

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

would be good if this were an i18n string

Ready for Claim
</p>
<Sticker styleType="secondary" variant="filledStrong">
Label
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this meant to be a hardcoded "Label" string?

Comment on lines +33 to +54
const readyForClaimQuests = [
{
id: 1,
title: 'Play Streak',
duration: '0 / 7 days',
resetTime: 'Day resets:',
time: '23:43:03 (UTC)',
questType: 'PLAYSTREAK',
reward: '+200 G7C'
}
]
const activeQuests = [
{
id: 2,
title: 'Play Streak',
duration: '0 / 7 days',
resetTime: 'Day resets:',
time: '23:43:03 (UTC)',
questType: 'PLAYSTREAK',
reward: '+200 G7C'
}
]
Copy link
Contributor

Choose a reason for hiding this comment

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

this should be in the story

Comment on lines +91 to +94
Weekly
</Sticker>
<Sticker styleType="tertiary" variant="outlined">
2x
Copy link
Contributor

Choose a reason for hiding this comment

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

a couple more hardcoded strings here

<p className={styles.resetTime}>
<ClockNew className={styles.clockIcon} />
<span className={styles.time}>
Day resets: 23:43:03 (UTC)
Copy link
Contributor

Choose a reason for hiding this comment

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

here too

Copy link
Contributor

Choose a reason for hiding this comment

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

there are a lot of hardcoded strings in here. They should be i18n strings. The dummy data should only be used in the story too

Comment on lines +152 to +156
<p className={classNames('body', styles.questType)}>
<Lightning className={styles.lightningIcon} />
Play Streak
</p>
<p className={styles.rewardType}>+200 G7C</p>
Copy link
Contributor

Choose a reason for hiding this comment

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

it might be best if we accepted a React.ReactElement as a prop and then showed it here

Copy link
Contributor

Choose a reason for hiding this comment

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

I like that you are trying to make this component very general.

To that end, how do you feel about making this a layout component?

Basically we would accept React.ReactElement props for each area of the component and it would be up to the consuming code to pass in the appropriate elements.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That's a good suggestion!
I had left most of this component hard coded because I plan to make it more dynamic when we have the auth login in place since much of what will be shown in it will only be rendered if the user is logged in.

@biliesilva
Copy link
Contributor Author

Were there requirements in this story for mobile responsiveness? Screenshot 2025-02-10 at 7 05 24 AM

Yes, there's. This PR is paused for the moment because I need our new login feature, which is not yet active. I'll also add the mobile responsiveness during this. Thank you for pointing it out!

@eliobricenov
Copy link
Collaborator

This PR is paused for the moment because I need our new login feature

Can you elabore on this @biliesilva? Making the component fully dynamic shouldn't need any implementation detail at this point. You can come up with the API you see fit right now.

@biliesilva
Copy link
Contributor Author

This PR is paused for the moment because I need our new login feature

Can you elabore on this @biliesilva? Making the component fully dynamic shouldn't need any implementation detail at this point. You can come up with the API you see fit right now.

This was more of a prioritization as we discussed in one of our past meetings. There were more urgent tickets to work on, as this one still requires the new login authentication to go live, I paused it for now, but I intend to come back as soon as I can to change what Brett asked above, and make it more mobile responsible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants