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

Prop Deprecation #247

Merged
merged 7 commits into from
Mar 1, 2023
Merged

Prop Deprecation #247

merged 7 commits into from
Mar 1, 2023

Conversation

csandman
Copy link
Owner

@csandman csandman commented Feb 27, 2023

  • Add @deprecation flags to both the original styles and theme props to help prevent people from using them by mistake.
    • Unfortunately, these props are not flagged when you attempt to pass them into the component, but at least the @deprecated label shows up when you hover over the prop.
  • Change the prop selectedOptionColor to selectedOptionColorScheme to prevent confusion.
    • The selectedOptionColor prop will still function for the time being, but will be removed in the next major version
  • Remove the documentation for hasStickyGroupHeaders and isFixed as a soft deprecation. They still function for now, but will probably be removed eventually (unless people start complaining).
    • These props were added very early on in this package's development, mostly as a way to try some things myself. Ultimately, they don't make much sense in the scope of other props, and these same customizations can be done from the user's side with custom components and chakraStyles.

@codesandbox-ci
Copy link

codesandbox-ci bot commented Feb 27, 2023

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit 02c1706:

Sandbox Source
chakra-react-select demo Configuration
chakra-react-select TS demo Configuration
chakra-react-select + next.js Configuration
chakra-react-select + next.js + typescript Configuration

@github-actions
Copy link

github-actions bot commented Feb 27, 2023

📊 Package size report   0.2%↑

