-
Notifications
You must be signed in to change notification settings - Fork 1
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
Danielle/535 add current entry number in header of entry page #615
Danielle/535 add current entry number in header of entry page #615
Conversation
Gridiron Survivor Application
Project name: Gridiron Survivor Application
Only deployments on the production branch are activated automatically. If you'd like to activate this deployment, navigate to your deployments. Learn more about Appwrite Function deployments.
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
…n-survivor into danielle/535-add-current-entry-number-in-header-of-entry-page
…ildren in the middle
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.
Week {week} pick | ||
</h1> | ||
|
||
<Heading |
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.
Why not test that H1 is on the screen and has the correct value as well?
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.
@ryandotfurrer How come all headings do not have pb-8
by default? Heading's usually have margin from the next element.
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.
@shashilo complete
<Heading | ||
as='h2' | ||
className='pb-8 text-muted-foreground' | ||
data-testid='entry-name' |
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.
Let's follow BEM naming convention. This should be data-testid='week__entry-name'
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.
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.
@shashilo complete
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 🚀
…header-of-entry-page
as='h2' | ||
className='pb-8 text-muted-foreground' | ||
data-testid='week__entry-name' | ||
>{entryName} |
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.
Sorry if this is a dumb question, but is there a reason we're not just using currentEntry.name
here instead of creating state for it? It never changes, right?
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.
@mhchen currenEntry.name
is inside of a function call and thus not available to the greater Week component. That's why I saved that piece of data to state when the function is called. I was not 100% confident in this approach though so please feel free to dissect this!
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.
Oh nope, you’re right. Turns out it was a dumb question!
I’m so used to a different data fetching paradigm that I forgot this is necessary sometimes.
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.
Mike does bring up a good point here. This is not part of this ticket, but because we're now tracking 2 pieces of data from the response object, we should refactor the state to store the pick history and the entry name. A good ticket to refactor some code into the backlog.
…header-of-entry-page
Before: no entry number in header of entry page
After: entry number added to header of entry page
<Heading/>
component<Heading/>
componentColor is up for debate as is spacing.