Skip to content

Conversation

flaviendelangle
Copy link
Member

@flaviendelangle flaviendelangle commented Aug 25, 2025

Extracted from #18973

  • Add a store to the Time Grid to avoid re-rendering non-impacted component when moving the placeholder around
  • Add reference stable method to the Time Grid Column and Time Grid Event parts for handling drag and drop instead of passing non stable data
  • Base the drag and drop on the point in time of the cursor rather than the position in pixels (it scales a lot better with the day grid)
  • Replace TimeGrid.useColumnPlaceholder with TimeGrid.usePlaceholderInRange to support columns that are not exactly one day long and to do the same on the Day Grid equivalent
  • Extract the JSX of a single column in the <DayTimeGrid /> component into a standalone <TimeGridColumn /> component (makes the placeholder management cleaner).

@flaviendelangle flaviendelangle self-assigned this Aug 25, 2025
@flaviendelangle flaviendelangle added type: enhancement It’s an improvement, but we can’t make up our mind whether it's a bug fix or a new feature. scope: scheduler Changes related to the scheduler. labels Aug 25, 2025
@mui-bot
Copy link

mui-bot commented Aug 25, 2025

Deploy preview: https://deploy-preview-19326--material-ui-x.netlify.app/

Bundle size report

Bundle Parsed size Gzip size
@mui/x-data-grid 0B(0.00%) 0B(0.00%)
@mui/x-data-grid-pro 0B(0.00%) 0B(0.00%)
@mui/x-data-grid-premium 0B(0.00%) 0B(0.00%)
@mui/x-charts 0B(0.00%) 0B(0.00%)
@mui/x-charts-pro 0B(0.00%) 0B(0.00%)
@mui/x-date-pickers 0B(0.00%) 0B(0.00%)
@mui/x-date-pickers-pro 0B(0.00%) 0B(0.00%)
@mui/x-tree-view 0B(0.00%) 0B(0.00%)
@mui/x-tree-view-pro 0B(0.00%) 0B(0.00%)

Details of bundle changes

Generated by 🚫 dangerJS against 7aeac60

@flaviendelangle flaviendelangle marked this pull request as ready for review August 25, 2025 12:14
@rita-codes
Copy link
Member

rita-codes commented Aug 25, 2025

I think I've found a bug 👀. I've tried the same thing in production, and it works well there.
It happens when I try to shrink an event that was previously expanded, here is a video:

Screen.Recording.2025-08-25.at.17.40.28.mov

@flaviendelangle
Copy link
Member Author

Nice catch, fixed 🙏 @rita-codes

@rita-codes
Copy link
Member

@flaviendelangle Not sure if this is related to the latest fix or my changes blocking the dragging for recurring events, but as you can see in the video everything works perfectly for most of the events but if I try to drag the "Design review Scheduler" is not working, are we blocking drag & drop for anything other than recurring events? 🤔

Screen.Recording.2025-08-28.at.10.37.42.mov

@github-actions github-actions bot added the PR: out-of-date The pull request has merge conflicts and can't be merged. label Aug 28, 2025
Copy link

This pull request has conflicts, please resolve those before we can evaluate the pull request.

@github-actions github-actions bot removed the PR: out-of-date The pull request has merge conflicts and can't be merged. label Aug 28, 2025
@flaviendelangle
Copy link
Member Author

@rita-codes as discussed during our meeting, this event is read only 👍

Copy link
Member

@rita-codes rita-codes left a comment

Choose a reason for hiding this comment

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

Left a couple of small comments

Super nice improvement, great job! 🤩

I've created a new issue for the “duplication” of the event when dropping quickly, since I think it’s not related to this refactor + added some items to the tests issue that I think could make sense to cover the drag & drop

:shipit:

@flaviendelangle flaviendelangle merged commit 0c210cf into mui:master Aug 29, 2025
21 checks passed
@flaviendelangle flaviendelangle deleted the time-grid-dnd-rework branch August 29, 2025 10:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
scope: scheduler Changes related to the scheduler. type: enhancement It’s an improvement, but we can’t make up our mind whether it's a bug fix or a new feature.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants