-
Notifications
You must be signed in to change notification settings - Fork 1
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
Add custom input fields for editing metadata #354
base: feature/metadata-editing/develop
Are you sure you want to change the base?
Add custom input fields for editing metadata #354
Conversation
@aswallace Great work! Just 3 feedback notes:
Thanks for sharing! |
Thank you @lynwilhelm! Addressed feedback in f13faee and updated screenshots to reflect changes |
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 UI looks so nice!
packages/core/components/EditMetadata/MetadataDetails.module.css
Outdated
Show resolved
Hide resolved
packages/core/components/NumberRangePicker/NumberField.module.css
Outdated
Show resolved
Hide resolved
|
||
return display.trim(); | ||
}, | ||
|
||
valueOf(value: any) { | ||
const RANGE_OPERATOR_REGEX = /([0-9]+)D ([0-9]+)H ([0-9]+)M ([0-9]*\.?[0-9]+)S/g; | ||
const exec = RANGE_OPERATOR_REGEX.exec(value); |
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.
Maybe something like matches
is more clear than exec
?
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.
fixed in 43ddfec
861e40b
to
fd404ae
Compare
761fa46
to
43ddfec
Compare
className={styles.inputField} | ||
id="durationDays" | ||
label="Days" | ||
onChange={(event) => setDurationDays(event?.target?.value || "")} |
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.
Seems like this component could exclusively pass around Number
type values (for cases with leading zeroes it would just not yet return a value AKA undefined
); NBD to keep this though
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 agree in theory, but running into some implementation bugs
const inputField = () => { | ||
switch (props.fieldType) { | ||
case AnnotationType.DATE: | ||
case AnnotationType.DATETIME: |
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.
Is there no time selector for DATETIME
types or is there always a time selector for DATE
types? Either of those would be bad no?
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.
Unfortunately yes, the date picker does not provide a time selector & defaults to (I think) 8am PT. This issue also exists in the AnnotationFilterForm.
edit: I just found a timepicker component in fluent, so I'll see about adding that in
edit2: it's super buggy, if I can't come up with an alternative by eod I'll open a ticket
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.
added in 9328a44
Co-authored-by: Sean LeRoy <[email protected]>
Co-authored-by: Sean LeRoy <[email protected]>
This is a follow-up to #338 that adds custom fields for different data types based on the Figma designs.
closes #340
Description
The input type switch is modeled off the way we did it in AnnotationFilterForm and re-uses some of the same components.
Screenshots
Duration
Boolean
Date
DateTIme
Dropdown
Number
Text/Default