Skip to content

[scheduler] Add localeText prop to standalone views - #23210

Merged
rita-codes merged 8 commits into
mui:masterfrom
rita-codes:23116-scheduler-standalone-views-do-not-expose-a-localetext-prop
Jul 24, 2026
Merged

rita-codes merged 8 commits into
mui:masterfrom
rita-codes:23116-scheduler-standalone-views-do-not-expose-a-localetext-prop

Conversation

@rita-codes

@rita-codes rita-codes commented Jul 23, 2026 •

Copy link
Copy Markdown
Member

Fixes #23116

All standalone views mounted their styled contexts through the internal EventCalendarProvider, which hardcoded EVENT_CALENDAR_DEFAULT_LOCALE_TEXT, so there was no way to localize them. This PR adds a localeText prop to that shared provider (merging with the defaults, same pattern as EventCalendar) and threads it through all 11 standalone views (7 community + 4 premium), declaring it on each Standalone*ViewProps type with the same JSDoc as EventCalendar.

Standalone views now also resolve theme default props via useThemeProps with the shared 'MuiEventCalendar' key (same key sharing as EventCalendarPremium and the Data Grid family), so locale packs applied through the theme (createTheme({}, esES)) reach them too, with the localeText prop taking precedence over the theme.

Added unit tests for StandaloneWeekView and StandaloneWeekViewPremium covering the prop, the theme mechanism, and prop-over-theme precedence. PropTypes and API docs regenerated — note the 3 compact views are intentionally excluded from generation by the pre-existing COMPONENTS_WITHOUT_PROPTYPES list, so only the 8 public views got propTypes/docs entries. The themeDefaultProps conformance test stays skipped for standalone views: their wrapper elements don't forward arbitrary props to container.firstChild, so the assertion can't apply structurally — theme resolution is covered by the new unit tests instead.

rita-codes and others added 4 commits July 23, 2026 18:36
Threads the localeText prop through StandaloneDayView, StandaloneMonthView,
StandaloneAgendaView, StandaloneCompactDayView, StandaloneCompactThreeDayView,
and StandaloneCompactWeekView, following the pattern established for
StandaloneWeekView, so these standalone views can be localized.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DTQDtignuUE3UECjCEHozo
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DTQDtignuUE3UECjCEHozo
Regenerates the propTypes blocks and API docs JSON/translations for the
standalone views affected by the new `localeText` prop added in the
preceding commits, and applies a prettier fix to EventCalendarProvider.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DTQDtignuUE3UECjCEHozo
@rita-codes rita-codes self-assigned this Jul 23, 2026
@rita-codes rita-codes added type: bug It doesn't behave as expected. scope: scheduler Changes related to the scheduler. labels Jul 23, 2026
@code-infra-dashboard

code-infra-dashboard Bot commented Jul 23, 2026 •

Copy link
Copy Markdown

Deploy preview

https://deploy-preview-23210--material-ui-x.netlify.app/
QR code for https://deploy-preview-23210--material-ui-x.netlify.app/

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-scheduler 🔺+711B(+0.20%) 🔺+122B(+0.13%)
@mui/x-scheduler-premium 🔺+432B(+0.09%) 🔺+5B(0.00%)
@mui/x-chat 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.

rita-codes and others added 2 commits July 23, 2026 19:22
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DTQDtignuUE3UECjCEHozo
…text-prop' of github.com:rita-codes/mui-x into 23116-scheduler-standalone-views-do-not-expose-a-localetext-prop

@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.

LGTM 🎉

@rita-codes
rita-codes merged commit f38b87d into mui:master Jul 24, 2026
22 checks passed
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: bug It doesn't behave as expected.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[scheduler] Standalone views do not expose a localeText prop

2 participants