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

[ML] Fixes responsive layout for Trained Models table #181541

Merged
merged 4 commits into from
Apr 24, 2024

Conversation

darnautov
Copy link
Contributor

@darnautov darnautov commented Apr 24, 2024

Summary

Closes #181530

  • Sets percentage width for all columns
  • Sets responsive breakpoint
  • Makes Deployment stats table responsive as well

Apr-24-2024 12-16-48

Checklist

@darnautov darnautov self-assigned this Apr 24, 2024
@darnautov darnautov requested a review from a team as a code owner April 24, 2024 10:18
@elasticmachine
Copy link
Contributor

Pinging @elastic/ml-ui (:ml)

@@ -768,7 +767,7 @@ export const ModelsList: FC<Props> = ({
<EuiSpacer size="m" />
<div data-test-subj="mlModelsTableContainer">
<EuiInMemoryTable<ModelItem>
css={{ overflowX: 'auto' }}
responsiveBreakpoint={'xl'}
Copy link
Member

Choose a reason for hiding this comment

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

The downloads text overflows when the width is reduced to below 1200px.

image

I think this xl limit is too high as 1200px isn't that small. The table is still readable at that width.
Setting this to l rather than xl would be better IMO.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@jgowdyelastic

  • Download action has been fixed in 9436c2f

  • This is how the table looks with the l breakpoint. The state column does not look good

image

Copy link
Member

Choose a reason for hiding this comment

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

Ok cool. Yeah that overflow was the biggest issue.
I still think 1200px is a bit high of a limit to be switching over to the other view, but I don't feel that strongly about it.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I also don't have a strong opinion on this, let's ask @qn895 :)

Copy link
Contributor

Choose a reason for hiding this comment

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

Testing this, I'm leaning towards sticking with xl.

Copy link
Member

Choose a reason for hiding this comment

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

I think the screenshot as is looks better for 1200px 👍 If we want to go extra we can do some logic to only show partial info (like maybe just the colored dots) but that's also hiding important information. So for now this LGTM.

@peteharverson peteharverson requested review from qn895 and removed request for peteharverson April 24, 2024 11:00
@darnautov darnautov requested a review from jgowdyelastic April 24, 2024 11:33
Copy link
Member

@jgowdyelastic jgowdyelastic left a comment

Choose a reason for hiding this comment

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

LGTM

@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
ml 4.1MB 4.1MB -106.0B

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

cc @darnautov

@qn895
Copy link
Member

qn895 commented Apr 24, 2024

LGTM 🎉

@darnautov darnautov merged commit d5999c3 into elastic:main Apr 24, 2024
16 checks passed
@darnautov darnautov deleted the ml-181530-fix-responsive-layout branch April 24, 2024 14:29
@kibanamachine
Copy link
Contributor

💔 All backports failed

Status Branch Result
8.14 Backport failed because of merge conflicts

Manual backport

To create the backport manually run:

node scripts/backport --pr 181541

Questions ?

Please refer to the Backport tool documentation

@darnautov
Copy link
Contributor Author

💚 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

darnautov added a commit to darnautov/kibana that referenced this pull request Apr 24, 2024
## Summary

Closes elastic#181530

- Sets percentage width for all columns
- Sets responsive breakpoint
- Makes Deployment stats table responsive as well

![Apr-24-2024
12-16-48](https://github.com/elastic/kibana/assets/5236598/2a14ffb9-de15-45e9-b8bc-276e10080864)

### Checklist

- [x] 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))
- [x] This was checked for [cross-browser
compatibility](https://www.elastic.co/support/matrix#matrix_browsers)

(cherry picked from commit d5999c3)

# Conflicts:
#	x-pack/plugins/ml/public/application/model_management/models_list.tsx
kpatticha pushed a commit to kpatticha/kibana that referenced this pull request Apr 26, 2024
## Summary

Closes elastic#181530

- Sets percentage width for all columns
- Sets responsive breakpoint 
- Makes Deployment stats table responsive as well 

![Apr-24-2024
12-16-48](https://github.com/elastic/kibana/assets/5236598/2a14ffb9-de15-45e9-b8bc-276e10080864)


### Checklist

- [x] 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))
- [x] This was checked for [cross-browser
compatibility](https://www.elastic.co/support/matrix#matrix_browsers)
darnautov added a commit that referenced this pull request May 2, 2024
…181602)

# Backport

This will backport the following commits from `main` to `8.14`:
- [[ML] Fix responsive layout for Trained Models table
(#181541)](#181541)

<!--- Backport version: 8.9.8 -->

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

<!--BACKPORT [{"author":{"name":"Dima
Arnautov","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-04-24T14:29:06Z","message":"[ML]
Fix responsive layout for Trained Models table (#181541)\n\n##
Summary\r\n\r\nCloses
https://github.com/elastic/kibana/issues/181530\r\n\r\n- Sets percentage
width for all columns\r\n- Sets responsive breakpoint \r\n- Makes
Deployment stats table responsive as well
\r\n\r\n![Apr-24-2024\r\n12-16-48](https://github.com/elastic/kibana/assets/5236598/2a14ffb9-de15-45e9-b8bc-276e10080864)\r\n\r\n\r\n###
Checklist\r\n\r\n- [x] 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-
[x] This was checked for
[cross-browser\r\ncompatibility](https://www.elastic.co/support/matrix#matrix_browsers)","sha":"d5999c339a615a4e7cbd23741747dffa984da678","branchLabelMapping":{"^v8.15.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:fix",":ml","Feature:3rd
Party
Models","Team:ML","v8.14.0","v8.15.0"],"number":181541,"url":"https://github.com/elastic/kibana/pull/181541","mergeCommit":{"message":"[ML]
Fix responsive layout for Trained Models table (#181541)\n\n##
Summary\r\n\r\nCloses
https://github.com/elastic/kibana/issues/181530\r\n\r\n- Sets percentage
width for all columns\r\n- Sets responsive breakpoint \r\n- Makes
Deployment stats table responsive as well
\r\n\r\n![Apr-24-2024\r\n12-16-48](https://github.com/elastic/kibana/assets/5236598/2a14ffb9-de15-45e9-b8bc-276e10080864)\r\n\r\n\r\n###
Checklist\r\n\r\n- [x] 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-
[x] This was checked for
[cross-browser\r\ncompatibility](https://www.elastic.co/support/matrix#matrix_browsers)","sha":"d5999c339a615a4e7cbd23741747dffa984da678"}},"sourceBranch":"main","suggestedTargetBranches":["8.14"],"targetPullRequestStates":[{"branch":"8.14","label":"v8.14.0","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v8.15.0","labelRegex":"^v8.15.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/181541","number":181541,"mergeCommit":{"message":"[ML]
Fix responsive layout for Trained Models table (#181541)\n\n##
Summary\r\n\r\nCloses
https://github.com/elastic/kibana/issues/181530\r\n\r\n- Sets percentage
width for all columns\r\n- Sets responsive breakpoint \r\n- Makes
Deployment stats table responsive as well
\r\n\r\n![Apr-24-2024\r\n12-16-48](https://github.com/elastic/kibana/assets/5236598/2a14ffb9-de15-45e9-b8bc-276e10080864)\r\n\r\n\r\n###
Checklist\r\n\r\n- [x] 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-
[x] This was checked for
[cross-browser\r\ncompatibility](https://www.elastic.co/support/matrix#matrix_browsers)","sha":"d5999c339a615a4e7cbd23741747dffa984da678"}}]}]
BACKPORT-->

Co-authored-by: Kibana Machine <[email protected]>
@szabosteve szabosteve changed the title [ML] Fix responsive layout for Trained Models table [ML] Fixes responsive layout for Trained Models table Jul 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[ML] Responsive layout for Trained Models UI
7 participants