Skip to content

Deprecate iconType and iconProps from OuiPageHeader#759

Merged
BSFishy merged 2 commits intoopensearch-project:mainfrom
curq:deprecate-iconType-iconProps
May 16, 2023
Merged

Deprecate iconType and iconProps from OuiPageHeader#759
BSFishy merged 2 commits intoopensearch-project:mainfrom
curq:deprecate-iconType-iconProps

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 <sirazh.gabdullin@nu.edu.kz>
@BSFishy BSFishy added CCI College Contributor Initiative backport 1.x labels May 16, 2023
Signed-off-by: Sirazh Gabdullin <sirazh.gabdullin@nu.edu.kz>
@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 <sirazh.gabdullin@nu.edu.kz>

* Move deprecated doc comment to prop's definition

Signed-off-by: Sirazh Gabdullin <sirazh.gabdullin@nu.edu.kz>

---------

Signed-off-by: Sirazh Gabdullin <sirazh.gabdullin@nu.edu.kz>
(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 <sirazh.gabdullin@nu.edu.kz>
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