-
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] Remove data frame analytics scss files #199572
[ML] Remove data frame analytics scss files #199572
Conversation
Pinging @elastic/ml-ui (:ml) |
<span | ||
data-test-subj="mlJobMapLegend__sourceNode" | ||
css={{ | ||
height: `${euiSizeM}`, |
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.
most of these overrides have mostly the same content. They could be pulled out into an object with all the common props and reused.
e.g.something like
const cssOverrideBase = {
height: `${euiSizeM}`,
width: `${euiSizeM}`,
backgroundColor: `${euiColorGhost}`,
border: `${euiBorderWidthThick} solid ${theme.euiColorVis2}`,
display: 'inline-block',
}
then used like this:
css={{
...cssOverrideBase
transform: 'rotate(45deg)',
}}
also, it's not necessary to wrap single values in template literals
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.
Updated in 999a7c7
@@ -42,16 +42,17 @@ export const OverallDetails: FC<{ | |||
}> = ({ overallDetails }) => ( | |||
<EuiFlexGroup alignItems="center" wrap data-test-subj={overallDetails.dataTestSubj}> | |||
{overallDetails.items.map((item) => { | |||
const key = `${item.title}`; |
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 template literal isn't needed
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.
Updated in 999a7c7
@@ -22,6 +23,12 @@ import { blurButtonOnClick } from '../../util/component_utils'; | |||
import { JobIcon } from '../job_message_icon'; | |||
import { useEnabledFeatures } from '../../contexts/ml'; | |||
|
|||
const cssOverride = css({ | |||
'.euiTable': { | |||
backgroundColor: 'transparent', |
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.
Yeah, apparently there's no direct way to set the background for the entire EuiInMemoryTable (just the rows) so was experimenting with the best way to apply it the way we want in each location.
Agree that it's probably best to move the styling back so it only applies where intended. Updated in b8c999e
@elasticmachine merge upstream |
@@ -20,7 +20,7 @@ export const BackToListPanel: FC = () => { | |||
return ( | |||
<Fragment> | |||
<EuiCard | |||
className="dfAnalyticsCreationWizard__card" | |||
css={{ width: '300px' }} |
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.
Use an EUI size variable to calculate this.
@@ -29,7 +29,7 @@ export const ViewResultsPanel: FC<Props> = ({ jobId, analysisType }) => { | |||
return ( | |||
<Fragment> | |||
<EuiCard | |||
className="dfAnalyticsCreationWizard__card" | |||
css={{ width: '300px' }} |
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.
Use an EUI size variable to calculate this.
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.
Thanks for taking a look, @andreadelrio 🙏
I'm not sure that would be the best solution here. The size variables I don't think are intended for this as even for the largest we'd have to multiply and do something like size.xl * 6.25
, which doesn't seem ideal, especially considering we use set variables for larger values in other places throughout. 🤔 This would then be affected if/when the size variable changes, which I don't think we'd want. I think for larger set widths it's okay to keep it as is.
Could you explain why it would be a better practice to use the variable?
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.
@alvarezmelissa87 In general we recommend not using any hardcoded values even for larger values. The idea is precisely that if the EUI variable were to changes (which is highly unlikely) all the layouts and containers in Kibana change their size according to the new value defined in the design system.
Here are some examples of this practice in our codebase. See:
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.
@andreadelrio - Thanks for the response - updated to use eui size variable in 9ffc9a0
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 (light and dark theme) and didn't spot any regressions. 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.
LGTM
@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.
Style code changes LGTM.
/ci |
@elasticmachine merge upstream |
@elasticmachine merge upstream |
💚 Build Succeeded
Metrics [docs]Module Count
Async chunks
History
|
Starting backport for target branches: 8.x https://github.com/elastic/kibana/actions/runs/11899368023 |
## Summary Related meta issue: elastic#140695 DFA map legend changes: <img width="1160" alt="image" src="https://github.com/user-attachments/assets/9858e83f-8cf5-4b1c-97d3-2726808eaedc"> Job messages changes: <img width="1033" alt="image" src="https://github.com/user-attachments/assets/fff3cdb0-efad-4cfd-bc18-bf60deffad26"> job messages in AD: <img width="1231" alt="image" src="https://github.com/user-attachments/assets/4f880be2-1be6-4315-a086-45920c3cb35e"> ### Checklist Delete any items that are not applicable to this PR. - [ ] Any text added follows [EUI's writing guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses sentence case text and includes [i18n support](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md) - [ ] [Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html) was added for features that require explanation or tutorials - [ ] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios - [ ] [Flaky Test Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was used on any tests changed - [ ] Any UI touched in this PR is usable by keyboard only (learn more about [keyboard accessibility](https://webaim.org/techniques/keyboard/)) - [ ] Any UI touched in this PR does not create any new axe failures (run axe in browser: [FF](https://addons.mozilla.org/en-US/firefox/addon/axe-devtools/), [Chrome](https://chrome.google.com/webstore/detail/axe-web-accessibility-tes/lhdoppojpmngadmnindnejefpokejbdd?hl=en-US)) - [ ] If a plugin configuration key changed, check if it needs to be allowlisted in the cloud and added to the [docker list](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker) - [ ] This renders correctly on smaller devices using a responsive layout. (You can test this [in your browser](https://www.browserstack.com/guide/responsive-testing-on-local-server)) - [ ] This was checked for [cross-browser compatibility](https://www.elastic.co/support/matrix#matrix_browsers) --------- Co-authored-by: Elastic Machine <[email protected]> (cherry picked from commit 2c0825f)
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
# Backport This will backport the following commits from `main` to `8.x`: - [[ML] Remove data frame analytics scss files (#199572)](#199572) <!--- Backport version: 9.4.3 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Melissa Alvarez","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-11-18T19:09:31Z","message":"[ML] Remove data frame analytics scss files (#199572)\n\n## Summary\r\n\r\nRelated meta issue: https://github.com/elastic/kibana/issues/140695\r\n\r\nDFA map legend changes:\r\n\r\n<img width=\"1160\" alt=\"image\"\r\nsrc=\"https://github.com/user-attachments/assets/9858e83f-8cf5-4b1c-97d3-2726808eaedc\">\r\n\r\nJob messages changes:\r\n\r\n<img width=\"1033\" alt=\"image\"\r\nsrc=\"https://github.com/user-attachments/assets/fff3cdb0-efad-4cfd-bc18-bf60deffad26\">\r\n\r\njob messages in AD:\r\n\r\n<img width=\"1231\" alt=\"image\"\r\nsrc=\"https://github.com/user-attachments/assets/4f880be2-1be6-4315-a086-45920c3cb35e\">\r\n\r\n\r\n### Checklist\r\n\r\nDelete any items that are not applicable to this PR.\r\n\r\n- [ ] Any text added follows [EUI's writing\r\nguidelines](https://elastic.github.io/eui/#/guidelines/writing), uses\r\nsentence case text and includes [i18n\r\nsupport](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)\r\n- [ ]\r\n[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)\r\nwas added for features that require explanation or tutorials\r\n- [ ] [Unit or functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere updated or added to match the most common scenarios\r\n- [ ] [Flaky Test\r\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was\r\nused on any tests changed\r\n- [ ] Any UI touched in this PR is usable by keyboard only (learn more\r\nabout [keyboard accessibility](https://webaim.org/techniques/keyboard/))\r\n- [ ] Any UI touched in this PR does not create any new axe failures\r\n(run axe in browser:\r\n[FF](https://addons.mozilla.org/en-US/firefox/addon/axe-devtools/),\r\n[Chrome](https://chrome.google.com/webstore/detail/axe-web-accessibility-tes/lhdoppojpmngadmnindnejefpokejbdd?hl=en-US))\r\n- [ ] If a plugin configuration key changed, check if it needs to be\r\nallowlisted in the cloud and added to the [docker\r\nlist](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)\r\n- [ ] This renders correctly on smaller devices using a responsive\r\nlayout. (You can test this [in your\r\nbrowser](https://www.browserstack.com/guide/responsive-testing-on-local-server))\r\n- [ ] This was checked for [cross-browser\r\ncompatibility](https://www.elastic.co/support/matrix#matrix_browsers)\r\n\r\n---------\r\n\r\nCo-authored-by: Elastic Machine <[email protected]>","sha":"2c0825f6b13d761b25c2c2978f9f7964d1b95a6b","branchLabelMapping":{"^v9.0.0$":"main","^v8.17.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":[":ml","release_note:skip","Feature:Data Frame Analytics","v9.0.0","backport:version","v8.17.0"],"title":"[ML] Remove data frame analytics scss files","number":199572,"url":"https://github.com/elastic/kibana/pull/199572","mergeCommit":{"message":"[ML] Remove data frame analytics scss files (#199572)\n\n## Summary\r\n\r\nRelated meta issue: https://github.com/elastic/kibana/issues/140695\r\n\r\nDFA map legend changes:\r\n\r\n<img width=\"1160\" alt=\"image\"\r\nsrc=\"https://github.com/user-attachments/assets/9858e83f-8cf5-4b1c-97d3-2726808eaedc\">\r\n\r\nJob messages changes:\r\n\r\n<img width=\"1033\" alt=\"image\"\r\nsrc=\"https://github.com/user-attachments/assets/fff3cdb0-efad-4cfd-bc18-bf60deffad26\">\r\n\r\njob messages in AD:\r\n\r\n<img width=\"1231\" alt=\"image\"\r\nsrc=\"https://github.com/user-attachments/assets/4f880be2-1be6-4315-a086-45920c3cb35e\">\r\n\r\n\r\n### Checklist\r\n\r\nDelete any items that are not applicable to this PR.\r\n\r\n- [ ] Any text added follows [EUI's writing\r\nguidelines](https://elastic.github.io/eui/#/guidelines/writing), uses\r\nsentence case text and includes [i18n\r\nsupport](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)\r\n- [ ]\r\n[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)\r\nwas added for features that require explanation or tutorials\r\n- [ ] [Unit or functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere updated or added to match the most common scenarios\r\n- [ ] [Flaky Test\r\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was\r\nused on any tests changed\r\n- [ ] Any UI touched in this PR is usable by keyboard only (learn more\r\nabout [keyboard accessibility](https://webaim.org/techniques/keyboard/))\r\n- [ ] Any UI touched in this PR does not create any new axe failures\r\n(run axe in browser:\r\n[FF](https://addons.mozilla.org/en-US/firefox/addon/axe-devtools/),\r\n[Chrome](https://chrome.google.com/webstore/detail/axe-web-accessibility-tes/lhdoppojpmngadmnindnejefpokejbdd?hl=en-US))\r\n- [ ] If a plugin configuration key changed, check if it needs to be\r\nallowlisted in the cloud and added to the [docker\r\nlist](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)\r\n- [ ] This renders correctly on smaller devices using a responsive\r\nlayout. (You can test this [in your\r\nbrowser](https://www.browserstack.com/guide/responsive-testing-on-local-server))\r\n- [ ] This was checked for [cross-browser\r\ncompatibility](https://www.elastic.co/support/matrix#matrix_browsers)\r\n\r\n---------\r\n\r\nCo-authored-by: Elastic Machine <[email protected]>","sha":"2c0825f6b13d761b25c2c2978f9f7964d1b95a6b"}},"sourceBranch":"main","suggestedTargetBranches":["8.x"],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/199572","number":199572,"mergeCommit":{"message":"[ML] Remove data frame analytics scss files (#199572)\n\n## Summary\r\n\r\nRelated meta issue: https://github.com/elastic/kibana/issues/140695\r\n\r\nDFA map legend changes:\r\n\r\n<img width=\"1160\" alt=\"image\"\r\nsrc=\"https://github.com/user-attachments/assets/9858e83f-8cf5-4b1c-97d3-2726808eaedc\">\r\n\r\nJob messages changes:\r\n\r\n<img width=\"1033\" alt=\"image\"\r\nsrc=\"https://github.com/user-attachments/assets/fff3cdb0-efad-4cfd-bc18-bf60deffad26\">\r\n\r\njob messages in AD:\r\n\r\n<img width=\"1231\" alt=\"image\"\r\nsrc=\"https://github.com/user-attachments/assets/4f880be2-1be6-4315-a086-45920c3cb35e\">\r\n\r\n\r\n### Checklist\r\n\r\nDelete any items that are not applicable to this PR.\r\n\r\n- [ ] Any text added follows [EUI's writing\r\nguidelines](https://elastic.github.io/eui/#/guidelines/writing), uses\r\nsentence case text and includes [i18n\r\nsupport](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)\r\n- [ ]\r\n[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)\r\nwas added for features that require explanation or tutorials\r\n- [ ] [Unit or functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere updated or added to match the most common scenarios\r\n- [ ] [Flaky Test\r\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was\r\nused on any tests changed\r\n- [ ] Any UI touched in this PR is usable by keyboard only (learn more\r\nabout [keyboard accessibility](https://webaim.org/techniques/keyboard/))\r\n- [ ] Any UI touched in this PR does not create any new axe failures\r\n(run axe in browser:\r\n[FF](https://addons.mozilla.org/en-US/firefox/addon/axe-devtools/),\r\n[Chrome](https://chrome.google.com/webstore/detail/axe-web-accessibility-tes/lhdoppojpmngadmnindnejefpokejbdd?hl=en-US))\r\n- [ ] If a plugin configuration key changed, check if it needs to be\r\nallowlisted in the cloud and added to the [docker\r\nlist](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)\r\n- [ ] This renders correctly on smaller devices using a responsive\r\nlayout. (You can test this [in your\r\nbrowser](https://www.browserstack.com/guide/responsive-testing-on-local-server))\r\n- [ ] This was checked for [cross-browser\r\ncompatibility](https://www.elastic.co/support/matrix#matrix_browsers)\r\n\r\n---------\r\n\r\nCo-authored-by: Elastic Machine <[email protected]>","sha":"2c0825f6b13d761b25c2c2978f9f7964d1b95a6b"}},{"branch":"8.x","label":"v8.17.0","branchLabelMappingKey":"^v8.17.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT--> Co-authored-by: Melissa Alvarez <[email protected]>
## Summary Related meta issue: elastic#140695 DFA map legend changes: <img width="1160" alt="image" src="https://github.com/user-attachments/assets/9858e83f-8cf5-4b1c-97d3-2726808eaedc"> Job messages changes: <img width="1033" alt="image" src="https://github.com/user-attachments/assets/fff3cdb0-efad-4cfd-bc18-bf60deffad26"> job messages in AD: <img width="1231" alt="image" src="https://github.com/user-attachments/assets/4f880be2-1be6-4315-a086-45920c3cb35e"> ### Checklist Delete any items that are not applicable to this PR. - [ ] Any text added follows [EUI's writing guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses sentence case text and includes [i18n support](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md) - [ ] [Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html) was added for features that require explanation or tutorials - [ ] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios - [ ] [Flaky Test Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was used on any tests changed - [ ] Any UI touched in this PR is usable by keyboard only (learn more about [keyboard accessibility](https://webaim.org/techniques/keyboard/)) - [ ] Any UI touched in this PR does not create any new axe failures (run axe in browser: [FF](https://addons.mozilla.org/en-US/firefox/addon/axe-devtools/), [Chrome](https://chrome.google.com/webstore/detail/axe-web-accessibility-tes/lhdoppojpmngadmnindnejefpokejbdd?hl=en-US)) - [ ] If a plugin configuration key changed, check if it needs to be allowlisted in the cloud and added to the [docker list](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker) - [ ] This renders correctly on smaller devices using a responsive layout. (You can test this [in your browser](https://www.browserstack.com/guide/responsive-testing-on-local-server)) - [ ] This was checked for [cross-browser compatibility](https://www.elastic.co/support/matrix#matrix_browsers) --------- Co-authored-by: Elastic Machine <[email protected]>
Summary
Related meta issue: #140695
DFA map legend changes:
Job messages changes:
job messages in AD:
Checklist
Delete any items that are not applicable to this PR.