question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Renaming Material UI base form controls

See original GitHub issue

I am going to rename components in vulcan-ui-material/lib/components/forms/base-controls/ because their names conflict with the style sheet names (used for Global theme overrides) of some core MUI components - for example MuiInput.

These components are actually not registered with registerComponent, only exported. This would be a breaking change for anyone who has built custom components based on them using import (our codebase at Etail21 has 6 such instances, for example).

Here are the proposed changes:

  • MuiCheckbox => CheckboxBase
  • MuiCheckboxGroup => CheckboxGroupBase
  • MuiFormControl => FormControlBase
  • MuiFormHelper => FormHelper
  • MuiInput => InputBase
  • MuiPicker => PickerBase
  • MuiRadioGroup => RadioGroupBase
  • MuiRequiredIndicator => RequiredIndicator
  • MuiSelect => SelectBase
  • MuiSuggest => SuggestBase
  • MuiText => TextBase

Please let me know if you agree with this change or if you would like to suggest an alternative. Thanks!

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:1
  • Comments:12 (12 by maintainers)

github_iconTop GitHub Comments

1reaction
ErikDakodacommented, Nov 6, 2020

@eric-burel It is a good idea to test new and more efficient patterns for Vulcan, and once a workable solution is implemented, tested and documented, to roll it out to the community. In the meantime, though, we have existing apps with tens of thousands of lines of code using current patterns that drew us to Vulcan in the first place. I think it’s legitimate to make improvements to existing code using those older patterns.

I am only suggesting adding registerComponent for these components at all because I will be touching the code anyway and these are the only components in the entire vulcan:ui-material that don’t use that pattern.

I don’t think that contradicts possibly moving away from registerComponent in the future.

0reactions
ErikDakodacommented, Jan 23, 2021

This was implemented in PRs #2665 and #2666

Read more comments on GitHub >

github_iconTop Results From Across the Web

FormControl API - Material UI - MUI
The name MuiFormControl can be used when providing default props or style overrides in the theme. Props. Props of the native component are...
Read more >
How to Design a Perfect React Material UI Form - YouTube
The complete guide on designing Material UI Form.As you know form is an important un-avoidable element in any website for user interaction.
Read more >
Material-ui Autocomplete warning The value provided to ...
I feel that I have more control over my component. I can control what data field will be submitted without depending on a...
Read more >
React Form using Formik, Material-UI and Yup.
What we have done here is create a simple form with four fields (Name, Email, Password and Confirm password) and a Button with...
Read more >
material-ui/CHANGELOG.md at master · mui/material-ui - GitHub
@mnajdova added motion and shape design tokens to Material You package (#35384 and #35393). ... [base] components -> slots API rename (#34693) @michaldudak....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found