feat(web): replace datetime inputs with date range picker in assignment edit view#325
Conversation
Contributor
Author
|
Warning This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
This stack of pull requests is managed by Graphite. Learn more about stacking. |
Greptile SummaryThis PR replaces the two separate
Confidence Score: 4/5
Important Files Changed
Prompt To Fix All With AIThis is a comment left during a code review.
Path: apps/nextjs/src/components/date-picker-with-range.tsx
Line: 27
Comment:
**`wide` mode loses mobile responsiveness**
The old code used `md:grid-cols-2`, so on small screens the two time inputs stacked vertically. With the new `size` prop, `wide` maps to `"grid-cols-2"` (no breakpoint), making the layout always two columns regardless of screen size. This is a regression for users of the default `wide` variant (e.g., `apps/nextjs/src/app/teacher/classroom/[id]/assignment/new/page.tsx`).
```suggestion
const gridCols = size === "narrow" ? "grid-cols-1" : "md:grid-cols-2";
```
**Rule Used:** Use 'md:' prefix for desktop breakpoints in Tailwi... ([source](https://app.greptile.com/review/custom-context?memory=9f03315b-fdba-4890-b797-0f3e3ac5baf2))
**Learnt From**
[deltahacks/landing-12#17](https://github.com/deltahacks/landing-12/pull/17)
How can I resolve this? If you propose a fix, please make it concise.
---
This is a comment left during a code review.
Path: apps/nextjs/src/components/date-picker-with-range.tsx
Line: 22
Comment:
**Unused `label` prop in interface**
`label?: string` is declared in the props interface but never referenced inside the component — the label text is hardcoded as `"Availability Period"`. This dead declaration should be removed to avoid confusion.
```suggestion
```
How can I resolve this? If you propose a fix, please make it concise.Reviews (1): Last reviewed commit: "refactor(web): replace datetime inputs w..." | Re-trigger Greptile |
2bb4ec4 to
e68763d
Compare
c598566 to
da3cc44
Compare
e68763d to
799d2df
Compare
da3cc44 to
d2252d8
Compare
d2252d8 to
aee6314
Compare
799d2df to
ae75e40
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

TL;DR
Replaced separate datetime-local inputs with a unified date range picker component for assignment release and due dates.
What changed?
view mode remains the same:

DatePickerWithRangecomponent for date selectionDateRangeobject instead of separate date stringsformatDateForInpututility functionDatePickerWithRangecomponent with asizeprop to support narrow layoutsHow to test?
Why make this change?
This change provides a more intuitive and consistent user experience for date selection by replacing separate datetime inputs with a visual calendar interface. The unified date range picker makes it clearer that users are selecting a period with start and end dates, reducing potential confusion and input errors.
solves #266