-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
[ML] Data Frame Analytics: Fix confusion matrix data grid width. #65818
[ML] Data Frame Analytics: Fix confusion matrix data grid width. #65818
Conversation
Pinging @elastic/ml-ui (:ml) |
padding-top: $euiSize * 4; | ||
/* Workaround for EuiDataGrid within a Flex Layout */ | ||
.mlDataFrameAnalyticsClassification { | ||
width: calc(100% - 0px); |
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.
why do you need calc
here? also, keep in mind it's not supported by IE11 properly https://caniuse.com/#feat=calc
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.
The calc
is used to work around an issue with EuiDataGrid
and percentage based width of the wrapping container when used in flex layouts. The original issue in the EUI repo is here: elastic/eui#2618
calc
in IE has limitations but this one should work hopefully. I cannot test it at the moment because it seems Kibana is broken for IE11 on master
. Will try again once I hear back from QA team.
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.
Managed to test in IE. Pushed some fixes in de5e1c0 and updated the PR description with before and after screenshots.
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.
After the refactor to not use flex anymore for the layout, the calc()
is no longer necessary. Removed in 7905eec.
|
||
.mlDataFrameAnalyticsClassification__actualLabel { | ||
min-width: 70px; | ||
padding-top: $euiSize * 4.2; |
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.
why 4.2? 🤔
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.
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.
have you tried to make it as :before
pseudo-element for the header row to avoid this padding?
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.
Hm not sure that would be feasible to do: The header row is rendered by EuiDataGrid
so that would mean either reusing some EUI classes and using a pseudo element would move the text to the SCSS where we cannot use translation (unless I move the style specification back into JSX?). Note this is just about adjusted an already existing padding value, it's not something this PR introduced; the main goal of this PR is to provide a fix for the broken data grid menu and fix IE. I changed the value to $euiSize * 4 + $euiSizeXS;
to avoid having the comma in d67b062.
@elasticmachine merge upstream |
@elasticmachine merge upstream |
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.
Tested on Chrome and IE11 and LGTM
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.
Gave this a test and LGTM ⚡
💚 Build SucceededHistory
To update your PR or re-run it, just comment with: |
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.
LGTM 👍
color="primary" | ||
href={`${ELASTIC_WEBSITE_URL}guide/en/machine-learning/${DOC_LINK_VERSION}/ml-dfanalytics-evaluate.html#ml-dfanalytics-classification`} | ||
> | ||
{i18n.translate( |
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.
nit: could be replaced with FormattedMessage
…stic#65818) - Fixes an issue where hiding all columns for the confusion matrix would hide the menu item to enable columns again. - Replaces resizeHandler based workaround for EuiDataGrid within flex layouts with a CSS based workaround. - Moves inline styles to SCSS file and imports that file directly. - Fixes IE11 layout issues.
) (#66355) - Fixes an issue where hiding all columns for the confusion matrix would hide the menu item to enable columns again. - Replaces resizeHandler based workaround for EuiDataGrid within flex layouts with a CSS based workaround. - Moves inline styles to SCSS file and imports that file directly. - Fixes IE11 layout issues.
) (#66354) - Fixes an issue where hiding all columns for the confusion matrix would hide the menu item to enable columns again. - Replaces resizeHandler based workaround for EuiDataGrid within flex layouts with a CSS based workaround. - Moves inline styles to SCSS file and imports that file directly. - Fixes IE11 layout issues.
* upstream/master: (223 commits) [Ingest] Support root level yaml variables in agent stream template (elastic#66120) [Snapshot Restore] Fix error when deleting snapshots behind reverse proxy (elastic#66147) [Lens] fix empty state for pie (elastic#66206) [APM] Improve e2e tests (elastic#66373) [ML] Data Frame Analytics: Fix steps to be named phases. (elastic#65855) [Discover] Encode context link filter part (elastic#63831) [APM] Scope APM alert creation to environment (elastic#65681) Move Kibana Usage collectors outside the telemetry plugin (elastic#65663) [ML] Data Frame Analytics: Fix confusion matrix data grid width. (elastic#65818) Switch to core application service (elastic#63443) Removes use of prefer_v2_templates (elastic#66316) [Maps] handle case where fit to bounds does not match any documents (elastic#66307) log error instead of throw (elastic#66254) [plugin-helpers] remove outdated postinstall task (elastic#66324) Spaces - migrate default space and enter space view to KP (elastic#66098) [APM] Change plugin id for `apm_oss` to `apmOss` (elastic#66164) [Maps] convert map_selectors to TS (elastic#65905) [uptime/usage-collector] add missing await (elastic#66079) [Ingest] Add additional attributes to the Datasources Saved Object (elastic#66127) [Endpoint]EMT-339: add new policy response schema (elastic#66264) ...
Summary
Part of #64418.
resizeHandler
based workaround forEuiDataGrid
within flex layouts with a CSS based workaround.Fixes IE11 layout issues:
Before:
After:
Checklist
For maintainers