Skip to content
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

[Discover] Fix JSON view height in DocViewer #183468

Merged
merged 3 commits into from
May 15, 2024

Conversation

jughosta
Copy link
Contributor

@jughosta jughosta commented May 15, 2024

Summary

This PR fixes the height of JSON block in DocViewer. Also it reduces the available height as the flyout now has a footer with Close button.

@jughosta jughosta added release_note:skip Skip the PR/issue when compiling release notes Team:DataDiscovery Discover, search (e.g. data plugin and KQL), data views, saved searches. For ES|QL, use Team:ES|QL. backport:prev-minor Backport to (8.x) the previous minor version (i.e. one version back from main) labels May 15, 2024
@jughosta jughosta self-assigned this May 15, 2024
@jughosta jughosta changed the title [Discover] Fix doc viewer logic [Discover] Fix JSON view height in DocViewer May 15, 2024
@jughosta
Copy link
Contributor Author

/ci

@jughosta jughosta requested a review from kertal May 15, 2024 07:50
@jughosta jughosta marked this pull request as ready for review May 15, 2024 07:50
@jughosta jughosta requested a review from a team as a code owner May 15, 2024 07:50
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-data-discovery (Team:DataDiscovery)

@kertal kertal added Feature:Discover Discover Application Feature:UnifiedDocViewer Issues relating to the unified doc viewer component labels May 15, 2024
Copy link
Member

@kertal kertal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thx for the quick fix. Tested locally, works as expected now

Discover_-Elastic_und_Discover-_Elastic

One note, that's not blocking but for future iterations. the new margin bottom makes sense for the flyout, but adds redundant padding for the doc view page. Something to consider, because the height calculation might make sense to re-use when migrating the table to EuiDataGrid.
Elastic

@jughosta
Copy link
Contributor Author

@kertal I extracted the padding change into a separate PR as it does not need to be backported #183478

And I will try to improve JSON view on Single Document page as a part of #175787

@kibana-ci
Copy link
Collaborator

💚 Build Succeeded

Metrics [docs]

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
unifiedDocViewer 860.0KB 860.0KB +1.0B

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

cc @jughosta

@jughosta jughosta merged commit 994b8c2 into elastic:main May 15, 2024
17 checks passed
@jughosta jughosta deleted the fix-doc-viewer-logic branch May 15, 2024 11:06
kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request May 15, 2024
- A fix after
https://github.com/elastic/kibana/pull/180370/files#diff-ed350967c6564d64f0123a2d55700b1ddc7f5d6fcb3786384fb7ae25334fe9eaL672

## Summary

This PR fixes the height of JSON block in DocViewer. ~Also it reduces
the available height as the flyout now has a footer with Close button.~

(cherry picked from commit 994b8c2)
@kibanamachine
Copy link
Contributor

💚 All backports created successfully

Status Branch Result
8.14

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 May 15, 2024
# Backport

This will backport the following commits from `main` to `8.14`:
- [[Discover] Fix JSON view height in DocViewer
(#183468)](#183468)

<!--- Backport version: 9.4.3 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Julia
Rechkunova","email":"julia.rechkunova@elastic.co"},"sourceCommit":{"committedDate":"2024-05-15T11:06:24Z","message":"[Discover]
Fix JSON view height in DocViewer (#183468)\n\n- A fix
after\r\nhttps://github.com//pull/180370/files#diff-ed350967c6564d64f0123a2d55700b1ddc7f5d6fcb3786384fb7ae25334fe9eaL672\r\n\r\n##
Summary\r\n\r\nThis PR fixes the height of JSON block in DocViewer.
~Also it reduces\r\nthe available height as the flyout now has a footer
with Close
button.~","sha":"994b8c2beab211e15facff3eec3676d8e96bcbea","branchLabelMapping":{"^v8.15.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Feature:Discover","release_note:skip","Team:DataDiscovery","backport:prev-minor","Feature:UnifiedDocViewer","v8.15.0"],"title":"[Discover]
Fix JSON view height in
DocViewer","number":183468,"url":"https://github.com/elastic/kibana/pull/183468","mergeCommit":{"message":"[Discover]
Fix JSON view height in DocViewer (#183468)\n\n- A fix
after\r\nhttps://github.com//pull/180370/files#diff-ed350967c6564d64f0123a2d55700b1ddc7f5d6fcb3786384fb7ae25334fe9eaL672\r\n\r\n##
Summary\r\n\r\nThis PR fixes the height of JSON block in DocViewer.
~Also it reduces\r\nthe available height as the flyout now has a footer
with Close
button.~","sha":"994b8c2beab211e15facff3eec3676d8e96bcbea"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v8.15.0","branchLabelMappingKey":"^v8.15.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/183468","number":183468,"mergeCommit":{"message":"[Discover]
Fix JSON view height in DocViewer (#183468)\n\n- A fix
after\r\nhttps://github.com//pull/180370/files#diff-ed350967c6564d64f0123a2d55700b1ddc7f5d6fcb3786384fb7ae25334fe9eaL672\r\n\r\n##
Summary\r\n\r\nThis PR fixes the height of JSON block in DocViewer.
~Also it reduces\r\nthe available height as the flyout now has a footer
with Close
button.~","sha":"994b8c2beab211e15facff3eec3676d8e96bcbea"}}]}]
BACKPORT-->

Co-authored-by: Julia Rechkunova <julia.rechkunova@elastic.co>
jughosta added a commit that referenced this pull request May 17, 2024
## Summary

This PR updates the bottom margin so the JSON view can be scrolled
properly inside DocViewer flyout. It's a follow up for
#183468 (fixes the scrolling to be
limited to flyout height) and
#166406 (taller footer was added
with Close button in it).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:prev-minor Backport to (8.x) the previous minor version (i.e. one version back from main) Feature:Discover Discover Application Feature:UnifiedDocViewer Issues relating to the unified doc viewer component release_note:skip Skip the PR/issue when compiling release notes Team:DataDiscovery Discover, search (e.g. data plugin and KQL), data views, saved searches. For ES|QL, use Team:ES|QL. v8.14.0 v8.15.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants