-
Notifications
You must be signed in to change notification settings - Fork 78
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
feat(datetimepicker): new DateTimePicker component #1072
Conversation
Deploy preview for carbon-addons-iot-react ready! Built with commit a6cde9a https://deploy-preview-1072--carbon-addons-iot-react.netlify.app |
@enricoberti this is looking great! I did see one small bug. If you click on your start and end date for custom range. Then click on any date under the selected. It will start to increment the end date by months. Also if you click cancel and then try to go back in the calendar selections are still there and not cleared. |
@enricoberti Looking great! A few scenarios to consider checking that will cause problems that Graphite has had to fix for the Dropdown component:
|
thanks @davidicus and @JordanWSmith15, valid feedback! fixing the issues now |
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 was very good. Lots of globalization issues to address.
I did notice a couple of things...
- when entering times there is no validation there... I can enter abcd and doesn't care.
- I did have a couple of dates that didn't fit in the from -> to header and it just bleeded into the icons... these need to be ellipsised
- I could not really figure out how the ranging worked. What I tried originally was just to click and drag to select a rang but that didn't work. Does the PAL talk about what the expectations are here for selecting ranges. I could never really figure out how to set the start and end. It seemed like one date was always fixed, so every click would create a range to the point or from the point. It could be the sample I was using, not sure.
thank you for the feedback @stuckless ! i pushed a few 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.
In addition to these comments,
- I don't see a new snapshot being added for this component. Even though it's under
experimental
, I think we still generate snaps for those components? - The component needs to be added to the central entrypoint index.js as well
- The
publicAPI
snapshot should update to include the new component - The storybook welcome story snapshot, the exports table should be modified to include the new export.
- The
/* | ||
{ | ||
kind: String // the type of selection, one of PICKER_KINDS (PRESET, RELATIVE, ABSOLUTE) | ||
preset: { | ||
label: String // the label of the selected preset | ||
offset: Number // the offset in minute | ||
}, | ||
relative: { | ||
start: Date // the start point in time | ||
end: Date // the end point in time | ||
lastNumber: Number // quantity of interval | ||
lastInterval: String // one of INTERVAL_VALUES | ||
relativeToWhen: String // one of RELATIVE_VALUES, indicates to what point in time the selection is relative to | ||
relativeToTime: String // in the HH:MM format | ||
}, | ||
absolute: { | ||
start: Date // the start point in time | ||
end: Date // the end point in time | ||
startDate: String // start date in the mask or default format | ||
startTime: String // in the HH:MM format | ||
endDate: // end date in the mask or default format | ||
endTime: String // in the HH:MM format | ||
}, | ||
} */ |
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 documentation is prone to being outdated as the component changes. Instead, this object should be logged out in the action logger within storybook when the callback is called.
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.
If it is already being logged out in the action panel, we can delete that code comment section
transition: background-color $duration--fast-01 carbon--motion(standard); | ||
.#{$iot-prefix}--date-time-picker__field { | ||
background: none; | ||
-webkit-appearance: none; |
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 just noticed that were are using vender prefixes here and there are few places were we should be using tokens and rems. I have opened a new issue to track this as to not hold up this component. #1114
Enrico has pushed requested changes.
🎉 This PR is included in version 2.70.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Closes #854 closes #1114
Summary
Change List (commits, features, bugs, etc)
Acceptance Test (how to verify the PR)