-
Notifications
You must be signed in to change notification settings - Fork 18
Change to rolling deadline on rfp #687
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
Draft
TylerDiorio
wants to merge
2
commits into
main
Choose a base branch
from
rollingdeadline
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,53 @@ | ||
| 'use client'; | ||
|
|
||
| import { Info } from 'lucide-react'; | ||
| import { Tooltip } from '@/components/ui/Tooltip'; | ||
| import { cn } from '@/utils/styles'; | ||
|
|
||
| interface RollingDeadlineInfoProps { | ||
| className?: string; | ||
| variant?: 'default' | 'compact'; | ||
| iconPosition?: 'left' | 'right'; | ||
| } | ||
|
|
||
| const tooltipContent = ( | ||
| <div className="text-left space-y-1"> | ||
| <p className="text-sm text-gray-700"> | ||
| Applications are reviewed on an ongoing basis and may be funded at any time. | ||
| </p> | ||
| </div> | ||
| ); | ||
|
|
||
| export const RollingDeadlineInfo = ({ | ||
| className, | ||
| variant = 'default', | ||
| iconPosition = 'right', | ||
| }: RollingDeadlineInfoProps) => { | ||
| const isCompact = variant === 'compact'; | ||
| const infoTrigger = ( | ||
| <Tooltip content={tooltipContent} position="top" width="w-72" wrapperClassName="h-auto"> | ||
| <button | ||
| type="button" | ||
| aria-label="Learn more about rolling deadlines" | ||
| onClick={(e) => e.stopPropagation()} | ||
| className="inline-flex items-center justify-center text-gray-400 hover:text-gray-600 transition-colors" | ||
| > | ||
| <Info size={isCompact ? 14 : 16} /> | ||
| </button> | ||
| </Tooltip> | ||
| ); | ||
|
|
||
| return ( | ||
| <div | ||
| className={cn( | ||
| 'inline-flex items-center text-gray-500', | ||
| isCompact ? 'gap-1.5 text-xs' : 'gap-2 text-sm', | ||
| className | ||
| )} | ||
| > | ||
| {iconPosition === 'left' && infoTrigger} | ||
| <span className="whitespace-nowrap">Rolling Deadline</span> | ||
| {iconPosition === 'right' && infoTrigger} | ||
| </div> | ||
| ); | ||
| }; |
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.
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.
Early return hides rolling deadline for grants without endDate
High Severity
When a grant has no
endDate(which is the expected state for a rolling deadline),GrantStatusSectionreturns early showing "Unknown" status with a gray dot, and theRollingDeadlineInfocomponent is never rendered. In contrast,GrantDocumentandGrantInfoboth handle missingendDatecorrectly by treating the grant as active viaendDate ? isDeadlineInFuture(endDate) : true. The sidebar status section is inconsistent and will show the wrong status for rolling deadline grants.Additional Locations (1)
components/work/components/GrantStatusSection.tsx#L41-L42