[Markdown] Fix layout issues for markdown embeddables in small panels #240806
Merged
mbondyra merged 2 commits intoelastic:mainfrom Oct 28, 2025
Merged
[Markdown] Fix layout issues for markdown embeddables in small panels #240806mbondyra merged 2 commits intoelastic:mainfrom
mbondyra merged 2 commits intoelastic:mainfrom
Conversation
Contributor
|
Pinging @elastic/kibana-presentation (Team:Presentation) |
53c7c39 to
13820d4
Compare
ThomThomson
approved these changes
Oct 27, 2025
Contributor
ThomThomson
left a comment
There was a problem hiding this comment.
Fix looks good to me!
| [SHORT_CONTAINER_QUERY]: { | ||
| blockSize: `100%`, | ||
| // TODO: Do not use data-test-subj to style - should be fixed in EUI | ||
| '[data-test-subj="euiMarkdownEditorToolbar"]': { |
Contributor
There was a problem hiding this comment.
There is no class for the toolbar? If not, would you mind creating or linking an issue in the EUI repo so we don't lose track of this?
679f6f5 to
7e99d48
Compare
Contributor
💛 Build succeeded, but was flaky
Failed CI StepsTest Failures
Metrics [docs]Async chunks
History
|
Contributor
|
Starting backport for target branches: 9.2 |
kibanamachine
pushed a commit
to kibanamachine/kibana
that referenced
this pull request
Oct 28, 2025
…elastic#240806) ## Summary Fixes layout issues for markdown embeddables in small dashboard panels using CSS container queries. When a markdown panel is shorter than 120px, the UI now adapts to a compact layout that maximizes usable space. ## Problem Markdown embeddables are not rendering correctly in small (short) panels. The editor toolbar and footer would take up significant vertical space, leaving little room for content editing in constrained layouts. Turns out that this usecase can be more important to just ignore it, since users might use small panels to only place the title in the dashboard. <img width="643" height="89" alt="Screenshot 2025-10-27 at 14 08 42" src="https://github.com/user-attachments/assets/b3478586-13d0-4ef0-b5b5-617089886db3" /> ## Solution ### Layout Improvements Implemented responsive layout using CSS container queries (@container) to detect when panels are too small and automatically switch to a compact layout: When container height < 120px: - Editor toolbar is hidden to maximize editing space - toolbar can be useful but it's not essential for the users to edit their markdown panels. - Footer transforms to compact overlay positioned in the top-right corner with transparent background <img width="640" height="83" alt="Screenshot 2025-10-27 at 14 08 17" src="https://github.com/user-attachments/assets/14582c1a-1f56-42bf-9f63-4bd1a1add77e" /> The new layout <img width="581" height="186" alt="Screenshot 2025-10-27 at 14 13 31" src="https://github.com/user-attachments/assets/8982f333-5133-4fbb-b94b-815cb28b61de" /> The smallest layout that still follows the 'classic' design (cherry picked from commit ec67b3d)
Contributor
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
kibanamachine
added a commit
that referenced
this pull request
Oct 28, 2025
…panels (#240806) (#240993) # Backport This will backport the following commits from `main` to `9.2`: - [[Markdown] Fix layout issues for markdown embeddables in small panels (#240806)](#240806) <!--- Backport version: 9.6.6 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sorenlouv/backport) <!--BACKPORT [{"author":{"name":"Marta Bondyra","email":"4283304+mbondyra@users.noreply.github.com"},"sourceCommit":{"committedDate":"2025-10-28T13:46:01Z","message":"[Markdown] Fix layout issues for markdown embeddables in small panels (#240806)\n\n## Summary\n\nFixes layout issues for markdown embeddables in small dashboard panels\nusing CSS container queries. When a markdown panel is shorter than\n120px, the UI now adapts to a compact layout that maximizes usable\nspace.\n\n## Problem\n\nMarkdown embeddables are not rendering correctly in small (short)\npanels. The editor toolbar and footer would take up significant vertical\nspace, leaving little room for content editing in constrained layouts.\nTurns out that this usecase can be more important to just ignore it,\nsince users might use small panels to only place the title in the\ndashboard.\n\n<img width=\"643\" height=\"89\" alt=\"Screenshot 2025-10-27 at 14 08 42\"\nsrc=\"https://github.com/user-attachments/assets/b3478586-13d0-4ef0-b5b5-617089886db3\"\n/>\n\n## Solution\n\n### Layout Improvements\n\nImplemented responsive layout using CSS container queries (@container)\nto detect when panels are too small and automatically switch to a\ncompact layout:\n\n When container height < 120px:\n- Editor toolbar is hidden to maximize editing space - toolbar can be\nuseful but it's not essential for the users to edit their markdown\npanels.\n- Footer transforms to compact overlay positioned in the top-right\ncorner with transparent background\n<img width=\"640\" height=\"83\" alt=\"Screenshot 2025-10-27 at 14 08 17\"\nsrc=\"https://github.com/user-attachments/assets/14582c1a-1f56-42bf-9f63-4bd1a1add77e\"\n/>\n\nThe new layout\n\n<img width=\"581\" height=\"186\" alt=\"Screenshot 2025-10-27 at 14 13 31\"\nsrc=\"https://github.com/user-attachments/assets/8982f333-5133-4fbb-b94b-815cb28b61de\"\n/>\n\nThe smallest layout that still follows the 'classic' design","sha":"ec67b3d637f5f3dec965b0bc29bb673cf999cbfa","branchLabelMapping":{"^v9.3.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:fix","Team:Presentation","backport:version","v9.3.0","v9.2.1"],"title":"[Markdown] Fix layout issues for markdown embeddables in small panels ","number":240806,"url":"https://github.com/elastic/kibana/pull/240806","mergeCommit":{"message":"[Markdown] Fix layout issues for markdown embeddables in small panels (#240806)\n\n## Summary\n\nFixes layout issues for markdown embeddables in small dashboard panels\nusing CSS container queries. When a markdown panel is shorter than\n120px, the UI now adapts to a compact layout that maximizes usable\nspace.\n\n## Problem\n\nMarkdown embeddables are not rendering correctly in small (short)\npanels. The editor toolbar and footer would take up significant vertical\nspace, leaving little room for content editing in constrained layouts.\nTurns out that this usecase can be more important to just ignore it,\nsince users might use small panels to only place the title in the\ndashboard.\n\n<img width=\"643\" height=\"89\" alt=\"Screenshot 2025-10-27 at 14 08 42\"\nsrc=\"https://github.com/user-attachments/assets/b3478586-13d0-4ef0-b5b5-617089886db3\"\n/>\n\n## Solution\n\n### Layout Improvements\n\nImplemented responsive layout using CSS container queries (@container)\nto detect when panels are too small and automatically switch to a\ncompact layout:\n\n When container height < 120px:\n- Editor toolbar is hidden to maximize editing space - toolbar can be\nuseful but it's not essential for the users to edit their markdown\npanels.\n- Footer transforms to compact overlay positioned in the top-right\ncorner with transparent background\n<img width=\"640\" height=\"83\" alt=\"Screenshot 2025-10-27 at 14 08 17\"\nsrc=\"https://github.com/user-attachments/assets/14582c1a-1f56-42bf-9f63-4bd1a1add77e\"\n/>\n\nThe new layout\n\n<img width=\"581\" height=\"186\" alt=\"Screenshot 2025-10-27 at 14 13 31\"\nsrc=\"https://github.com/user-attachments/assets/8982f333-5133-4fbb-b94b-815cb28b61de\"\n/>\n\nThe smallest layout that still follows the 'classic' design","sha":"ec67b3d637f5f3dec965b0bc29bb673cf999cbfa"}},"sourceBranch":"main","suggestedTargetBranches":["9.2"],"targetPullRequestStates":[{"branch":"main","label":"v9.3.0","branchLabelMappingKey":"^v9.3.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/240806","number":240806,"mergeCommit":{"message":"[Markdown] Fix layout issues for markdown embeddables in small panels (#240806)\n\n## Summary\n\nFixes layout issues for markdown embeddables in small dashboard panels\nusing CSS container queries. When a markdown panel is shorter than\n120px, the UI now adapts to a compact layout that maximizes usable\nspace.\n\n## Problem\n\nMarkdown embeddables are not rendering correctly in small (short)\npanels. The editor toolbar and footer would take up significant vertical\nspace, leaving little room for content editing in constrained layouts.\nTurns out that this usecase can be more important to just ignore it,\nsince users might use small panels to only place the title in the\ndashboard.\n\n<img width=\"643\" height=\"89\" alt=\"Screenshot 2025-10-27 at 14 08 42\"\nsrc=\"https://github.com/user-attachments/assets/b3478586-13d0-4ef0-b5b5-617089886db3\"\n/>\n\n## Solution\n\n### Layout Improvements\n\nImplemented responsive layout using CSS container queries (@container)\nto detect when panels are too small and automatically switch to a\ncompact layout:\n\n When container height < 120px:\n- Editor toolbar is hidden to maximize editing space - toolbar can be\nuseful but it's not essential for the users to edit their markdown\npanels.\n- Footer transforms to compact overlay positioned in the top-right\ncorner with transparent background\n<img width=\"640\" height=\"83\" alt=\"Screenshot 2025-10-27 at 14 08 17\"\nsrc=\"https://github.com/user-attachments/assets/14582c1a-1f56-42bf-9f63-4bd1a1add77e\"\n/>\n\nThe new layout\n\n<img width=\"581\" height=\"186\" alt=\"Screenshot 2025-10-27 at 14 13 31\"\nsrc=\"https://github.com/user-attachments/assets/8982f333-5133-4fbb-b94b-815cb28b61de\"\n/>\n\nThe smallest layout that still follows the 'classic' design","sha":"ec67b3d637f5f3dec965b0bc29bb673cf999cbfa"}},{"branch":"9.2","label":"v9.2.1","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT--> Co-authored-by: Marta Bondyra <4283304+mbondyra@users.noreply.github.com>
qn895
pushed a commit
to qn895/kibana
that referenced
this pull request
Oct 30, 2025
…elastic#240806) ## Summary Fixes layout issues for markdown embeddables in small dashboard panels using CSS container queries. When a markdown panel is shorter than 120px, the UI now adapts to a compact layout that maximizes usable space. ## Problem Markdown embeddables are not rendering correctly in small (short) panels. The editor toolbar and footer would take up significant vertical space, leaving little room for content editing in constrained layouts. Turns out that this usecase can be more important to just ignore it, since users might use small panels to only place the title in the dashboard. <img width="643" height="89" alt="Screenshot 2025-10-27 at 14 08 42" src="https://github.com/user-attachments/assets/b3478586-13d0-4ef0-b5b5-617089886db3" /> ## Solution ### Layout Improvements Implemented responsive layout using CSS container queries (@container) to detect when panels are too small and automatically switch to a compact layout: When container height < 120px: - Editor toolbar is hidden to maximize editing space - toolbar can be useful but it's not essential for the users to edit their markdown panels. - Footer transforms to compact overlay positioned in the top-right corner with transparent background <img width="640" height="83" alt="Screenshot 2025-10-27 at 14 08 17" src="https://github.com/user-attachments/assets/14582c1a-1f56-42bf-9f63-4bd1a1add77e" /> The new layout <img width="581" height="186" alt="Screenshot 2025-10-27 at 14 13 31" src="https://github.com/user-attachments/assets/8982f333-5133-4fbb-b94b-815cb28b61de" /> The smallest layout that still follows the 'classic' design
ana-davydova
pushed a commit
to ana-davydova/kibana
that referenced
this pull request
Nov 3, 2025
…elastic#240806) ## Summary Fixes layout issues for markdown embeddables in small dashboard panels using CSS container queries. When a markdown panel is shorter than 120px, the UI now adapts to a compact layout that maximizes usable space. ## Problem Markdown embeddables are not rendering correctly in small (short) panels. The editor toolbar and footer would take up significant vertical space, leaving little room for content editing in constrained layouts. Turns out that this usecase can be more important to just ignore it, since users might use small panels to only place the title in the dashboard. <img width="643" height="89" alt="Screenshot 2025-10-27 at 14 08 42" src="https://github.com/user-attachments/assets/b3478586-13d0-4ef0-b5b5-617089886db3" /> ## Solution ### Layout Improvements Implemented responsive layout using CSS container queries (@container) to detect when panels are too small and automatically switch to a compact layout: When container height < 120px: - Editor toolbar is hidden to maximize editing space - toolbar can be useful but it's not essential for the users to edit their markdown panels. - Footer transforms to compact overlay positioned in the top-right corner with transparent background <img width="640" height="83" alt="Screenshot 2025-10-27 at 14 08 17" src="https://github.com/user-attachments/assets/14582c1a-1f56-42bf-9f63-4bd1a1add77e" /> The new layout <img width="581" height="186" alt="Screenshot 2025-10-27 at 14 13 31" src="https://github.com/user-attachments/assets/8982f333-5133-4fbb-b94b-815cb28b61de" /> The smallest layout that still follows the 'classic' design
albertoblaz
pushed a commit
to albertoblaz/kibana
that referenced
this pull request
Nov 4, 2025
…elastic#240806) ## Summary Fixes layout issues for markdown embeddables in small dashboard panels using CSS container queries. When a markdown panel is shorter than 120px, the UI now adapts to a compact layout that maximizes usable space. ## Problem Markdown embeddables are not rendering correctly in small (short) panels. The editor toolbar and footer would take up significant vertical space, leaving little room for content editing in constrained layouts. Turns out that this usecase can be more important to just ignore it, since users might use small panels to only place the title in the dashboard. <img width="643" height="89" alt="Screenshot 2025-10-27 at 14 08 42" src="https://github.com/user-attachments/assets/b3478586-13d0-4ef0-b5b5-617089886db3" /> ## Solution ### Layout Improvements Implemented responsive layout using CSS container queries (@container) to detect when panels are too small and automatically switch to a compact layout: When container height < 120px: - Editor toolbar is hidden to maximize editing space - toolbar can be useful but it's not essential for the users to edit their markdown panels. - Footer transforms to compact overlay positioned in the top-right corner with transparent background <img width="640" height="83" alt="Screenshot 2025-10-27 at 14 08 17" src="https://github.com/user-attachments/assets/14582c1a-1f56-42bf-9f63-4bd1a1add77e" /> The new layout <img width="581" height="186" alt="Screenshot 2025-10-27 at 14 13 31" src="https://github.com/user-attachments/assets/8982f333-5133-4fbb-b94b-815cb28b61de" /> The smallest layout that still follows the 'classic' design
3 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes layout issues for markdown embeddables in small dashboard panels using CSS container queries. When a markdown panel is shorter than 120px, the UI now adapts to a compact layout that maximizes usable space.
Problem
Markdown embeddables are not rendering correctly in small (short) panels. The editor toolbar and footer would take up significant vertical space, leaving little room for content editing in constrained layouts. Turns out that this usecase can be more important to just ignore it, since users might use small panels to only place the title in the dashboard.
Solution
Layout Improvements
Implemented responsive layout using CSS container queries (@container) to detect when panels are too small and automatically switch to a compact layout:
When container height < 120px:
The new layout
The smallest layout that still follows the 'classic' design