Skip to content
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 DateTimePicker #2391

Merged
merged 18 commits into from
Dec 4, 2024
Merged

Add DateTimePicker #2391

merged 18 commits into from
Dec 4, 2024

Conversation

bryancunningham-okta
Copy link
Contributor

@bryancunningham-okta bryancunningham-okta commented Oct 21, 2024

DES-6573

Summary

  • Adds a new DateTimePicker component

Testing & Screenshots

  • I have confirmed this change with my designer and the Odyssey Design Team.

@bryancunningham-okta bryancunningham-okta marked this pull request as ready for review October 21, 2024 17:51
@bryancunningham-okta bryancunningham-okta requested a review from a team as a code owner October 21, 2024 17:51
Comment on lines 219 to 223
const slots = useMemo<DatePickerSlots<DateTime>>(
() => ({
actionBar: MemoizedActionBar,
actionBar: DateFieldActionBar,
field: (muiProps) => renderDateField(muiProps),
leftArrowIcon: () => <ArrowLeftIcon />,
rightArrowIcon: () => <ArrowRightIcon />,
switchViewIcon: () => <ChevronDownIcon />,
leftArrowIcon: () => <commonIcons.ArrowLeftIcon />,
rightArrowIcon: () => <commonIcons.ArrowRightIcon />,
switchViewIcon: () => <commonIcons.ChevronDownIcon />,
}),
[renderDateField],
[commonIcons, renderDateField],
);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why are we loading the icons like this? Are we taking them in as props or something?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

They are being returned from the hook in an object called commonIcons Rather than importing them into every date picker variation manually

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bryancunningham-okta bryancunningham-okta force-pushed the bc-datetime-picker branch 3 times, most recently from 9544f65 to e4255fb Compare November 13, 2024 15:37

const theme: ThemeOptions = {
components: {
// MuiClock: {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should remove these commented-out portions before merging

color: theme.typography.body1.color,

"& + &": {
marginInlineStart: theme.spacing(2),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I appreciate how consistent you are with using logical properties 👏

@bryancunningham-okta bryancunningham-okta dismissed jordankoschei-okta’s stale review December 4, 2024 18:21

The merge-base changed after approval.

@oktapp-aperture-okta oktapp-aperture-okta bot merged commit 8fbca55 into main Dec 4, 2024
1 check passed
@oktapp-aperture-okta oktapp-aperture-okta bot deleted the bc-datetime-picker branch December 4, 2024 19:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants