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

Deprecate iconType and iconProps from OuiPageHeader #759

Merged
merged 2 commits into from
May 16, 2023

Conversation

curq
Copy link
Contributor

@curq curq commented May 16, 2023

Description

Deprecated iconType and iconProps as according to the #644 they will no longer be used/supported.

Issues Resolved

First (out of 2) PR to solve #644

Check List

  • New functionality includes testing.
  • New functionality has been documented.
  • All tests pass
    • yarn lint
    • yarn test-unit
  • 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.

Signed-off-by: Sirazh Gabdullin <[email protected]>
@BSFishy BSFishy added CCI College Contributor Initiative backport 1.x labels May 16, 2023
@SergeyMyssak
Copy link
Collaborator

I think these changes could be made more reusable and aligned with the deprecated high-order component, for example:

export const getDeprecatedPropMessage = (message) => `[DEPRECATED] ${message}`;

export const useDeprecationPropWarning = (deprecatedProp, propName, componentName) => {
  useEffect(() => {
    if (deprecatedProp !== undefined) {
      console.warn(getDeprecatedPropMessage(...));
    }
  }, [deprecatedProp, propName, componentName]);
}

@BSFishy
Copy link
Contributor

BSFishy commented May 16, 2023

I think these changes could be made more reusable and aligned with the deprecated high-order component, for example:

export const getDeprecatedPropMessage = (message) => `[DEPRECATED] ${message}`;

export const useDeprecationPropWarning = (deprecatedProp, propName, componentName) => {
  useEffect(() => {
    if (deprecatedProp !== undefined) {
      console.warn(getDeprecatedPropMessage(...));
    }
  }, [deprecatedProp, propName, componentName]);
}

I agree, let's create a follow-up issue to track this

@BSFishy BSFishy merged commit 71dc4bd into opensearch-project:main May 16, 2023
opensearch-trigger-bot bot pushed a commit that referenced this pull request May 16, 2023
…#759)

* Deprecate iconType and iconProps

Signed-off-by: Sirazh Gabdullin <[email protected]>

* Move deprecated doc comment to prop's definition

Signed-off-by: Sirazh Gabdullin <[email protected]>

---------

Signed-off-by: Sirazh Gabdullin <[email protected]>
(cherry picked from commit 71dc4bd)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
ashwin-pc pushed a commit that referenced this pull request May 25, 2023
…#759) (#760)

* Deprecate iconType and iconProps



* Move deprecated doc comment to prop's definition



---------


(cherry picked from commit 71dc4bd)

Signed-off-by: Sirazh Gabdullin <[email protected]>
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport 1.x CCI College Contributor Initiative first-time-contributor
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants