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

[OSCI] Added a console warning for panelled prop #1142

Open
wants to merge 10 commits into
base: main
Choose a base branch
from

Conversation

NishantSinghal19
Copy link
Contributor

@NishantSinghal19 NishantSinghal19 commented Nov 3, 2023

Description

I have added the useDepreceatedPropWarning for the panelled prop which is going to be depreciated in ver 2.0

Issues Resolved

I have solved issue #843 which was assigned to me

Check List

  • New functionality includes testing.
  • New functionality has been documented.
  • All tests pass
    • yarn lint
    • yarn test-unit
  • Update CHANGELOG.md
  • Commits are signed per the DCO using --signoff

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

For more information on following Developer Certificate of Origin and signing off your commits, please check here.

NishantSinghal19 and others added 8 commits October 6, 2023 15:41
Signed-off-by: Nishant Singhal <[email protected]>
@BSFishy BSFishy added the OSCI label Nov 6, 2023
Copy link
Member

@joshuarrrr joshuarrrr left a comment

Choose a reason for hiding this comment

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

Thanks @NishantSinghal19 ! We should mark both panelled and panelProps as deprecated, and have a comment for each.

@@ -61,6 +62,7 @@ export type OuiPageBodyProps<T extends ComponentTypes = 'main'> = CommonProps &
panelled?: boolean;
/**
* Extends any extra OuiPanel props if `panelled=true`
* **panelled prop is deprecated in version 2.0.0
Copy link
Member

@joshuarrrr joshuarrrr Nov 14, 2023

Choose a reason for hiding this comment

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

This is comment is on the wrong line - comments precede the props, so the comments for the panelled prop are L59-61.

@@ -86,6 +88,7 @@ export const OuiPageBody = <T extends ComponentTypes>({
style
);

useDeprecatedPropWarning({ props: { panelled }, version: '2.0.0' });
Copy link
Member

Choose a reason for hiding this comment

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

I think we should also include panelProps as a deprecated prop, because it's dependent on panelled being true.

@@ -6,6 +6,8 @@

### Deprecations

- Added useDeprecatedPropWarning for panelled prop ([#843](https://github.com/opensearch-project/oui/pull/1142))
Copy link
Member

Choose a reason for hiding this comment

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

nit - use imperative for changelog entries, and link to the PR, not the issue

Suggested change
- Added useDeprecatedPropWarning for panelled prop ([#843](https://github.com/opensearch-project/oui/pull/1142))
- Add deprecation warning for `panelled` prop of `OuiPageBody` ([#1142](https://github.com/opensearch-project/oui/pull/1142))

@joshuarrrr
Copy link
Member

@NishantSinghal19 Just checking in to see if you'll be able to make the last couple changes requested.

@NishantSinghal19
Copy link
Contributor Author

Ohh sorry I will do this by EOD

@AMoo-Miki
Copy link
Collaborator

@NishantSinghal19 are you interested in continuing this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants