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

[docs] Apply the new DX to the Button Field demos #14860

Merged

Conversation

flaviendelangle
Copy link
Member

@flaviendelangle flaviendelangle commented Oct 7, 2024

Part of #14496

Doc preview

Packages

  • Introduce DateRangePickerFieldProps and DateTimeRangePickerFieldProps
  • Make sure every picker passes a format to the field, the date range ones did not (the useDesktopPicker and equivalent hooks to not enforce it yet because it was non trivial, once we have more info passed through the context it should be easier to enforce this kind of things, right now the typing is super hard to modify without introducing TS errors).

Docs

  • Move each category of custom behavior demo in a folder to make the "custom-field" folder more readable
  • Add validation support on the demos
  • Add placeholder support on the demos
  • Stop relying on complex types and instead use the new DatePickerFieldProps pattern
  • Pass the forwarded props to the Button to support sx, className etc...
  • Improve the phrasing in the impacted doc section

I did not migrate those demo to use the new multi file demo feature because it is broken when used inside nested folder.

michelengelen and others added 3 commits April 3, 2024 15:34
Signed-off-by: Michel Engelen <32863416+michelengelen@users.noreply.github.com>
Co-authored-by: Olivier Tassinari <olivier.tassinari@gmail.com>
Signed-off-by: Gene Arch <genepaularch@gmail.com>
Co-authored-by: Rom Grk <romgrk.cc@gmail.com>
@flaviendelangle flaviendelangle added docs Improvements or additions to the documentation component: pickers This is the name of the generic UI component, not the React module! labels Oct 7, 2024
@flaviendelangle flaviendelangle self-assigned this Oct 7, 2024
@mui-bot
Copy link

mui-bot commented Oct 7, 2024

@flaviendelangle flaviendelangle force-pushed the refacto-button-custom-field branch from f27b6cd to f43bd0c Compare October 17, 2024 08:09
@flaviendelangle flaviendelangle changed the title [docs] Refactor the button custom field example [docs] Apply new DX to the "ButtonField" demos Oct 17, 2024
@flaviendelangle flaviendelangle changed the title [docs] Apply new DX to the "ButtonField" demos [docs] Apply new DX to the Button Field demos Oct 17, 2024
@flaviendelangle flaviendelangle changed the title [docs] Apply new DX to the Button Field demos [docs] Apply the new DX to the Button Field demos Oct 17, 2024
Copy link

This pull request has conflicts, please resolve those before we can evaluate the pull request.

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

@LukasTy LukasTy left a comment

Choose a reason for hiding this comment

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

Nice improvement over the existing approach, great work! 💙 👏

flaviendelangle and others added 10 commits October 28, 2024 16:04
Co-authored-by: Lukas Tyla <llukas.tyla@gmail.com>
Signed-off-by: Flavien DELANGLE <flaviendelangle@gmail.com>
Co-authored-by: Lukas Tyla <llukas.tyla@gmail.com>
Signed-off-by: Flavien DELANGLE <flaviendelangle@gmail.com>
…ngePicker.types.ts

Co-authored-by: Lukas Tyla <llukas.tyla@gmail.com>
Signed-off-by: Flavien DELANGLE <flaviendelangle@gmail.com>
…r.types.ts

Co-authored-by: Lukas Tyla <llukas.tyla@gmail.com>
Signed-off-by: Flavien DELANGLE <flaviendelangle@gmail.com>
…teRangePicker.tsx

Co-authored-by: Lukas Tyla <llukas.tyla@gmail.com>
Signed-off-by: Flavien DELANGLE <flaviendelangle@gmail.com>
Co-authored-by: Lukas Tyla <llukas.tyla@gmail.com>
Signed-off-by: Flavien DELANGLE <flaviendelangle@gmail.com>
Copy link
Contributor

@mapache-salvaje mapache-salvaje left a comment

Choose a reason for hiding this comment

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

One last nitpick here but otherwise the doc changes look good. 👍

Copy link

This pull request has conflicts, please resolve those before we can evaluate the pull request.

@github-actions github-actions bot added the PR: out-of-date The pull request has merge conflicts and can't be merged label Oct 28, 2024
@github-actions github-actions bot removed the PR: out-of-date The pull request has merge conflicts and can't be merged label Oct 28, 2024
flaviendelangle and others added 3 commits October 29, 2024 10:25
Co-authored-by: Sycamore <71297412+samuelsycamore@users.noreply.github.com>
Signed-off-by: Flavien DELANGLE <flaviendelangle@gmail.com>
@flaviendelangle flaviendelangle merged commit bde9466 into mui:master Oct 29, 2024
18 checks passed
@flaviendelangle flaviendelangle deleted the refacto-button-custom-field branch October 29, 2024 12:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: pickers This is the name of the generic UI component, not the React module! docs Improvements or additions to the documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants