Skip to content

Commit 803106c

Browse files
[9.0] Discover table disappears when dragging fields from the field list (#209714) (#210189)
# Backport This will backport the following commits from `main` to `9.0`: - [Discover table disappears when dragging fields from the field list (#209714)](#209714) <!--- Backport version: 9.4.3 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Ania Kowalska","email":"[email protected]"},"sourceCommit":{"committedDate":"2025-02-07T12:54:50Z","message":"Discover table disappears when dragging fields from the field list (#209714)\n\n## Summary\r\n\r\nCloses #209442 \r\n\r\nAfter dropping [color utility\r\nfunctions](https://eui.elastic.co/#/theming/colors/utilities)\r\naccidentally drag and drop zone background became solid, hiding table\r\ncontent.\r\n\r\n![image](https://github.com/user-attachments/assets/5c5b9686-ee11-4407-909f-56c53e4a0cd1)\r\n\r\nEUI team agreed to revert `transparentize()` in this particular case\r\n(until migration from SCSS to Emotions, when a new proper token should\r\nalready exist). Current color tokens though demanded a bit different\r\nopacity values than previously. I was trying to achieve the most similar\r\neffect to the `8.17` version.\r\n\r\nI also adjusted border as it was a bit too light compared to `8.17`.\r\n\r\n**8.17 border:**\r\n<img width=\"176\" alt=\"Screenshot 2025-02-05 at 10 43 35\"\r\nsrc=\"https://github.com/user-attachments/assets/bf71747a-63a5-4630-8a70-674a9576dbe0\"\r\n/>\r\n\r\n\r\n**`main` border**\r\n<img width=\"181\" alt=\"Screenshot 2025-02-05 at 10 34 39\"\r\nsrc=\"https://github.com/user-attachments/assets/c0756f20-ae74-4c72-914c-3b9fde96faa0\"\r\n/>\r\n\r\n**My choice from existing tokens (there's nothing in between `base` and\r\n`strong` success for borders):**\r\n<img width=\"174\" alt=\"Screenshot 2025-02-05 at 10 42 24\"\r\nsrc=\"https://github.com/user-attachments/assets/584f5577-4842-4b44-a395-3b0bcbaf4c82\"\r\n/>\r\n\r\n\r\nBelow you can find gifs with both versions in action. I'm open to any\r\nother color-opacity pairs suggestions if those don't mirror the previous\r\nstate enough.\r\n\r\n**8.17**\r\n![8 17 drag and\r\ndrop](https://github.com/user-attachments/assets/a95db5da-1af1-4373-a58d-6ecda33f9387)\r\n\r\n**This PR**\r\n![PR drag and\r\ndrop](https://github.com/user-attachments/assets/cf6c1a1e-8f8d-4462-8984-88837289ccd1)\r\n\r\n\r\n### Checklist\r\n\r\nCheck the PR satisfies following conditions. \r\n\r\nReviewers should verify this PR satisfies this list as well.\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/src/platform/packages/shared/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~~- [ ] 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 was checked for breaking HTTP API changes, and any breaking\r\nchanges have been approved by the breaking-change committee. The\r\n`release_note:breaking` label should be applied in these situations.~~\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- [x] The PR description includes the appropriate Release Notes section,\r\nand the correct `release_note:*` label is applied per the\r\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\r\n\r\n### Identify risks\r\n\r\nDoes this PR introduce any risks? For example, consider risks like hard\r\nto test bugs, performance regression, potential of data loss.\r\n\r\nDescribe the risk, its severity, and mitigation for each identified\r\nrisk. Invite stakeholders and evaluate how to proceed before merging.\r\n\r\n- [ ] [See some risk\r\nexamples](https://github.com/elastic/kibana/blob/main/RISK_MATRIX.mdx)\r\n- [ ] ...\r\n\r\n---------\r\n\r\nCo-authored-by: Elastic Machine <[email protected]>","sha":"a0807347102a7cdefd7edbd27750d6b3bbce2dc3","branchLabelMapping":{"^v9.1.0$":"main","^v8.19.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["bug","Feature:Discover","loe:small","release_note:skip","impact:medium","v9.0.0","Team:DataDiscovery","backport:version","EUI Visual Refresh","v9.1.0"],"title":"Discover table disappears when dragging fields from the field list","number":209714,"url":"https://github.com/elastic/kibana/pull/209714","mergeCommit":{"message":"Discover table disappears when dragging fields from the field list (#209714)\n\n## Summary\r\n\r\nCloses #209442 \r\n\r\nAfter dropping [color utility\r\nfunctions](https://eui.elastic.co/#/theming/colors/utilities)\r\naccidentally drag and drop zone background became solid, hiding table\r\ncontent.\r\n\r\n![image](https://github.com/user-attachments/assets/5c5b9686-ee11-4407-909f-56c53e4a0cd1)\r\n\r\nEUI team agreed to revert `transparentize()` in this particular case\r\n(until migration from SCSS to Emotions, when a new proper token should\r\nalready exist). Current color tokens though demanded a bit different\r\nopacity values than previously. I was trying to achieve the most similar\r\neffect to the `8.17` version.\r\n\r\nI also adjusted border as it was a bit too light compared to `8.17`.\r\n\r\n**8.17 border:**\r\n<img width=\"176\" alt=\"Screenshot 2025-02-05 at 10 43 35\"\r\nsrc=\"https://github.com/user-attachments/assets/bf71747a-63a5-4630-8a70-674a9576dbe0\"\r\n/>\r\n\r\n\r\n**`main` border**\r\n<img width=\"181\" alt=\"Screenshot 2025-02-05 at 10 34 39\"\r\nsrc=\"https://github.com/user-attachments/assets/c0756f20-ae74-4c72-914c-3b9fde96faa0\"\r\n/>\r\n\r\n**My choice from existing tokens (there's nothing in between `base` and\r\n`strong` success for borders):**\r\n<img width=\"174\" alt=\"Screenshot 2025-02-05 at 10 42 24\"\r\nsrc=\"https://github.com/user-attachments/assets/584f5577-4842-4b44-a395-3b0bcbaf4c82\"\r\n/>\r\n\r\n\r\nBelow you can find gifs with both versions in action. I'm open to any\r\nother color-opacity pairs suggestions if those don't mirror the previous\r\nstate enough.\r\n\r\n**8.17**\r\n![8 17 drag and\r\ndrop](https://github.com/user-attachments/assets/a95db5da-1af1-4373-a58d-6ecda33f9387)\r\n\r\n**This PR**\r\n![PR drag and\r\ndrop](https://github.com/user-attachments/assets/cf6c1a1e-8f8d-4462-8984-88837289ccd1)\r\n\r\n\r\n### Checklist\r\n\r\nCheck the PR satisfies following conditions. \r\n\r\nReviewers should verify this PR satisfies this list as well.\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/src/platform/packages/shared/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~~- [ ] 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 was checked for breaking HTTP API changes, and any breaking\r\nchanges have been approved by the breaking-change committee. The\r\n`release_note:breaking` label should be applied in these situations.~~\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- [x] The PR description includes the appropriate Release Notes section,\r\nand the correct `release_note:*` label is applied per the\r\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\r\n\r\n### Identify risks\r\n\r\nDoes this PR introduce any risks? For example, consider risks like hard\r\nto test bugs, performance regression, potential of data loss.\r\n\r\nDescribe the risk, its severity, and mitigation for each identified\r\nrisk. Invite stakeholders and evaluate how to proceed before merging.\r\n\r\n- [ ] [See some risk\r\nexamples](https://github.com/elastic/kibana/blob/main/RISK_MATRIX.mdx)\r\n- [ ] ...\r\n\r\n---------\r\n\r\nCo-authored-by: Elastic Machine <[email protected]>","sha":"a0807347102a7cdefd7edbd27750d6b3bbce2dc3"}},"sourceBranch":"main","suggestedTargetBranches":["9.0"],"targetPullRequestStates":[{"branch":"9.0","label":"v9.0.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v9.1.0","branchLabelMappingKey":"^v9.1.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/209714","number":209714,"mergeCommit":{"message":"Discover table disappears when dragging fields from the field list (#209714)\n\n## Summary\r\n\r\nCloses #209442 \r\n\r\nAfter dropping [color utility\r\nfunctions](https://eui.elastic.co/#/theming/colors/utilities)\r\naccidentally drag and drop zone background became solid, hiding table\r\ncontent.\r\n\r\n![image](https://github.com/user-attachments/assets/5c5b9686-ee11-4407-909f-56c53e4a0cd1)\r\n\r\nEUI team agreed to revert `transparentize()` in this particular case\r\n(until migration from SCSS to Emotions, when a new proper token should\r\nalready exist). Current color tokens though demanded a bit different\r\nopacity values than previously. I was trying to achieve the most similar\r\neffect to the `8.17` version.\r\n\r\nI also adjusted border as it was a bit too light compared to `8.17`.\r\n\r\n**8.17 border:**\r\n<img width=\"176\" alt=\"Screenshot 2025-02-05 at 10 43 35\"\r\nsrc=\"https://github.com/user-attachments/assets/bf71747a-63a5-4630-8a70-674a9576dbe0\"\r\n/>\r\n\r\n\r\n**`main` border**\r\n<img width=\"181\" alt=\"Screenshot 2025-02-05 at 10 34 39\"\r\nsrc=\"https://github.com/user-attachments/assets/c0756f20-ae74-4c72-914c-3b9fde96faa0\"\r\n/>\r\n\r\n**My choice from existing tokens (there's nothing in between `base` and\r\n`strong` success for borders):**\r\n<img width=\"174\" alt=\"Screenshot 2025-02-05 at 10 42 24\"\r\nsrc=\"https://github.com/user-attachments/assets/584f5577-4842-4b44-a395-3b0bcbaf4c82\"\r\n/>\r\n\r\n\r\nBelow you can find gifs with both versions in action. I'm open to any\r\nother color-opacity pairs suggestions if those don't mirror the previous\r\nstate enough.\r\n\r\n**8.17**\r\n![8 17 drag and\r\ndrop](https://github.com/user-attachments/assets/a95db5da-1af1-4373-a58d-6ecda33f9387)\r\n\r\n**This PR**\r\n![PR drag and\r\ndrop](https://github.com/user-attachments/assets/cf6c1a1e-8f8d-4462-8984-88837289ccd1)\r\n\r\n\r\n### Checklist\r\n\r\nCheck the PR satisfies following conditions. \r\n\r\nReviewers should verify this PR satisfies this list as well.\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/src/platform/packages/shared/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~~- [ ] 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 was checked for breaking HTTP API changes, and any breaking\r\nchanges have been approved by the breaking-change committee. The\r\n`release_note:breaking` label should be applied in these situations.~~\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- [x] The PR description includes the appropriate Release Notes section,\r\nand the correct `release_note:*` label is applied per the\r\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\r\n\r\n### Identify risks\r\n\r\nDoes this PR introduce any risks? For example, consider risks like hard\r\nto test bugs, performance regression, potential of data loss.\r\n\r\nDescribe the risk, its severity, and mitigation for each identified\r\nrisk. Invite stakeholders and evaluate how to proceed before merging.\r\n\r\n- [ ] [See some risk\r\nexamples](https://github.com/elastic/kibana/blob/main/RISK_MATRIX.mdx)\r\n- [ ] ...\r\n\r\n---------\r\n\r\nCo-authored-by: Elastic Machine <[email protected]>","sha":"a0807347102a7cdefd7edbd27750d6b3bbce2dc3"}}]}] BACKPORT--> Co-authored-by: Ania Kowalska <[email protected]>
1 parent db87cd9 commit 803106c

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

src/platform/packages/shared/kbn-dom-drag-drop/src/sass/drag_drop_mixins.scss

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,18 +39,20 @@ $domDragDropZLevel3: 3;
3939
}
4040

4141
// Style for drop area when there's an item being dragged
42+
// Until SCSS -> emotions migration we should continue using "transparentize()" here
4243
@mixin mixinDomDroppableActive($borderWidth: $euiBorderWidthThin) {
43-
background-color: $euiColorBackgroundBaseSuccess !important;
44+
background-color: transparentize($euiColorBackgroundLightSuccess, .7) !important;
4445
&:before {
45-
border-color: $euiColorBorderBaseSuccess !important;
46+
border-color: $euiColorBorderStrongSuccess !important;
4647
}
4748
}
4849

4950
// Style for drop area while hovering with item
51+
// Until SCSS -> emotions migration we should continue using "transparentize()" here
5052
@mixin mixinDomDroppableHover($borderWidth: $euiBorderWidthThin) {
51-
background-color: $euiColorBackgroundLightSuccess !important;
53+
background-color: transparentize($euiColorBackgroundFilledSuccess, .75) !important;
5254
&:before {
53-
border-color: $euiColorBorderBaseSuccess !important;
55+
border-color: $euiColorBorderStrongSuccess !important;
5456
}
5557
}
5658

0 commit comments

Comments
 (0)