File Before After
dist/cjs/chakra-components/menu.js 11.7 kB 0.2%↑11.8 kB
dist/cjs/chakra-components/menu.js.map 22.8 kB 0.1%↑22.8 kB
dist/cjs/module-augmentation.js.map 9.7 kB 5%↑10.2 kB
dist/cjs/use-chakra-select-props.js 5.1 kB -3%↓5.0 kB
dist/cjs/use-chakra-select-props.js.map 7.9 kB 0.2%↑7.9 kB
dist/esm/chakra-components/menu.js 10.8 kB 0.2%↑10.8 kB
dist/esm/chakra-components/menu.js.map 21.7 kB 0.1%↑21.7 kB
dist/esm/module-augmentation.js.map 9.7 kB 5%↑10.2 kB
dist/esm/use-chakra-select-props.js 4.9 kB -3.16%↓4.7 kB
dist/esm/use-chakra-select-props.js.map 6.8 kB 0.2%↑6.8 kB
dist/types/module-augmentation.d.ts 9.9 kB 6%↑10.5 kB
dist/types/module-augmentation.d.ts.map 2.0 kB 9%↑2.2 kB
dist/types/use-chakra-select-props.d.ts 613 B 0.7%↑617 B
README.md 46.4 kB -1.08%↓45.9 kB
Total (Includes all files) 431.1 kB 0.2%↑432.1 kB
Tarball size 72.6 kB 0.2%↑72.8 kB
Unchanged files
File Size
dist/cjs/chakra-components/containers.js 4.1 kB
dist/cjs/chakra-components/containers.js.map 8.2 kB
dist/cjs/chakra-components/control.js 10.0 kB
dist/cjs/chakra-components/control.js.map 18.7 kB
dist/cjs/chakra-components/index.js 2.8 kB
dist/cjs/chakra-components/index.js.map 3.8 kB
dist/cjs/chakra-components/input.js 3.5 kB
dist/cjs/chakra-components/input.js.map 6.5 kB
dist/cjs/chakra-components/multi-value.js 6.4 kB
dist/cjs/chakra-components/multi-value.js.map 13.1 kB
dist/cjs/chakra-components/placeholder.js 1.7 kB
dist/cjs/chakra-components/placeholder.js.map 3.2 kB
dist/cjs/chakra-components/single-value.js 1.5 kB
dist/cjs/chakra-components/single-value.js.map 3.0 kB
dist/cjs/index.js 2.0 kB
dist/cjs/index.js.map 2.9 kB
dist/cjs/module-augmentation.js 61 B
dist/cjs/select/async-creatable-select.js 2.3 kB
dist/cjs/select/async-creatable-select.js.map 3.8 kB
dist/cjs/select/async-select.js 2.2 kB
dist/cjs/select/async-select.js.map 3.6 kB
dist/cjs/select/creatable-select.js 2.3 kB
dist/cjs/select/creatable-select.js.map 3.7 kB
dist/cjs/select/select.js 2.2 kB
dist/cjs/select/select.js.map 3.5 kB
dist/cjs/types.js 47 B
dist/cjs/types.js.map 3.6 kB
dist/cjs/utils.js 3.1 kB
dist/cjs/utils.js.map 5.6 kB
dist/esm/chakra-components/containers.js 3.6 kB
dist/esm/chakra-components/containers.js.map 7.4 kB
dist/esm/chakra-components/control.js 9.2 kB
dist/esm/chakra-components/control.js.map 17.3 kB
dist/esm/chakra-components/index.js 1.3 kB
dist/esm/chakra-components/index.js.map 2.5 kB
dist/esm/chakra-components/input.js 3.2 kB
dist/esm/chakra-components/input.js.map 5.4 kB
dist/esm/chakra-components/multi-value.js 5.9 kB
dist/esm/chakra-components/multi-value.js.map 12.3 kB
dist/esm/chakra-components/placeholder.js 1.4 kB
dist/esm/chakra-components/placeholder.js.map 2.5 kB
dist/esm/chakra-components/single-value.js 1.2 kB
dist/esm/chakra-components/single-value.js.map 2.3 kB
dist/esm/index.js 687 B
dist/esm/index.js.map 1.9 kB
dist/esm/module-augmentation.js 58 B
dist/esm/select/async-creatable-select.js 856 B
dist/esm/select/async-creatable-select.js.map 1.9 kB
dist/esm/select/async-select.js 800 B
dist/esm/select/async-select.js.map 1.8 kB
dist/esm/select/creatable-select.js 824 B
dist/esm/select/creatable-select.js.map 1.9 kB
dist/esm/select/select.js 768 B
dist/esm/select/select.js.map 1.7 kB
dist/esm/types.js 44 B
dist/esm/types.js.map 3.6 kB
dist/esm/utils.js 2.9 kB
dist/esm/utils.js.map 4.7 kB
dist/types/chakra-components/containers.d.ts 704 B
dist/types/chakra-components/containers.d.ts.map 322 B
dist/types/chakra-components/control.d.ts 1.7 kB
dist/types/chakra-components/control.d.ts.map 589 B
dist/types/chakra-components/index.d.ts 5.1 kB
dist/types/chakra-components/index.d.ts.map 208 B
dist/types/chakra-components/input.d.ts 295 B
dist/types/chakra-components/input.d.ts.map 237 B
dist/types/chakra-components/menu.d.ts 1.3 kB
dist/types/chakra-components/menu.d.ts.map 490 B
dist/types/chakra-components/multi-value.d.ts 1.1 kB
dist/types/chakra-components/multi-value.d.ts.map 433 B
dist/types/chakra-components/placeholder.d.ts 325 B
dist/types/chakra-components/placeholder.d.ts.map 252 B
dist/types/chakra-components/single-value.d.ts 326 B
dist/types/chakra-components/single-value.d.ts.map 254 B
dist/types/index.d.ts 1.2 kB
dist/types/index.d.ts.map 985 B
dist/types/select/async-creatable-select.d.ts 624 B
dist/types/select/async-creatable-select.d.ts.map 646 B
dist/types/select/async-select.d.ts 550 B
dist/types/select/async-select.d.ts.map 618 B
dist/types/select/creatable-select.d.ts 582 B
dist/types/select/creatable-select.d.ts.map 626 B
dist/types/select/select.d.ts 472 B
dist/types/select/select.d.ts.map 566 B
dist/types/types.d.ts 3.4 kB
dist/types/types.d.ts.map 3.5 kB
dist/types/use-chakra-select-props.d.ts.map 255 B
dist/types/utils.d.ts 746 B
dist/types/utils.d.ts.map 328 B
LICENSE.md 1.1 kB
package.json 4.0 kB

🤖 This report was automatically generated by pkg-size-action

@csandman csandman changed the title Add @deprecation flags to both the original styles and theme props Add @deprecated flags to both the original styles and theme props Feb 28, 2023
@csandman csandman changed the title Add @deprecated flags to both the original styles and theme props Add @deprecated flags to both the original styles and theme props Feb 28, 2023
@csandman csandman changed the title Add @deprecated flags to both the original styles and theme props Add @deprecated flags Feb 28, 2023
@csandman csandman changed the title Add @deprecated flags Prop Deprecation Mar 1, 2023
@csandman csandman merged commit 4d85057 into main Mar 1, 2023
@csandman csandman deleted the prop-deprecation branch March 1, 2023 02:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant