dash-core-components icon indicating copy to clipboard operation
dash-core-components copied to clipboard

Use snake_case consistently for prop names

Open alexcjohnson opened this issue 4 years ago • 1 comments

We've developed quite a melange of capitalizations in our prop names. Let's standardize on snake_case for everything in this repo. Our consensus is the only exception to this rule should be when we direct our users to the documentation of the underlying library rather than documenting all the props and their values ourselves. But that doesn't apply to anything in DCC.

Each component should do this in a backward-compatible way: first look for class_name, if that's missing look for className, only if both are missing use the default value. The original case should remain in propTypes, documented with Obsolete: use class_name instead.

Along with this we'll need to address #703 (avoid ramda.omit for forwarding props) because that problem will get much worse as a result.

alexcjohnson avatar Apr 22 '21 23:04 alexcjohnson

Any chance we could get a pre-release with this change ahead of the release of Dash v2? I'm planning to make the same change in dash-bootstrap-components as discussed via DM and it would be helpful for testing. This is in no way urgent, just once it has been worked on is great.

tcbegley avatar Jul 03 '21 18:07 tcbegley