Skip to content

[scheduler]Add an option to show/hide the weekends #19053

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

Conversation

rita-codes
Copy link
Member

@rita-codes rita-codes commented Aug 4, 2025

Issue #18367

In this PR:

  • Add a toggle in the setting menu that allow to show / hide the weekends
  • Apply this setting to the week, month and agenda view (should not impact the day view)
  • The new component will be placed inside the HeaderToolbar. Adjust the styles to account for cases where the middle buttons are centered, and when they are aligned to the end (when the ViewSwitcher is not present).
  • Add tests for all the views
  • Add styles following the current ViewSwitcher styles, but this can be adjusted based on @noraleonte 's input

Bonus: 🧹

  • Fixed typo in the demo data
  • Improve AgendaView accessibility

Not in this PR:

  • Allow people to control / initialize this setting
  • Allow people to hide this setting
  • State persistence

Demo with middle buttons centered
https://github.com/user-attachments/assets/98517ffd-6c7c-4a93-a588-809a64de0f54

Demo with the buttons aligned to the end
https://github.com/user-attachments/assets/2a0b98ef-c0de-4a2b-b68c-e39dfc0d592f

@mui-bot
Copy link

mui-bot commented Aug 4, 2025

Deploy preview: https://deploy-preview-19053--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 7138606

@rita-codes rita-codes self-assigned this Aug 4, 2025
@rita-codes rita-codes added type: new feature Introduces a new piece of functionality or capability. scope: scheduler Changes or issues related to the scheduler product labels Aug 4, 2025
Copy link
Contributor

@noraleonte noraleonte left a comment

Choose a reason for hiding this comment

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

Looking good 🎉 Left a small styling suggestion and raised a point that we could discuss 👌

Copy link
Contributor

@noraleonte noraleonte left a comment

Choose a reason for hiding this comment

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

Sorry, I meant to update this icon as well, but I forgot 🙈

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

github-actions bot commented Aug 6, 2025

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 6, 2025
Copy link
Contributor

@noraleonte noraleonte left a comment

Choose a reason for hiding this comment

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

Looking good to me 💙 Thanks for your great work on this!

@rita-codes rita-codes merged commit d726c55 into mui:master Aug 7, 2025
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 or issues related to the scheduler product type: new feature Introduces a new piece of functionality or capability.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[scheduler][styled] Add an option to show/hide the week end
3 participants