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

Switch datepicker to MDC #25573

Closed
wants to merge 3 commits into from
Closed

Conversation

crisbeto
Copy link
Member

@crisbeto crisbeto commented Sep 2, 2022

Switches the Material datepicker to be based on top of the MDC components.

@crisbeto crisbeto added P2 The issue is important to a large percentage of users, with a workaround target: major This PR is targeted for the next major release merge: preserve commits When the PR is merged, a rebase and merge should be performed labels Sep 2, 2022
@angular-robot angular-robot bot added the area: docs Related to the documentation label Sep 2, 2022
@crisbeto crisbeto marked this pull request as ready for review September 2, 2022 16:38
Copy link
Contributor

@mmalerba mmalerba left a comment

Choose a reason for hiding this comment

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

LGTM

@crisbeto crisbeto added the action: merge The PR is ready for merge by the caretaker label Sep 2, 2022
Copy link
Contributor

@mmalerba mmalerba left a comment

Choose a reason for hiding this comment

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

I realized that there's a potential issue with this. If we just switch it to the MDC version, people might not have the appropriate theme in their app.

We'll have to figure out how we want to handle this, here's a few ideas:

  • Split out a legacy-datepicker that retains the legacy deps
  • Have ng update automatically add the button theme when people update to v15
  • Have the datepicker theme mixins @include the button one
  • Have some back-compat mixin that ng update adds and ng generate removes after migrating the button:
    @mixin datepicker-back-compat-theme($theme) {
      .mat-datepicker {
        @include mat.button-theme($theme);
      }
    }
    

@mmalerba mmalerba removed the action: merge The PR is ready for merge by the caretaker label Sep 8, 2022
@crisbeto crisbeto marked this pull request as draft September 15, 2022 14:56
Switches the datepicker to use the MDC button, form field and input.
Switches the datepicker docs and demos to use MDC.
@crisbeto crisbeto force-pushed the datepicker-mdc branch 4 times, most recently from 8016f79 to 5eaf859 Compare September 16, 2022 11:45
@crisbeto crisbeto marked this pull request as ready for review September 16, 2022 11:53
@crisbeto
Copy link
Member Author

This is ready to review again. I've added a material/legacy-datepicker entrypoint with the minimum amount of code necessary to support it.

Adds a legacy version of the datepicker that uses the legacy versions of components internally.
@crisbeto
Copy link
Member Author

Closing in favor of #25648.

@crisbeto crisbeto closed this Sep 19, 2022
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Oct 20, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area: docs Related to the documentation merge: preserve commits When the PR is merged, a rebase and merge should be performed P2 The issue is important to a large percentage of users, with a workaround target: major This PR is targeted for the next major release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants