-
Notifications
You must be signed in to change notification settings - Fork 71
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
Review the theme for Wazuh dashboard based on OSD 2.18.0 #423
Comments
ResearchThis problem is happening in OpenSearch Dashboards 2.19.0 when using The problem seems to be located in empty buttons. These have a style Redefining that property or removing that definition (fallback to I found a related issue where there is a discussion about the possible fix: opensearch-project/oui#1486. I guess we could add the fix to the generated styles in the served Possible solutions
- 'osd-ui-shared-deps.v7.dark': ['@elastic/eui/dist/eui_theme_dark.css'],
- 'osd-ui-shared-deps.v7.light': ['@elastic/eui/dist/eui_theme_light.css'],
+ 'osd-ui-shared-deps.v7.dark': [Path.resolve('./v7theme-fix/eui_theme_dark.css')],
+ 'osd-ui-shared-deps.v7.light': [Path.resolve('./v7theme-fix/eui_theme_light.css')], Then rebuild with
.euiButtonEmpty__text {
line-height: normal;
}
Additional contextIn the bootrap.js file, this loads the resources files (styles, js files, etc...) and load a set of files related to the selected theme. They are defined here: wazuh-dashboard/src/legacy/ui/ui_render/ui_render_mixin.js Lines 168 to 173 in 6f7b5af
v7 so makes sense only applying the fix to this version.
|
Solution based on replacing the v7 theme files adding the fixI am working into adding the v7 theme files (light and dark) to the I tried in a pre-built image of Wazuh dashboard 4.12.0 and applying the changes solved the problem. I commited the changes to the branch docker build --build-arg NODE_VERSION=18.19.0 --build-arg OPENSEARCH_DASHBOARD_VERSION=2.19.0.0 --build-arg WAZUH_DASHBOARD_BRANCH=bug/423-v7-theme-empty-button-text-cut-off --build-arg WAZUH_DASHBOARD_SECURITY_BRANCH=4.12.0 --build-arg WAZUH_DASHBOARD_REPORTING_BRANCH=4.12.0 --build-arg WAZUH_DASHBOARD_PLUGINS_BRANCH=4.12.0 -t wzd-local:issue-423-patch-v7-theme-empty-button -f wzd.dockerfile . Using the Wazuh dashboard dev with the changes, they are applied correctly: |
In a meeting with @asteriscos , we discussing about adding the styles patch in a new file that should be loaded when selecting the specific theme This approach avoids maintaining the distributable of |
Solution based on adding a new file to load for
|
themeTagStyleSheetPaths[themeTag] = [ | |
`${regularBundlePath}/osd-ui-shared-deps/${UiSharedDeps.baseCssDistFilename}`, | |
`${regularBundlePath}/osd-ui-shared-deps/${UiSharedDeps.themeCssDistFilenames[effectiveVersion][effectiveMode]}`, | |
`${basePath}/node_modules/@osd/ui-framework/dist/${UiSharedDeps.kuiCssDistFilenames[effectiveVersion][effectiveMode]}`, | |
`${basePath}/ui/legacy_${mode}_theme.css`, | |
]; |
${basePath}/ui/{file}
defining the file at
Tested using the Docker dev environment:
Related pull request: #546
Tested building a local Wazuh dashboard deb package:
Describe the bug
The
v7
theme (used in previous version of Wazuh dashboard) has a visual bug in some button hidding part of the text.The
v9
theme seems to be similar tov7
and does not contain the mentioned bug ofv7
.OSD 2.18.0 using the

v7
theme:OSD 2.18.0 using the

v9
theme, the problem is not present:We could consider the usage of
v9
theme by default or fix the bug onv7
.The text was updated successfully, but these errors were encountered: