Skip to content

Conversation

@jgowdyelastic
Copy link
Member

@jgowdyelastic jgowdyelastic commented Nov 27, 2025

Remakes the file upload section of the lookup join flyout.

2025-12-02.13-58-34.2025-12-02.13_59_31.mp4

jgowdyelastic and others added 30 commits November 27, 2025 15:31
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.

Tested and LGTM

Copy link
Contributor

@sddonne sddonne left a comment

Choose a reason for hiding this comment

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

LGTM!

return;
}
pipeline.processors.push({
pipeline.processors!.push({
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: Maybe we could get rid of this non-null assertion by also checking for the pipeline.processors in the if above?

Copy link
Contributor

Choose a reason for hiding this comment

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

Or perhaps processors can be non-optional in x-pack/platform/packages/shared/file-upload-common/src/types.ts? I saw some more non-null assertions.

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 8ab0e64

Comment on lines 72 to 74
{i18n.translate('xpack.fileUpload.mappingEditor.fieldNameLabel', {
defaultMessage: 'Field name',
})}
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
{i18n.translate('xpack.fileUpload.mappingEditor.fieldNameLabel', {
defaultMessage: 'Field name',
})}
<FormattedMessage {...} />```

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 8ab0e64

Comment on lines 79 to 81
{i18n.translate('xpack.fileUpload.mappingEditor.fieldTypeLabel', {
defaultMessage: 'Field type',
})}
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
{i18n.translate('xpack.fileUpload.mappingEditor.fieldTypeLabel', {
defaultMessage: 'Field type',
})}
<FormattedMessage {...} />```

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 8ab0e64

Comment on lines +58 to +62
useEffect(() => {
if (uploadStatus.overallImportStatus === STATUS.COMPLETED) {
setStep('finish', STATUS.COMPLETED);
}
}, [uploadStatus.overallImportStatus, setStep]);
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
useEffect(() => {
if (uploadStatus.overallImportStatus === STATUS.COMPLETED) {
setStep('finish', STATUS.COMPLETED);
}
}, [uploadStatus.overallImportStatus, setStep]);
const isFinished = uploadStatus.overallImportStatus === STATUS.COMPLETED;

It would mean removing the finish step from the stepsStatus state, but we could get rid of the useEffect.

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 8ab0e64

Comment on lines 68 to 79
useEffect(() => {
setFileUploadActive(true);
return () => {
setFileUploadActive(false);
};
}, [setFileUploadActive]);

useEffect(() => {
if (filesStatus.length === 0) {
setFileUploadActive(false);
}
}, [filesStatus, setFileUploadActive]);
Copy link
Contributor

Choose a reason for hiding this comment

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

I wonder if we could combine it into one useEffect such as

Suggested change
useEffect(() => {
setFileUploadActive(true);
return () => {
setFileUploadActive(false);
};
}, [setFileUploadActive]);
useEffect(() => {
if (filesStatus.length === 0) {
setFileUploadActive(false);
}
}, [filesStatus, setFileUploadActive]);
useEffect(() => {
setFileUploadActive(filesStatus.length > 0);
return () => {
setFileUploadActive(false);
};
}, [deps]);

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 8ab0e64

? uploadStatus.allDocsSearchable === true
? STATUS.COMPLETED
: STATUS.STARTED
: stepsStatus.finish
Copy link
Contributor

Choose a reason for hiding this comment

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

this might require an update after the recent changes, no? As the stepsStatus.finish would be always STATUS.NOT_STARTED.

Copy link
Member Author

Choose a reason for hiding this comment

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

I've reverted this change d836641
To avoid introducing any last minute bugs

@jgowdyelastic jgowdyelastic enabled auto-merge (squash) December 10, 2025 16:35
@jgowdyelastic jgowdyelastic merged commit f10c1fc into elastic:main Dec 11, 2025
13 checks passed
@kibanamachine kibanamachine added backport:skip This PR does not require backporting and removed backport:version Backport to applied version labels labels Dec 11, 2025
@elasticmachine
Copy link
Contributor

💛 Build succeeded, but was flaky

Failed CI Steps

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
dataVisualizer 856 855 -1
esql 523 525 +2
ml 4192 4187 -5
total -4

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 103 86 -17

Async chunks

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

id before after diff
dataVisualizer 598.7KB 600.1KB +1.4KB
esql 683.2KB 682.3KB -924.0B
ml 5.6MB 5.6MB -6.0KB
total -5.5KB

Page load bundle

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

id before after diff
dataVisualizer 29.3KB 29.1KB -144.0B
Unknown metric groups

API count

id before after diff
@kbn/file-upload 103 113 +10

async chunk count

id before after diff
ml 111 110 -1

ESLint disabled line counts

id before after diff
@kbn/file-upload 8 9 +1

Total ESLint disabled count

id before after diff
@kbn/file-upload 8 9 +1

History

cc @jgowdyelastic

andrimal pushed a commit to andrimal/kibana that referenced this pull request Dec 11, 2025
Remakes the file upload section of the lookup join flyout.


https://github.com/user-attachments/assets/c50085d0-b4ea-47ce-8830-8fd0c509960f

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
seanrathier pushed a commit to seanrathier/kibana that referenced this pull request Dec 15, 2025
Remakes the file upload section of the lookup join flyout.


https://github.com/user-attachments/assets/c50085d0-b4ea-47ce-8830-8fd0c509960f

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
@peteharverson peteharverson changed the title [File upload] Lookup join file upload redesign [File upload] Redesign of the file upload section of the lookup join flyout Dec 16, 2025
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.

7 participants