-
Notifications
You must be signed in to change notification settings - Fork 3
show more button for v2 drawer dates #1809
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
Conversation
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.
A couple of questions that may or may not lead to changes - looks good.
frontends/ol-components/src/components/LearningResourceExpanded/InfoSectionV2.tsx
Outdated
Show resolved
Hide resolved
frontends/ol-utilities/src/learning-resources/learning-resources.ts
Outdated
Show resolved
Hide resolved
frontends/ol-utilities/src/learning-resources/learning-resources.ts
Outdated
Show resolved
Hide resolved
frontends/ol-components/src/components/LearningResourceExpanded/InfoSectionV2.tsx
Outdated
Show resolved
Hide resolved
04c3874
to
b663c2f
Compare
@jonkafton This is ready for another look. I also noticed another issue with the CTA image and couldn't help myself but to fix it. Remember how you discovered that issue where it was floating above the sticky header when scrolling, and I put in a fix to move it below with const Image = styled(NextImage)<{ aspect: number }>`
position: relative !important;
border-radius: 8px;
width: 100%;
aspect-ratio: ${({ aspect }) => aspect};
object-fit: cover;
z-index: -1;
` |
Better, plus we use elsewhere. The % padding does feel like a trick. |
* break out learning resource run comparison into a utility function * add show more functionality for start dates * remove separator at the end before show more / show less button * don't wrap dates * don't wrap show more button * fix test * fix cta image, use aspect-ratio and relative position * put aspect on img element instead of containing div so it works in chrome and safari * fix tests * remove start date comparison as it's not supposed to work that way * don't show dates info item at all if there are differning runs * show less link should be on its own line * remove unnecessary line break * optimize the code a bit * better name * fix column widths in differing runs table * refactor logic surrounding run dates * filter out null start dates * adjust padding above "Show less"
What are the relevant tickets?
Closes https://github.com/mitodl/hq/issues/5874
Description (What does it do?)
This PR adds a "show more" link to the start dates section of the info displayed in the v2 learning resource drawer. This expands and collapses the start dates for the course.
Screenshots (if appropriate):
How can this be tested?
lr_drawer_v2
flagdrawerV2
to betrue
inLearningResourceDrawer.tsx
mit-learn