Skip to content

[scheduler-premium] Remove non-functional onPreferencesChange prop from EventTimelinePremium#22777

Merged
rita-codes merged 7 commits into
mui:masterfrom
rita-codes:22739-scheduler-remove-non-functional-onpreferenceschange-prop-from-eventtimelinepremium
Jun 12, 2026
Merged

[scheduler-premium] Remove non-functional onPreferencesChange prop from EventTimelinePremium#22777
rita-codes merged 7 commits into
mui:masterfrom
rita-codes:22739-scheduler-remove-non-functional-onpreferenceschange-prop-from-eventtimelinepremium

Conversation

@rita-codes

@rita-codes rita-codes commented Jun 11, 2026

Copy link
Copy Markdown
Member

Closes #22739

Summary

EventTimelinePremium exposed a public onPreferencesChange prop that was never fired: the Timeline store has no setPreferences method and no preferences-editing UI, so the callback never ran. It was a dead public prop and removing it after the stable release would have been a breaking change.

It also had an inconsistent signature (event: React.UIEvent | Event instead of the eventDetails: SchedulerChangeEventDetails used everywhere else, including the Timeline's own onPresetChange).

Changes

Removed onPreferencesChange from the Timeline's public surface:

  • the prop declaration in EventTimelinePremiumStore.types.ts (EventTimelinePremiumParameters)
  • the extraction in useExtractEventTimelinePremiumParameters.ts (destructuring, memo object, and deps array)
  • the PropTypes entry in EventTimelinePremium.tsx

Regenerated the API docs (pnpm proptypes + pnpm docs:api).

Kept intentionally

  • preferences / defaultPreferences stay — ampm is read in the grid header to format times (12h/24h) and they support controlled usage.
  • onPreferencesChange on the standalone views and EventCalendarPremium is functional and untouched.

If preferences editing is added to the Timeline later, onPreferencesChange should be reintroduced with the standard (preferences, eventDetails: SchedulerChangeEventDetails) => void signature, wired through a setPreferences method mirroring EventCalendarStore.

…TimelinePremium

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
@rita-codes rita-codes self-assigned this Jun 11, 2026
@rita-codes rita-codes added plan: Premium Impact at least one Premium user. 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 Jun 11, 2026
@rita-codes rita-codes changed the title [scheduler] Remove non-functional onPreferencesChange prop from EventTimelinePremium [scheduler-premium] Remove non-functional onPreferencesChange prop from EventTimelinePremium Jun 11, 2026
@code-infra-dashboard

code-infra-dashboard Bot commented Jun 11, 2026

Copy link
Copy Markdown

Deploy preview

Bundle size

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-charts-premium 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%)
@mui/x-license 0B(0.00%) 0B(0.00%)

Details of bundle changes


Check out the code infra dashboard for more information about this PR.

…eferenceschange-prop-from-eventtimelinepremium
@rita-codes
rita-codes requested a review from noraleonte June 11, 2026 15:55
@rita-codes rita-codes changed the title [scheduler-premium] Remove non-functional onPreferencesChange prop from EventTimelinePremium [scheduler-premium] Remove non-functional onPreferencesChange prop from EventTimelinePremium Jun 11, 2026

@noraleonte noraleonte left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Nice cleanup! 🎉 🙏

…eferenceschange-prop-from-eventtimelinepremium
@rita-codes
rita-codes enabled auto-merge (squash) June 12, 2026 09:50
rita-codes and others added 2 commits June 12, 2026 13:53
…eferenceschange-prop-from-eventtimelinepremium
The test hardcoded a 1500px host height assuming a fixed header height.
Without the responsive typography container ancestor, the header renders
at its largest tier (~461px), leaving the body shorter than its 1104px
content, so it overflowed and `data-has-scroll` was set on the first
assertion. Size the host to its content instead so the body never
overflows initially, independent of the header height.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
@rita-codes
rita-codes disabled auto-merge June 12, 2026 12:47
@rita-codes
rita-codes merged commit 9167351 into mui:master Jun 12, 2026
21 checks passed
mbrookes pushed a commit to mbrookes/mui-x that referenced this pull request Jun 27, 2026
…from `EventTimelinePremium` (mui#22777)

Co-authored-by: Claude Opus 4.8 (1M context) <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

plan: Premium Impact at least one Premium user. 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.

[scheduler] Remove non-functional onPreferencesChange prop from EventTimelinePremium

2 participants