-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Convert RecurringSchedulePicker.jsx
-> RecurringSchedulePicker.tsx
#3396
Merged
jfdoming
merged 3 commits into
actualbudget:master
from
jfdoming:jfdoming/schedule-picker-types
Sep 8, 2024
Merged
Changes from all commits
Commits
Show all changes
3 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 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 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 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 |
---|---|---|
|
@@ -172,6 +172,7 @@ function defaultShouldSaveFromKey(e) { | |
} | ||
|
||
type DateSelectProps = { | ||
id?: string; | ||
containerProps?: ComponentProps<typeof View>; | ||
inputProps?: ComponentProps<typeof Input>; | ||
value: string; | ||
|
@@ -188,6 +189,7 @@ type DateSelectProps = { | |
}; | ||
|
||
export function DateSelect({ | ||
id, | ||
containerProps, | ||
inputProps, | ||
value: defaultValue, | ||
|
@@ -344,6 +346,7 @@ export function DateSelect({ | |
return ( | ||
<View {...containerProps}> | ||
<Input | ||
id={id} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same Q here |
||
focused={focused} | ||
{...inputProps} | ||
inputRef={inputRef} | ||
|
This file contains 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 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 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,6 @@ | ||
--- | ||
category: Maintenance | ||
authors: [jfdoming] | ||
--- | ||
|
||
Convert `RecurringSchedulePicker.jsx` -> `RecurringSchedulePicker.tsx` |
Oops, something went wrong.
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.
❓ question: why do we need an
id
on the buttons? And what does it do?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.
It's used for the
htmlFor
attributes that were pre-existing inRecurringSchedulePicker
. Theid
attribute was actually being passed as a prop but the labels weren't being correctly associated with the fields sinceSelect
didn't actually accept that prop. I suppose you can consider this an additional bugfix caught by static typing since they were supposed to be associated?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.
Ah.. ok, that makes sense for input fields. But not so much for buttons I think.
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.
Which element should we put it on here? The
htmlFor
is supposed to be for an input element, but the "input" in this case is theSelect
.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.
🤦 ignore my previous comment. I'm reviewing too many things in parallel.
--
It makes sense to put it on the
Button
here since the general element isSelect
and the button is used for opening the select popover.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.
no worries!