-
Notifications
You must be signed in to change notification settings - Fork 20
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
fix(cards): replace instances of card.component.name #1081
fix(cards): replace instances of card.component.name #1081
Conversation
Test image available:
|
Test image available:
|
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.
Looks good to me! Fixed the issue!
@aali309 and @mwangggg could you verify that this bug does not occur in the 2.3.0 released images? I checked yesterday and didn't seem to run into this issue. You can run that image to check the behaviour, as well as you can review the release branch source code and see if it looks like the same bug could be present. |
I can confirm that 2.3.0 image does not run into this bug. Seems like in 2.3.0, these functions are not minified and was allowed to keep source name. I believe since we remove source map in production build after: b9d9557#diff-d3465f3a71d5cc473d32d3919bb34796e47f195e78b453d88c727c3f5ad80e6e The production code is now fully minified as desired, and also causes this bug to show up. Here is a quick inspection of the production build of 2.3.0 Buildvar MBeanMetricsChartCardDescriptor = {\n featureLevel: Settings_service/* FeatureLevel.PRODUCTION */.Lu.PRODUCTION,\n title: \'CHART_CARD.MBEAN_METRICS_CARD_TITLE\',\n cardSizes: MBeanMetricsChartCardSizes,\n description: \'CHART_CARD.MBEAN_METRICS_CARD_DESCRIPTION\',\n descriptionFull: "CHART_CARD.MBEAN_METRICS_CARD_DESCRIPTION_FULL",\n component: MBeanMetricsChartCard, Latest build
|
Welcome to Cryostat! 👋
Before contributing, make sure you have:
main
branch[chore, ci, docs, feat, fix, test]
git commit --amend --signoff
Fixes: #1079
Description of the change:
With help from Thuan, we figure out the bug. This change replaces all instances where we reference the Functional component name as data related to the dashboard. We need to do this because, it seems like Webpack minifys all instances of the component name in production mode: https://stackoverflow.com/questions/43800784/get-component-name-in-react. And then we end up with weird names and bad states because of this. That's also why there was no bug if running the
yarn start:dev
dev server.How to manually test:
cd web-client
and checkout this branch in that submodule e.g.git checkout f8592d891067c18a1f61f0cdbabc995974e56944
..
and runmvn clean -DskipTests package