-
Notifications
You must be signed in to change notification settings - Fork 24
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
1713/remove business logic from AppStatusItem component #1714
Conversation
✔️ Deploy Preview for dev-storybook-bloom ready! 🔨 Explore the source changes: 8dd43e5 🔍 Inspect the deploy log: https://app.netlify.com/sites/dev-storybook-bloom/deploys/613fa1d2b54d4000088a979a 😎 Browse the preview: https://deploy-preview-1714--dev-storybook-bloom.netlify.app |
✔️ Deploy Preview for dev-partners-bloom ready! 🔨 Explore the source changes: 8dd43e5 🔍 Inspect the deploy log: https://app.netlify.com/sites/dev-partners-bloom/deploys/613fa1d2008b3900071c3994 😎 Browse the preview: https://deploy-preview-1714--dev-partners-bloom.netlify.app |
✔️ Deploy Preview for dev-bloom ready! 🔨 Explore the source changes: 8dd43e5 🔍 Inspect the deploy log: https://app.netlify.com/sites/dev-bloom/deploys/613fa1d250982000073caae1 😎 Browse the preview: https://deploy-preview-1714--dev-bloom.netlify.app |
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.
Hi @emilyjablonski , this looks good. I have a question around how dates should be passed in, which is up for discussion. My opinion is that dates should be passed into the component already formatted, allowing SF, the core team or anyone else to use the date library of their choice.
{t("listings.applicationDeadline")}: {applicationDueDate.format("MMMM D, YYYY")} | ||
</p> |
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.
What do you think about passing in dates that are already formatted? I think we should work towards UI Components being independent of date libraries like Moment.
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.
Great idea 👍
✔️ Deploy Preview for clever-edison-cd22c1 ready! 🔨 Explore the source changes: e0b203c 🔍 Inspect the deploy log: https://app.netlify.com/sites/clever-edison-cd22c1/deploys/612fb7100ca6680007c7cb44 😎 Browse the preview: https://deploy-preview-1714--clever-edison-cd22c1.netlify.app |
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.
Just one deprecation to look at and a general question, otherwise looks good to me. 👍
className="status-item__link lined" | ||
href={`/listing/${listing.id}/${listing.urlSlug}`} | ||
> | ||
<LocalizedLink className="status-item__link lined" href={props.listingURL}> |
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.
FYI, LocalizedLink is deprecated and we should probably remove it soon. Best to use LinkComponent
from the NavigationContext
instead. (See the LinkButton
component for example usage.)
applicationUpdatedAt: string | ||
confirmationNumber?: string | ||
listingName: string | ||
listingURL: string | ||
} | ||
|
||
const AppStatusItem = (props: AppStatusItemProps) => { |
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.
I wonder if we should rename this and the props as well to something even more generic like just StatusItem
. That's what the CSS class names are already.
f0649e9
to
6f0e2d6
Compare
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.
Looks good to me, @jaredcwhite , can you take another look since the updates.
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 👍
e0b203c
to
f678bde
Compare
f678bde
to
8dd43e5
Compare
Pull Request Template
Issue
Addresses #1713
Description
Removes business logic from AppStatusItem component. Included removing our URL formatting. Also fixes a bug where the component would show
Application Due Date: Invalid Date
if the date was null (any FCFS listing) - now I just don't show that piece if it's null.Type of change
How Can This Be Tested/Reviewed?
You can look in storybook, and in the public app the AppStatusItem component is used in the My Applications tab.
Checklist: