Skip to content

[ML] File upload lite UI customizations#213275

Merged
jgowdyelastic merged 7 commits intoelastic:mainfrom
jgowdyelastic:file-upload-lite-UI-customizations
Mar 6, 2025
Merged

[ML] File upload lite UI customizations#213275
jgowdyelastic merged 7 commits intoelastic:mainfrom
jgowdyelastic:file-upload-lite-UI-customizations

Conversation

@jgowdyelastic
Copy link
Member

@jgowdyelastic jgowdyelastic commented Mar 5, 2025

Adds the ability to customise the flyout's title and description.
Adds expandable rows to the file list to be able to see the summary and file content. No formatting is applied to semi-structured text files.
Adds the ability to set an initial index name which is used to populate the index name input. The user can then edit this afterwards.

To test in playground, this file can be edited to add:

flyoutContent: {
  showFileSummary: true,
  showFileContentPreview: true,
  title: i18n.translate('xpack.searchPlayground.setupPage.uploadFileFlyoutTitle', {
    defaultMessage: 'Upload a file!!!',
  }),
  description: i18n.translate('xpack.searchPlayground.setupPage.uploadFileFlyoutTitle', {
    defaultMessage: 'Upload a file test test test test',
  }),
},
initialIndexName: 'test',

Changes added for #213525

@jgowdyelastic jgowdyelastic marked this pull request as ready for review March 6, 2025 09:42
@jgowdyelastic jgowdyelastic requested a review from a team as a code owner March 6, 2025 09:42
@elasticmachine
Copy link
Contributor

Pinging @elastic/ml-ui (:ml)

Copy link
Contributor

@darnautov darnautov left a comment

Choose a reason for hiding this comment

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

LGTM

@peteharverson
Copy link
Contributor

Probably not related to the changes in this PR, but what about having some padding between the file name and file size here?

Screenshot 2025-03-06 at 13 06 21
@jgowdyelastic jgowdyelastic added release_note:skip Skip the PR/issue when compiling release notes and removed release_note:enhancement labels Mar 6, 2025
@jgowdyelastic
Copy link
Member Author

jgowdyelastic commented Mar 6, 2025

Probably not related to the changes in this PR, but what about having some padding between the file name and file size here?

This is a mistake. I incorrectly removed a space in a previous edit.
Fixed in 58d5145

<EuiDescriptionList
type="column"
columnWidths={[15, 85]}
columnWidths={[30, 70]}
Copy link
Contributor

Choose a reason for hiding this comment

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

Could this go to 50, 50 to reduce the likelihood the text of the first row wraps? The lengths of the number of lines / file type field values should always be fairly short shouldn't they?

Screenshot 2025-03-06 at 13 15 06
Copy link
Member Author

Choose a reason for hiding this comment

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

Updated in 75af43e
image

Copy link
Contributor

@peteharverson peteharverson left a comment

Choose a reason for hiding this comment

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

Latest changes LGTM

@elasticmachine
Copy link
Contributor

💛 Build succeeded, but was flaky

Failed CI Steps

Test Failures

  • [job] [logs] FTR Configs #113 / discover/context_awareness extension getAdditionalCellActions data view mode should render additional cell actions for logs data source

Metrics [docs]

Public APIs missing comments

Total count of every public API that lacks a comment. Target amount is 0. Run node scripts/build_api_docs --plugin [yourplugin] --stats comments for more detailed information.

id before after diff
@kbn/file-upload-common 14 16 +2

Async chunks

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

id before after diff
dataVisualizer 613.1KB 617.2KB +4.0KB

Public APIs missing exports

Total count of every type that is part of your API that should be exported but is not. This will cause broken links in the API documentation system. Target amount is 0. Run node scripts/build_api_docs --plugin [yourplugin] --stats exports for more detailed information.

id before after diff
@kbn/file-upload-common 0 1 +1

Page load bundle

Size of the bundles that are downloaded on every page load. Target size is below 100kb

id before after diff
dataVisualizer 28.0KB 28.1KB +139.0B
Unknown metric groups

API count

id before after diff
@kbn/file-upload-common 14 16 +2

History

cc @jgowdyelastic

@jgowdyelastic jgowdyelastic merged commit 308e181 into elastic:main Mar 6, 2025
10 checks passed
@kibanamachine
Copy link
Contributor

Starting backport for target branches: 8.x

https://github.com/elastic/kibana/actions/runs/13701890009

kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Mar 6, 2025
@kibanamachine
Copy link
Contributor

💚 All backports created successfully

Status Branch Result
8.x

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 Mar 6, 2025
# Backport

This will backport the following commits from `main` to `8.x`:
- [[ML] File upload lite UI customizations
(#213275)](#213275)

<!--- Backport version: 9.6.6 -->

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

<!--BACKPORT [{"author":{"name":"James
Gowdy","email":"jgowdy@elastic.co"},"sourceCommit":{"committedDate":"2025-03-06T15:12:39Z","message":"[ML]
File upload lite UI customizations
(#213275)","sha":"308e1815da5027d4b1944f22d309346f3a75b278","branchLabelMapping":{"^v9.1.0$":"main","^v8.19.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":[":ml","release_note:skip","Feature:File
and Index Data Viz","Feature:File
Upload","backport:version","v9.1.0","v8.19.0"],"title":"[ML] File upload
lite UI
customizations","number":213275,"url":"https://github.com/elastic/kibana/pull/213275","mergeCommit":{"message":"[ML]
File upload lite UI customizations
(#213275)","sha":"308e1815da5027d4b1944f22d309346f3a75b278"}},"sourceBranch":"main","suggestedTargetBranches":["8.x"],"targetPullRequestStates":[{"branch":"main","label":"v9.1.0","branchLabelMappingKey":"^v9.1.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/213275","number":213275,"mergeCommit":{"message":"[ML]
File upload lite UI customizations
(#213275)","sha":"308e1815da5027d4b1944f22d309346f3a75b278"}},{"branch":"8.x","label":"v8.19.0","branchLabelMappingKey":"^v8.19.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

Co-authored-by: James Gowdy <jgowdy@elastic.co>
CAWilson94 pushed a commit to CAWilson94/kibana that referenced this pull request Mar 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport:version Backport to applied version labels Feature:File and Index Data Viz ML file and index data visualizer Feature:File Upload :ml release_note:skip Skip the PR/issue when compiling release notes v8.19.0 v9.1.0

5 participants