-
Notifications
You must be signed in to change notification settings - Fork 2
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
Update dependency @mui/x-date-pickers to v6 #213
Conversation
04b6b82
to
747afbc
Compare
b27419f
to
5ebeea4
Compare
830ba68
to
8fa49f3
Compare
94c54e9
to
4475461
Compare
4475461
to
2c86210
Compare
2c86210
to
68e0bcc
Compare
We should probably wait for the integration of the new clock component into the DateTimePicker before upgrading to save "upgrading twice" |
bdd50e3
to
5671cd3
Compare
535e381
to
0572fc8
Compare
0572fc8
to
d4995de
Compare
d4995de
to
29c3967
Compare
be7934a
to
63a0fe0
Compare
dfe7f86
to
8f850ec
Compare
Migrating date-pickers from v5 to v6Same as in DG - updated mui DateTime pickers to v6. TestingUpdated unit, e2e and playwright tests as methods like |
size: 'small', | ||
'aria-label': 'from, date-time picker', | ||
slots={{ | ||
textField: CustomTextField, | ||
}} |
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.
Aren't we missing specifying the custom day
?
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.
Yes, this commit (e1f879d) moved the custom day to slots, but missed one in the "from" picker. I'll add it back.
// .clear doesn't work with datepickers in v6 | ||
await user.click(dateFilterFromDate); | ||
await user.keyboard('{Control>}a{/Control}'); | ||
await user.keyboard('{Delete}'); | ||
// await user.clear(dateFilterFromDate); |
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.
This workaround is no longer required - this was fixed in 6.16.0
// For some reason this doesn't work with date pickers v6 | ||
// Commenting out for now |
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.
This fix was originally a work around to ensure that desktop date pickers are used. If this fix is no longer required, then we can remove them
// .clear doesn't work with datepickers in v6 | ||
// cy.findByLabelText('from, date-time input').clear(); |
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.
Again, this workaround may no longer be needed
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.
I've checked and .clear
still doesn't work in cypress e2e tests.
@@ -7,10 +7,11 @@ | |||
"@emotion/cache": "11.11.0", | |||
"@emotion/react": "11.11.1", | |||
"@emotion/styled": "11.11.0", | |||
"@mui/base": "5.0.0-beta.12", |
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.
Why was this added? Maybe we can remove it? Unless it was needed for the patch...
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.
It was added in this commit: 6114409. It seems to be needed for the patch, as the code won't compile without it.
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.
Can we make it so that if a user clicks out of the picker it gets dismissed? This is especially useful in the plotting component, as the size of the picker is huge compared to the default window size and you can't see the accept/ok button. Saying that - the search date pickers don't have the accept/ok button - we should probably unify this
Also need to wait for mui/mui-x#10847 before we merge this
Pickers should close by default when you click away, but for some reason it doesn't work in the plotting component. I used a workaround mentioned here to fix this. I also removed the accept and close buttons from the action bar in the |
textField: CustomTextField, | ||
}} | ||
slotProps={{ | ||
actionBar: { actions: ['clear'] }, |
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.
This picker only has the clear option whereas the to picker has both clear and today options
textField: CustomTextField, | ||
}} | ||
slotProps={{ | ||
actionBar: { actions: ['clear', 'today'] }, |
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.
Again, the to
pickers have clear
and today
whereas the from pickers only have clear
. I know today
(i.e. now) is a less useful option for the from picker, but I think it makes sense for them to match
await user.click(dateFilterFromDate); | ||
await user.keyboard('{Control>}a{/Control}'); | ||
await user.keyboard('{Delete}'); | ||
// await user.clear(dateFilterFromDate); | ||
|
||
await user.click(dateFilterToDate); | ||
await user.keyboard('{Control>}a{/Control}'); | ||
await user.keyboard('{Delete}'); | ||
// await user.clear(dateFilterToDate); |
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.
We can use clear
in unit tests now
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.
I checked and it still doesn't seem to work 🤔
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.
@mui/x-date-pickers
needs to be upgraded to 6.16.0
(or later)
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.
I'm pushing a commit that updates the package and our patch
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.
This might mean we can use the clear
command in e2e tests now as well
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.
After updates, clear
works in unit test, but still not in cypress tests
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.
In fact, the update broke the e2e tests even more
await user.click(dateFilterFromDate); | ||
await user.keyboard('{Control>}a{/Control}'); | ||
await user.keyboard('{Delete}'); | ||
// await user.clear(dateFilterFromDate); | ||
|
||
await user.type(dateFilterToDate, '2023-01-01 00:00'); | ||
await user.click(dateFilterToDate); | ||
await user.keyboard('{Control>}a{/Control}'); | ||
await user.keyboard('{Delete}'); | ||
// await user.clear(dateFilterToDate); |
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.
Can use clear
// .clear doesn't work with datepickers in v6 | ||
await user.click(dateFilterFromDate); | ||
await user.keyboard('{Control>}a{/Control}'); | ||
await user.keyboard('{Delete}'); | ||
// await user.clear(dateFilterFromDate); | ||
await user.type(dateFilterFromDate, '2022-01-02_00:00'); |
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.
Can use clear
47e0bcc
to
0fe7d8f
Compare
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.
LGTM - I'll put an issue in JIRA to track that we need to get our patch merged into the main library at some point
This PR contains the following updates:
5.0.7
->6.11.1
Release Notes
mui/mui-x (@mui/x-date-pickers)
v6.11.1
Compare Source
Aug 11, 2023
We'd like to offer a big thanks to the 8 contributors who made this release possible. Here are some highlights ✨:
@mui/x-tree-view
slot
andslotProps
propsData Grid
@mui/[email protected]
getCellAggregationResult
: Handlenull
rowNode
case (#9915) @romgrk@mui/[email protected]
Same changes as in
@mui/[email protected]
.@mui/[email protected]
Same changes as in
@mui/[email protected]
.Date Pickers
@mui/[email protected]
numeric
inputmode
instead oftel
(#9918) @LukasTyonChange
when selecting a shortcut withchangeImportance="set"
(#9974) @flaviendelanglethemeAugmentation
styleOverrides
(#9978) @LukasTy@mui/[email protected]
Same changes as in
@mui/[email protected]
.Charts /
@mui/[email protected]
styleOverrides
(#9996) @LukasTyslot
/slotProps
for customization (#9744) @alexfauquetteTree View /
@mui/[email protected]
Docs
shouldDisableClock
migration code options (#9920) @LukasTyCore
v6.11.0
Compare Source
Aug 4, 2023
We'd like to offer a big thanks to the 12 contributors who made this release possible. Here are some highlights ✨:
⌚️ Move the tree view component from
@mui/lab
packageThe
<TreeView />
component has been moved to the MUI X repository.It is now accessible from its own package:
@mui/x-tree-view
.🌍 Improve Hebrew (he-IL), Finnish (fi-FI), and Italian (it-IT) locales on the data grid
🐞 Bugfixes
📚 Documentation improvements
Data Grid
@mui/[email protected]
ariaV7
experimental flag (#9496) @cherniavskiiundefined
(#9871) @gitstart@mui/[email protected]
Same changes as in
@mui/[email protected]
.@mui/[email protected]
Same changes as in
@mui/[email protected]
.Date Pickers
@mui/[email protected]
CalendarHeader
slot (#7784) @flaviendelangleInputProps
of theTextField
using theslotProps
(#9849) @flaviendelanglelocaleText
prop on the pickers (#9870) @flaviendelanglesx
andclassName
props onMobileDateRangePicker
(#9853) @flaviendelangle@mui/[email protected]
Same changes as in
@mui/[email protected]
.Charts /
@mui/[email protected]
Tree View /
@mui/[email protected]
Docs
Recommended usage
section (#9892) @flaviendelangleCore
JSX
global namespace (#9854) @flaviendelanglev6.10.2
Compare Source
Jul 27, 2023
We'd like to offer a big thanks to the 13 contributors who made this release possible. Here are some highlights ✨:
Data Grid
@mui/[email protected]
@mui/[email protected]
Same changes as in
@mui/[email protected]
.@mui/[email protected]
Same changes as in
@mui/[email protected]
, plus:Date Pickers
@mui/[email protected]
endOfDate
fromDigitalClock
timeOptions (#9800) @noraleonte@mui/[email protected]
Same changes as in
@mui/[email protected]
.Charts /
@mui/[email protected]
Docs
pnpm
in more places @oliviertassinaripnpm
installation instructions for MUI X (#9707) @richbustosslotProps
docs (#9668) @cherniavskiiCore
v6.10.1
Compare Source
Jul 20, 2023
We'd like to offer a big thanks to the 11 contributors who made this release possible. Here are some highlights ✨:
Data Grid
@mui/[email protected]
eval
(#9635) @romgrkundefined
row error (#9708) @romgrkviewportOuterSize.height
going negative (#9664) @gitstart@mui/[email protected]
Same changes as in
@mui/[email protected]
, plus:@mui/[email protected]
Same changes as in
@mui/[email protected]
.Date Pickers
@mui/[email protected]
format
andvalue
update order (#9715) @LukasTyrequire
usage in comment (#9675) @LukasTy@mui/[email protected]
Same changes as in
@mui/[email protected]
.Charts /
@mui/[email protected]
Docs
CustomSortIcons
demo (#9656) @MBilalShafiCore
validate
command (#9714) @romgrkv6.10.0
Compare Source
Jul 13, 2023
We'd like to offer a big thanks to the 10 contributors who made this release possible. Here are some highlights ✨:
Data Grid
@mui/[email protected]
GridToolbarQuickFilter
component (#9633) @giladappsforcerowExpansionChange
event public (#9611) @MBilalShafi@mui/[email protected]
Same changes as in
@mui/[email protected]
.@mui/[email protected]
Same changes as in
@mui/[email protected]
.Date Pickers
@mui/[email protected]
@mui/[email protected]
Same changes as in
@mui/[email protected]
.Charts /
@mui/[email protected]
Docs
Core
v6.9.2
Compare Source
Jul 6, 2023
We'd like to offer a big thanks to the 11 contributors who made this release possible. Here are some highlights ✨:
🚀 Auto-scroll when making range selection (#8661) @m4theushw
📚 New page: Components lifecycle (#8372) @flaviendelangle
Clarify pickers events and value updates in a single docs page.
🥧 Add pie chart component
They are fresh from the code editor. You can visit pie charts docs or their demo page.
🐞 Bugfixes
📚 Documentation improvements
Data Grid
@mui/[email protected]
RangeError
when using flex columns (#9554) @cherniavskiigetRowId
in filtering (#9564) @romgrkTablePagination
'srowsPerPageOptions
shape topageSizeOptions
(#9438) @burakkgunduzz@mui/[email protected]
Same changes as in
@mui/[email protected]
.@mui/[email protected]
Same changes as in
@mui/[email protected]
, plus:Date Pickers
@mui/[email protected]
internal
folder tointernals
on@mui/x-date-picker-pro
(#9571) @flaviendelangle@mui/[email protected]
Same changes as in
@mui/[email protected]
.Charts /
@mui/[email protected]
Docs
ToggleButtonGroup
(#9548) @flaviendelangleCore
v6.9.1
Compare Source
Jun 30, 2023
We'd like to offer a big thanks to the 13 contributors who made this release possible. Here are some highlights ✨:
Data Grid
@mui/[email protected]
tooltip
andloadingOverlay
slots (#9028) @cherniavskiieditCellState
prop to DOM element (#9501) @m4theushwnextFieldToFocus
to always be a visible column field when Tab key is pressed (#8314) @yaredtsyMaximum call stack size exceeded
error when using fractional width (#9516) @cherniavskii@mui/[email protected]
Same changes as in
@mui/[email protected]
, plus:checkboxSelection
and treeData/grouping (#9418) @romgrk@mui/[email protected]
Same changes as in
@mui/[email protected]
.Date Pickers
@mui/[email protected]
keyDown
only when input is focused (#9481) @LukasTyreferenceDate
prop onTimeClock
,DigitalClock
andMultiSectionDigitalClock
(#9356) @flaviendelangle@mui/[email protected]
Same changes as in
@mui/[email protected]
.Charts /
@mui/[email protected]
Docs
productId
logic (#9451) @oliviertassinari"bg": "inline"
(#9499) @alexfauquetteCore
edit-mode
to priority support action (#9483) @DanailHuses
for priority support action (#9480) @DanailHv6.9.0
Compare Source
Jun 22, 2023
We'd like to offer a big thanks to the 11 contributors who made this release possible. Here are some highlights ✨:
🎁 We released a new open-source package:
@mui/x-charts
. This package aims at simplifying the integration of charts into your dashboards. 📊It already contains line, bar, and scatter charts, with basic customization features. Check out the documentation to see what it can do, and open issues to get the feature you need implemented.
🚀 Introducing UTC and timezone support for pickers.
Visit the documentation to learn how to use it.
🌍 Improve Brazilian Portuguese (pt-BR) on the data grid
🌍 Improve Czech (cs-CZ) locale on the pickers
🚅 Performance improvements
🐞 Bugfixes
📚 Documentation improvements
Data Grid
@mui/[email protected]
getComputedStyle
(#9236) @m4theushw@mui/[email protected]
Same changes as in
@mui/[email protected]
.@mui/[email protected]
Same changes as in
@mui/[email protected]
.Date Pickers
@mui/[email protected]
minutesStep
is respected by fields arrows up/down (#9338) @alexfauquettereferenceValue
changes (#9390) @adrianmxbDateTimePicker
(#9342) @LukasTy@mui/[email protected]
Same changes as in
@mui/[email protected]
.Charts /
@mui/[email protected]
Docs
Core
CHANGELOG.old.md
(#9269) @flaviendelanglev6.8.0
Compare Source
Jun 16, 2023
We'd like to offer a big thanks to the 13 contributors who made this release possible. Here are some highlights ✨:
Data Grid
@mui/[email protected]
overridesResolver
(#9248) @mrmuhammadaliactions
cells in edit mode (#9321) @md250721GridColDef['type']
(#9320) @cherniavskii@mui/[email protected]
Same changes as in
@mui/[email protected]
.@mui/[email protected]
Same changes as in
@mui/[email protected]
.Date Pickers
@mui/[email protected]
referenceDate
prop onDateCalendar
,MonthCalendar
andYearCalendar
(#9260) @flaviendelangle@mui/[email protected]
Same changes as in
@mui/[email protected]
.Docs
Date Calendar
dynamic data demo (#9290) @benzlerCore
Argos
CI step (#9301) @LukasTyCharts
(#9314) @alexfauquettev6.7.0
Compare Source
Jun 9, 2023
We'd like to offer a big thanks to the 12 contributors who made this release possible. Here are some highlights ✨:
🎁 Improve the default
format
prop value on the pickers.Here are a few examples:
🌍 Add Romanian (ro-RO) locale on the pickers
🌍 Improve German (de-DE) locale on the pickers
🌍 Improve Czech (cs-CZ), German (de-DE) and Turkish (tr-TR) locales on the data grid
🚀 Performance improvements
🐞 Bugfixes
📚 Documentation improvements
Data Grid
@mui/[email protected]
@mui/lab
(#9235) @cherniavskiiObject
prototype (#9265) @romgrksortModel
andfilterModel
resetting when columns change (#9239) @alexgonch@mui/[email protected]
Same changes as in
@mui/[email protected]
, plus:@mui/[email protected]
Same changes as in
@mui/[email protected]
, plus:Pickers
@mui/[email protected]
@mui/[email protected]
Same changes as in
@mui/[email protected]
, plus:DateRangePickerDay
props JSDoc (#9191) @stevusDocs
GridFilterPanel
API page (#9180) @cherniavskiiCore
min
/max
over thenice()
method (#9189) @alexfauquetteConfiguration
📅 Schedule: Branch creation - "after 10pm every weekday,before 5am every weekday,every weekend" (UTC), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR has been generated by Mend Renovate. View repository job log here.