Skip to content
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

[DatePicker] Migrate to the lab #22692

Merged
merged 2,183 commits into from
Nov 10, 2020
Merged

[DatePicker] Migrate to the lab #22692

merged 2,183 commits into from
Nov 10, 2020

Conversation

dmtrKovalenko
Copy link
Member

@dmtrKovalenko dmtrKovalenko commented Sep 22, 2020

This PR must not be squashed because we will lose all the git history

Edit Olivier: I was aiming to keep all the history of v4, starting with the first commit. However, this has proven to be very challenging to handle (I couldn't figure out how while resolving the merge conflicts). So instead, we have a single commit with Dmitiry as the original author. I think that it's good enough as we will likely still iterate a lot on the logic.

Closes #19706

TODO Olivier:

  • Filter regressions test that is not needed
  • Preliminary TypeScript component infrastructure [lab] Migrate Timeline to TypeScript #23242
  • Add ⚡️ section for date range picker
  • Solve Netlify build performance issue, we have reached the limit of pages we can have. Contacted support, increase limits from 15 to 30 minutes

Capture d’écran 2020-11-04 à 02 10 18

dmtrKovalenko and others added 30 commits February 24, 2020 10:56
Bumps [lint-staged](https://github.com/okonet/lint-staged) from 10.0.7 to 10.0.8.
- [Release notes](https://github.com/okonet/lint-staged/releases)
- [Commits](lint-staged/lint-staged@v10.0.7...v10.0.8)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
* Rename MuiPickersUtilsPorvider => LocalizationProvider

* Improve utils typings

* Implement global format override

* [docs]  Change name of date-io customization page

* Update examples to include new wording

* Fix prop-types typescript error

* Add daetAdapter prop for passing date-io utils directly to component

* Update percy and cypress

* Unskip flaky test

* Fix typo in error message

* Fix cypress test

* One more try to fix flaky test

* Remove flaky test

* Fix visual regression scenarios tests with new version of cypress

* Run cypress tests in chrome

* Ignore dark theme change in snapshots

* Try to fix example styles one more time

* Fix inccorect name of cypress executor

* Try weird hack to reinject styles

* Optimize theme toggling for visual regression

* Update scenario names to get rid of duplications

* Rename `adapter` => `dateAdapter`

* Rename libFormats => dateFormats, libInstance => dateLibInstance

* Remove version-specific code from README.md

* Fix documentation erros in installation guide

* Run prettier on README.md

* Use edge="end" for keyboard adornment icons, closes mui#1545
* Make set today button works properly with autoOk

* Add tests

* Fix autoOK behavior when several views shown
…rial-ui/core-4.9.3

Bump @material-ui/core from 4.8.3 to 4.9.3
Bumps [@material-ui/icons](https://github.com/mui-org/material-ui/tree/HEAD/packages/material-ui-icons) from 3.0.2 to 4.9.1.
- [Release notes](https://github.com/mui-org/material-ui/releases)
- [Changelog](https://github.com/mui-org/material-ui/blob/master/CHANGELOG.md)
- [Commits](https://github.com/mui-org/material-ui/commits/v4.9.1/packages/material-ui-icons)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
Bumps [jest](https://github.com/facebook/jest) from 24.9.0 to 25.1.0.
- [Release notes](https://github.com/facebook/jest/releases)
- [Changelog](https://github.com/facebook/jest/blob/master/CHANGELOG.md)
- [Commits](jestjs/jest@v24.9.0...v25.1.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
Bumps [dayjs](https://github.com/iamkun/dayjs) from 1.8.21 to 1.8.22.
- [Release notes](https://github.com/iamkun/dayjs/releases)
- [Changelog](https://github.com/iamkun/dayjs/blob/v1.8.22/CHANGELOG.md)
- [Commits](iamkun/dayjs@v1.8.21...v1.8.22)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
@eps1lon
Copy link
Member

eps1lon commented Nov 6, 2020

Looks good since I see a lot of commits 👍 Now we just have to hope the git surgery goes smoothly

@mbrookes
Copy link
Member

mbrookes commented Nov 6, 2020

Scalpel. Forceps...

…cee1c6ca'

git-subtree-dir: packages/pickers
git-subtree-mainline: 93414bb
git-subtree-split: 91dcbaf
@eps1lon
Copy link
Member

eps1lon commented Nov 9, 2020

Includes all commits from pickers, one commit from git-subtree-add and one commit for integration squashed the work done in #22692

@github-actions github-actions bot removed the PR: out-of-date The pull request has merge conflicts and can't be merged label Nov 9, 2020
@eps1lon eps1lon marked this pull request as draft November 9, 2020 11:39
Move picker sources into lab (#4)

Update README.md

[DatePicker] Refactor pickers tests to testing-library and mocha (#5)

[TimePicker] Migrate tests to testing library (#8)

[DateTimePicker] Migrate tests  (#9)

Fix all pickers linter errors (#10)

Fix all circular dependencies (#11)

* Fix all circular dependencies

* Enable mocha eslint rules for typescript tests

[test] The last step to a green CI (#15)

Migrate pickers docs (#12)

Downgrade to withStyles for pickers sources (#16)

Add public api exports for pickers components (#17)

Consolidate component namespace and theme augmentation  (#18)

Describe conformance for pickers sub-components (#19)

Autogenerate proptypes for typescript sources  (#20)

Proper build output (#21)

Clear migration artifacts  (#23)

Eslint rule for lower-case test name convention  (#24)

DateRangePicker  (#25)

yarn deduplicate

Remove GridListTile

[DateTimePicker] Fix migration unit tests

Fix types

Fix typescript types migration issues

Fix yarn lerna build (#33)

Fix karma tests

use window.Touch for CI karma tests

Remove more outdated diff noise (#34)

Replace not valid formats with valid ISO strings

Try to fix CI touch tests

Skip tests if Touch events are not supported

Fix merge conflicts

Actually type-check

Fix safari tests

Remove lowercase test name rule

The casing is up to the test author.
We're not the grammar police in tests.

Fix lint

Format

Remove overzealous eslint-disable*

Debug failing tests

Better debugging

Timezones are fun

was isoString th efix?

Let's find out what's failing and then skip it

Branch for safari

Skip DateRangePicker in browsers

review

Matt's review

Co-authored-by: Matt <github@nospam.33m.co>

format

docs:i18n
@eps1lon
Copy link
Member

eps1lon commented Nov 9, 2020

DONT SQUASH AND MERGE THIS

Once this is green and approved I enable merge commits in this repo and merge it with git merge

@oliviertassinari
Copy link
Member

This looks almost good. I think that the only part left is to trim pre v4 git history:

Capture d’écran 2020-11-09 à 15 30 06

The argument in favor of only keep v4: the work on-pre v4 isn't relevant. We have reworked significant parts of the logic and will keep doing so. We don't need to go back in the history. This history can be still found on material-ui-pickers, the repository will be archived and accessible indefinitely.

@eps1lon
Copy link
Member

eps1lon commented Nov 9, 2020

The argument in favor of only keep v4: the work on-pre v4 isn't relevant.

Every git history is relevant. We don't actually want to discuss whether git is relevant. Let's move forward.

@oliviertassinari
Copy link
Member

oliviertassinari commented Nov 9, 2020

@eps1lon Ok, I think that @mbrookes can settle the matter. I think that it would be better by truncating the history, but no strong point of view. So happy to go in the other direction if it gets broader approval.

@eps1lon
Copy link
Member

eps1lon commented Nov 9, 2020

Ok, I think that @mbrookes can settle the matter. I think that it would be better by truncating the history, but no strong point of view.

Could you explain to me what changed in the last few days between me saying I restore the history and now where you're saying we don't need it?

@oliviertassinari
Copy link
Member

oliviertassinari commented Nov 9, 2020

@eps1lon I have tried to mention it a couple of days ago by updating the pull request description:

Capture d’écran 2020-11-09 à 18 45 43

and in #22692 (comment) before we start doing the rebase, I think that it's complementary :). I guess "first commit" was confusing, it was pointing to the first commit of v4.

@mbrookes
Copy link
Member

mbrookes commented Nov 9, 2020

@oliviertassinari I don't see any arguments made against keeping the pre-v4 history, only that keeping even the v4 history was proving challenging. If @eps1lon has solved that (quite how, we may never know! 😄), what's the concern?

@oliviertassinari
Copy link
Member

The argument for only keeping v4 onward (about a year of history) is to avoid to include history that we won't be able to leverage. What's the overhead of storing a large git tree? (time to clone, etc?).

@mbrookes
Copy link
Member

mbrookes commented Nov 9, 2020

What's the overhead of storing a large git tree?

Google seem to manage. Do you have some metrics to demonstrate a problem?

@eps1lon
Copy link
Member

eps1lon commented Nov 10, 2020

(quite how, we may never know! smile)

  1. start with up-to-date next
  2. git-subtree-add
  3. git-cherry-pick each actual "compat commit" from this PR
  4. squash "compat commits"

I thought I could just re-order these compat commits with git-rebase but the visual tool I was using didn't offer that (GitKraken). Moving them via command line sounded too error-prine to me and then I would still have to convert merge commits. Still an interesting exercise but cherry-picking was sufficient here.

@eps1lon
Copy link
Member

eps1lon commented Nov 10, 2020

What's the overhead of storing a large git tree?

Any potential problem that would arise from 2000 new commits we would have in a year anyway.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: date picker This is the name of the generic UI component, not the React module! component: date time picker This is the name of the generic UI component, not the React module! component: time picker This is the name of the generic UI component, not the React module! new feature New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[RFC] Integrate the pickers repository back into the main mono-repository