-
Notifications
You must be signed in to change notification settings - Fork 22
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
Conversation
74bb49d
to
5894d3f
Compare
/retest |
1 similar comment
/retest |
faa15bd
to
2ce45fc
Compare
e47baea
to
b742607
Compare
/retest |
@@ -36,6 +36,8 @@ | |||
"redux-thunk": "^2.4.1" | |||
}, | |||
"dependencies": { | |||
"@redhat-cloud-services/frontend-components": "^3.9.10", | |||
"classnames": "^2.3.1", |
There was a problem hiding this comment.
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'; |
There was a problem hiding this comment.
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", |
There was a problem hiding this comment.
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.
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: fhlavac 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 |
@fhlavac: The following test failed, say
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. |
Will prepare a migration PR for HAC infra after openshift/hac-infra#27 is merged and stable. We should merge it all together |
Closing this until we have a new component repository which should resolve the CI failures |
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
propertyhttps://github.com/RedHatInsights/frontend-components/tree/master/packages/components/src/PrimaryToolbar