-
Notifications
You must be signed in to change notification settings - Fork 0
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
Polish admin posting pages #203
Conversation
Visit the preview URL for this PR (updated for commit 51ecdcd): https://sistering-dev--pr203-sherry-polish-admin-surs4jdg.web.app (expires Thu, 31 Mar 2022 17:35:49 GMT) 🔥 via Firebase Hosting GitHub Action 🌎 |
f1ee05e
to
9537595
Compare
* TODO: implement better solution described here | ||
* https://github.com/fullcalendar/fullcalendar/issues/4684#issuecomment-620787260 | ||
*/} | ||
<div key={startDate}> |
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.
More context:
We need to set the initial date of the calendar to be in the week of the start date, which can be done via the intialDate
prop passed to FullCalendar
. The start date changes depending on user input on the create shifts page. However, FullCalendar does not re-render when the prop changes. This is a temp hack to force a re-render.
https://github.com/fullcalendar/fullcalendar-react/issues/57
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.
Wait if posting start date is not on a sunday, is it supposed to rerender? Bc it does not for me.
Also, I realized if they make a posting that does not span the entire week, like wednesday to friday, the shift calendar will still allow you to create shifts for the entire week. It's kind of confusing bc when you input the dates, the format of the date doesn't say what day of the week it is.
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.
Summary of what we discussed on Sunday:
Wait if posting start date is not on a sunday, is it supposed to rerender? Bc it does not for me.
The calendar always displays a 7-day week from Sun-Sat. A re-render is only triggered when the date of the Sunday before start date changes (e.g. the Sunday before March 22nd is March 20th, the Sunday before March 24th is also March 20th, so changing the start date from the 22nd to the 24th will not trigger a re-render)
Also, I realized if they make a posting that does not span the entire week, like wednesday to friday, the shift calendar will still allow you to create shifts for the entire week. It's kind of confusing bc when you input the dates, the format of the date doesn't say what day of the week it is.
Yep, agreed it's confusing, being addressed in #232 :)
@@ -42,7 +43,8 @@ const createStepLabel = ( | |||
const SideNavbar = (steps: SideNavbarStepsType): React.ReactElement => { | |||
const { activeStep, labels } = steps; | |||
return ( | |||
<Steps activeStep={activeStep} orientation="vertical"> | |||
// TODO: remove hardcoded width, investigate text wrapping behaviour | |||
<Steps activeStep={activeStep} orientation="vertical" width="250px"> |
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.
The circular number icon becomes distorted when the text spans multiple lines
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.
This is a temporary fix and does not work for smaller screens as it affects the centering of elements within the Container
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 really good! Thanks for making these changes :) Just a some small deviations from designs and a couple questions.
</Text> | ||
<SideNavBar | ||
activeStep={0} | ||
labels={["Basic Information", "Time Slots", "Review and Post"]} |
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.
The sidenav needs the grey background to match the designs. It's #F3F3F3 in the designs so we may need to ask if that also maps to background.dark
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 asked the designers it's actually background.light
</Button> | ||
<Button onClick={handleNext}>Next</Button> | ||
</HStack> | ||
</VStack> |
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.
Made a ticket to refactor into one page #213
* TODO: implement better solution described here | ||
* https://github.com/fullcalendar/fullcalendar/issues/4684#issuecomment-620787260 | ||
*/} | ||
<div key={startDate}> |
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.
Wait if posting start date is not on a sunday, is it supposed to rerender? Bc it does not for me.
Also, I realized if they make a posting that does not span the entire week, like wednesday to friday, the shift calendar will still allow you to create shifts for the entire week. It's kind of confusing bc when you input the dates, the format of the date doesn't say what day of the week it is.
43a0bdc
to
51ecdcd
Compare
Did a rebase but did not address the side navbar design deviation. It's not quite as straightforward as I thought, having trouble making the the enclosing VStack span the entire height of the container and I'll need to fiddle with the styling a bit more. This issue, along with a couple others are documented in #233 for round 2 of refinement. @LenaNguyen if you don't mind could we go ahead and merge this PR as is? |
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.
👏👏
Ticket link
Closes fullcalendar/fullcalendar-react#138
Implementation description
In addition to completing requirements outlined in the ticket, this PR also...
createShifts
mutation in create posting review pagePlease see commit messages for more details.
Steps to test
What should reviewers focus on?
Checklist