-
Notifications
You must be signed in to change notification settings - Fork 380
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(react-scheduler): redesign AppointmentTooltip #2474
Conversation
FPR |
const Header = withStyles(style, { name: 'Header' })(({ | ||
children, appointmentData, classes, ...restProps | ||
}) => ( | ||
<AppointmentTooltip.Header | ||
{...restProps} | ||
className={classes.header} | ||
> | ||
<span role="img" aria-label="Clock" className={classes.icon}>🕒</span> | ||
<div className={classes.title}> | ||
{appointmentData.title} | ||
</div> | ||
<AppointmentTooltip.Header {...restProps}> | ||
{/* eslint-disable-next-line no-alert */} | ||
<IconButton onClick={() => alert(JSON.stringify(appointmentData))}> | ||
<MoreIcon /> | ||
</IconButton> | ||
</AppointmentTooltip.Header> |
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.
Should we use withStyles here? And why we should not pass appointmentData
property farther?
/** A React node used to render the tooltip header. */ | ||
children?: React.ReactNode; |
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.
A React node used to render the additional part into tooltip header.
FPR |
paddingLeft: spacing(1), | ||
paddingRight: spacing(0.5), | ||
paddingTop: spacing(0.25), | ||
minHeight: spacing(3), |
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.
minHeight: spacing(3)
-> minHeight: spacing(1.5),
// 12 px would be better
FPR |
FPR |
packages/dx-react-scheduler/docs/reference/appointment-tooltip.md
Outdated
Show resolved
Hide resolved
packages/dx-react-scheduler/docs/reference/appointment-tooltip.md
Outdated
Show resolved
Hide resolved
packages/dx-react-scheduler/docs/reference/appointment-tooltip.md
Outdated
Show resolved
Hide resolved
packages/dx-react-scheduler/docs/reference/appointment-tooltip.md
Outdated
Show resolved
Hide resolved
packages/dx-react-scheduler/docs/reference/appointment-tooltip.md
Outdated
Show resolved
Hide resolved
packages/dx-react-scheduler/docs/reference/appointment-tooltip.md
Outdated
Show resolved
Hide resolved
Co-Authored-By: RomanTsukanov <[email protected]>
@@ -64,22 +65,30 @@ showDeleteButton | boolean | Specifies the Delete button's visibility. | |||
commandButtonIds | Array<string> | A command button's identifier list. |
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.
"The command button", if you are talking about a specific button.
onHide?: () => void; | ||
/** A component that renders a command button. */ | ||
commandButtonComponent: React.ComponentType<AppointmentTooltip.CommandButtonProps>; | ||
/** A React node used to render the additional part of the tooltip header. */ |
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.
There's only one additional part? If there can be different parts, use "an additional part".
formatDate: FormatterFn; | ||
/** A component that renders an icon for recurring appointments inside the AppointmentTooltip. */ | ||
recurringIconComponent: React.ComponentType<object>; | ||
/** A React node used to render the additional part of the tooltip content. */ |
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.
Same as the previous comment.
Before:
After:
BREAKING CHANGE:
We have extended the
headerComponent
andcontentComponent
in theAppointmentTooltip
plugin with new properties. If you use these components, add the following properties in your code: