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

Use FEC toolbar in ListView #153

Closed
wants to merge 3 commits into from
Closed

Conversation

fhlavac
Copy link
Contributor

@fhlavac fhlavac commented Sep 12, 2022

https://issues.redhat.com/browse/HAC-1714

Replaced custom toolbar used in ListView with one from https://github.com/RedHatInsights/frontend-components to make it easier to be maintained in the future. Also added a possibility to define global toolbar actions using globalActions property

actions

https://github.com/RedHatInsights/frontend-components/tree/master/packages/components/src/PrimaryToolbar

@fhlavac
Copy link
Contributor Author

fhlavac commented Sep 19, 2022

/retest

1 similar comment
@fhlavac
Copy link
Contributor Author

fhlavac commented Sep 21, 2022

/retest

@fhlavac
Copy link
Contributor Author

fhlavac commented Oct 17, 2022

/retest

@@ -36,6 +36,8 @@
"redux-thunk": "^2.4.1"
},
"dependencies": {
"@redhat-cloud-services/frontend-components": "^3.9.10",
"classnames": "^2.3.1",
Copy link
Contributor

Choose a reason for hiding this comment

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

Both @redhat-cloud-services/frontend-components and classnames are intended as direct (non-peer) dependencies here, so there's no need to add them to root package.json.

Only peer dependencies should have a matching entry in the root package.json under devDependencies.

Looking at @redhat-cloud-services/frontend-components (latest version) regular and peer dependencies:

$ yarn npm info @redhat-cloud-services/frontend-components -f dependencies,peerDependencies
{
  name: '@redhat-cloud-services/frontend-components',
  dependencies: {
    '@redhat-cloud-services/frontend-components-utilities': '^3.2.25',
    'sanitize-html': '^2.7.2',
    '@scalprum/core': '^0.2.3',
    '@scalprum/react-core': '^0.2.4',
    '@redhat-cloud-services/types': '^0.0.10'
  },
  peerDependencies: {
    '@patternfly/react-table': '^4.5.7',
    '@patternfly/react-core': '^4.18.5',
    '@patternfly/react-icons': '^4.53.16',
    classnames: '^2.2.5',
    'prop-types': '^15.6.2',
    react: '^16.14.0 || ^17.0.0',
    'react-dom': '^16.14.0 || ^17.0.0',
    'react-content-loader': '^6.2.0',
    'react-redux': '>=7.0.0',
    'react-router-dom': '^5.0.0',
    lodash: '^4.17.15'
  }
}

The react-router-dom: ^5.0.0 peer dependency doesn't meet our current react-router-dom: ^6.3.0 peer dependency, is that an issue?

Edit: I think it's generally better to treat @redhat-cloud-services/frontend-components as a peer dependency, instead of a regular dependency, can you make this change? (plus add it to root package.json)

Some libraries tend to have very complex dependency trees (oftentimes with more or less outdated dependencies at various levels), which is one of the reason why having it as a peer dependency is preferable.

import type {
ConditionalFilterItem,
FilterChipGroup,
} from '@redhat-cloud-services/frontend-components';
Copy link
Contributor

Choose a reason for hiding this comment

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

If we only intend to consume a couple of React components and types from ^^ library, wouldn't it make more sense to mark this library as non-external? This way, the code we import from it would become part of the generated SDK code (basically treating it as a dev dependency).

@@ -36,6 +36,8 @@
"redux-thunk": "^2.4.1"
},
"dependencies": {
"@redhat-cloud-services/frontend-components": "^3.9.10",
"classnames": "^2.3.1",
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we really use this in our code? If not, we can remove this explicit dependency.

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Oct 20, 2022

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: fhlavac
Once this PR has been reviewed and has the lgtm label, please ask for approval from vojtechszocs by writing /assign @vojtechszocs in a comment. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Oct 31, 2022

@fhlavac: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/all-packages d1112bb link true /test all-packages

Full PR test history. Your PR dashboard.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@fhlavac
Copy link
Contributor Author

fhlavac commented Oct 31, 2022

Will prepare a migration PR for HAC infra after openshift/hac-infra#27 is merged and stable. We should merge it all together

@fhlavac
Copy link
Contributor Author

fhlavac commented Nov 24, 2022

Closing this until we have a new component repository which should resolve the CI failures

@fhlavac fhlavac closed this Nov 24, 2022
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.

None yet

2 participants