Skip to content

Conversation

@sddonne
Copy link
Contributor

@sddonne sddonne commented Nov 27, 2025

Part of #235730

Summary

  • New way of inserting rows and columns
  • Simplified layout
  • Rows height has been adjusted
  • We are now displaying 50 rows by default.

lookup

Checklist

@sddonne sddonne added Feature:ES|QL ES|QL related features in Kibana Team:ESQL ES|QL related features in Kibana t// v9.3.0 release_note:enhancement backport:skip This PR does not require backporting labels Nov 27, 2025
@sddonne sddonne marked this pull request as ready for review November 27, 2025 14:06
@sddonne sddonne requested review from a team as code owners November 27, 2025 14:06
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-esql (Team:ESQL)

@kibanamachine
Copy link
Contributor

Flaky Test Runner Stats

🎉 All tests passed! - kibana-flaky-test-suite-runner#9933

[✅] src/platform/test/functional/apps/discover/esql/config.ts: 50/50 tests passed.

see run history

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
esql 509 510 +1

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/discover-utils 389 390 +1

Async chunks

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

id before after diff
cloudSecurityPosture 643.0KB 643.2KB +212.0B
discover 1.2MB 1.2MB +212.0B
esql 669.7KB 672.9KB +3.2KB
esqlDataGrid 150.2KB 150.4KB +210.0B
securitySolution 11.1MB 11.1MB +210.0B
slo 987.9KB 988.1KB +212.0B
total +4.3KB
Unknown metric groups

API count

id before after diff
@kbn/discover-utils 451 452 +1

ESLint disabled line counts

id before after diff
@kbn/index-editor 4 3 -1

Total ESLint disabled count

id before after diff
@kbn/index-editor 4 3 -1

Copy link
Contributor

@davismcphee davismcphee left a comment

Choose a reason for hiding this comment

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

Data Discovery changes LGTM 👍

Also tested a bit locally and left a few comments, but nothing blocking. I haven't been testing the lookup editor much lately though so not sure how much of it existed before this PR.

Copy link
Contributor

Choose a reason for hiding this comment

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

I noticed a couple of cases where content was cut off.

First the header and remove button when uploading a CSV (also seems odd that we can collapse the section IMO):

And truncated cells in the table don't use and ellipsis and are just cut off:

Copy link
Contributor

Choose a reason for hiding this comment

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

I also encountered a couple of behaviours when editing columns that might be unexpected.

The first is that when I change a field type then cancel it, the cancelled selection is preserved when editing again:

change_field_type.mp4

The other is that after changing the field type of a column, the selection disappears when editing again:

change_field_type_2.mp4

Copy link
Contributor

Choose a reason for hiding this comment

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

I tested out the keyboard navigation and it works pretty well overall, but I noticed that once I focused on a select cell, I was stuck there. And when I tried to use the esc key to get out, it closed the whole flyout:

focus_select.mp4

Copy link
Contributor

Choose a reason for hiding this comment

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

And just a minor design nit. Feels like we could remove the margins to the left/right of the table header, and below the table. It just looks a bit misaligned right now imo.

Current:

Without margins:

Copy link
Contributor

@stratoula stratoula left a comment

Choose a reason for hiding this comment

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

Thanks Seb this looks very nice! Some small comments from me

customBulkActions={bulkActions}
rowLineHeightOverride={euiTheme.size.xl}
renderCustomToolbar={gridToolbar}
css={css`
Copy link
Contributor

Choose a reason for hiding this comment

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

We could declare them in another file and import them here for a cleaner component (nit)

`}
>
<FileDropzone noResults={noResults}>
{dataView ? (
Copy link
Contributor

Choose a reason for hiding this comment

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

This seems weird:

dataView && dataViewColumns ? (
                  <DataGridLazy
                    {...props}
                    dataView={dataView}
                    columns={dataViewColumns}
                    rows={rows}
                    totalHits={totalHits}
                    onOpenIndexInDiscover={props.onOpenIndexInDiscover}
                  />
                ) : (
                <EuiSkeletonText />
              )

Do this instead

dataView ? (
                dataViewColumns ? (
                  <DataGridLazy
                    {...props}
                    dataView={dataView}
                    columns={dataViewColumns}
                    rows={rows}
                    totalHits={totalHits}
                    onOpenIndexInDiscover={props.onOpenIndexInDiscover}
                  />
                ) : null
              ) : (
                <EuiSkeletonText />
              )

: validationError;
}, [validationError, columnName]);

const returnFocus = useCallback(() => {
Copy link
Contributor

Choose a reason for hiding this comment

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

This can be simplified

  const returnFocus = useCallback(() => {
    if (columnIndex === undefined) {
      return true;
    }

    requestAnimationFrame(() => {
      const headerWrapper = findElementBySelectorOrRef(`[${COLUMN_INDEX_PROP}="${columnIndex}"]`);
      headerWrapper?.focus();
    });

    return false;
  }, [columnIndex]);

isOpen={isColumnInEditMode}
closePopover={() => setEditingColumnIndex(null)}
isOpen={isPopoverOpen}
closePopover={() => closePopover()}
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
closePopover={() => closePopover()}
closePopover={closePopover}

import { i18n } from '@kbn/i18n';
import type { EditLookupIndexContentContext, KibanaContextExtra } from '../types';

const openInDiscoverText = i18n.translate('indexEditor.toolbar.openInDiscover', {
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
const openInDiscoverText = i18n.translate('indexEditor.toolbar.openInDiscover', {
const openInDiscoverTooltip = i18n.translate('indexEditor.toolbar.openInDiscoverTooltip', {

});

it('should calculate total width correctly for 2 controls', () => {
// Given
Copy link
Contributor

@stratoula stratoula Nov 28, 2025

Choose a reason for hiding this comment

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

This Given, when, then comments seem weird tbh, I see we do it in the other tests too but they are unnecessary imho, can we remove them?

Copy link
Contributor

Choose a reason for hiding this comment

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

Let's run the flaky runner to be sure that we don't introduce any flakiness

Copy link
Contributor

Choose a reason for hiding this comment

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

I have already a lookup index, I add a new column but I don't see the save button

image

Copy link
Contributor

@PhilippeOberti PhilippeOberti left a comment

Choose a reason for hiding this comment

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

LGTM for the @elastic/security-threat-hunting-investigations team

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport:skip This PR does not require backporting Feature:ES|QL ES|QL related features in Kibana release_note:enhancement Team:ESQL ES|QL related features in Kibana t// v9.3.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants