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] Replace doc viewer table with EuiInMemoryTable #102149

Merged
merged 31 commits into from
Jun 29, 2021

Conversation

dimaanj
Copy link
Contributor

@dimaanj dimaanj commented Jun 15, 2021

Closes #86757

Summary

  • replace doc viewer table with eiuInMemoryTable

Large screen devices

C5065CCB-4A3B-4A06-8E0C-49E18341A5E1_1_105_c

Medium screen devices

6FBA9491-4C2E-45E8-AF3D-B5A5E42FB906

Mobile devices

C5226CFA-D003-4419-A91C-796C21974714

Checklist

@dimaanj dimaanj added the Feature:Discover Discover Application label Jun 15, 2021
@dimaanj dimaanj requested a review from kertal June 15, 2021 04:34
@dimaanj dimaanj self-assigned this Jun 15, 2021
@dimaanj
Copy link
Contributor Author

dimaanj commented Jun 17, 2021

@elasticmachine merge upstream

@kibanamachine
Copy link
Contributor

merge conflict between base and head

@kertal
Copy link
Member

kertal commented Jun 18, 2021

I've checked it out and played with it and so far it works pretty well, I'm adding some questions about design when using the new table FYI @andreadelrio @ryankeairns
Discover_-_Elastic_und_Discover_-_Elastic_und_Slack___kibana___Elastic

So this is what I would call the "breaking" change, the built in responsiveness of the EUI component, adding @shaunmcgough @timroes for awareness (As we know, old component, hasn't changed significantly in a long while)
Discover_-_Elastic_und_Discover_-_Elastic

@dmitriynj
I think in the legacy world JSON content was kind of formatted:
Bildschirmfoto 2021-06-18 um 14 36 10

@timroes
Copy link
Contributor

timroes commented Jun 18, 2021

Regarding the responsive view. I am not sure this will be really benefitial for users, since it's wasting A LOT of whitespace. I'd suggest we disable this for now (as far as I remember there is a property to disable responsive behavior on the table), and evaluate that separate how we might want to design that screen in a better responsive way.

…ve-ui-doc-viewer

# Conflicts:
#	src/plugins/discover/public/application/components/table/table.test.tsx
#	src/plugins/discover/public/application/components/table/table.tsx
@andreadelrio
Copy link
Contributor

I've checked it out and played with it and so far it works pretty well, I'm adding some questions about design when using the new table FYI @andreadelrio @ryankeairns
Discover_-_Elastic_und_Discover_-_Elastic_und_Slack___kibana___Elastic

So this is what I would call the "breaking" change, the built in responsiveness of the EUI component, adding @shaunmcgough @timroes for awareness (As we know, old component, hasn't changed significantly in a long while)
Discover_-_Elastic_und_Discover_-_Elastic

I just checked this on smaller screens as well. IMO, the table loses a lot of usability unless responsive is set to true. My recommendation would be to enable EuiInMemoryTable's built in responsiveness while we figure out a better alternative. Yes, there's a lot of white space but at least it feels somewhat more usable and doesn't feel broken.

For medium sized devices I think we should remove truncation from the field name and let the badge wrap. It would look like this:

Frame 75

@dimaanj dimaanj added v7.14.0 v8.0.0 release_note:feature Makes this part of the condensed release notes release_note:skip Skip the PR/issue when compiling release notes Team:Visualizations Visualization editors, elastic-charts and infrastructure and removed release_note:feature Makes this part of the condensed release notes labels Jun 21, 2021
@dimaanj dimaanj requested a review from majagrubic June 21, 2021 10:52
@dimaanj dimaanj marked this pull request as ready for review June 21, 2021 10:55
@dimaanj
Copy link
Contributor Author

dimaanj commented Jun 25, 2021

@elasticmachine merge upstream

@dimaanj
Copy link
Contributor Author

dimaanj commented Jun 27, 2021

@elasticmachine merge upstream

@kertal kertal requested a review from wylieconlon June 28, 2021 14:41
@kertal
Copy link
Member

kertal commented Jun 28, 2021

@wylieconlon also can't reproduce the issues you're reported, can you pls check again? many thx!

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.

While playing around with it I found a regression that the action column is displayed in the "stand alone mode" (View single document link in the main table)

Discover_-_Elastic

Copy link
Contributor

@wylieconlon wylieconlon left a comment

Choose a reason for hiding this comment

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

Yes, my layout issues are resolved now. I am also seeing the bug that @kertal is reporting about the lack of actions in standalone mode.

fieldName={fieldName}
fieldMapping={fieldMapping}
flattenedField={flattenedField}
onFilter={onFilter!}
Copy link
Contributor Author

@dimaanj dimaanj Jun 28, 2021

Choose a reason for hiding this comment

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

Type casting for onFilter callback is safe here, due to ACTIONS_COLUMN will not be used when onFilter is undefined. See howtableColumns memoized array defined.

Copy link
Contributor

@andreadelrio andreadelrio left a comment

Choose a reason for hiding this comment

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

Design changes LGTM 🎉

</EuiToolTip>
</EuiFlexItem>

{isMultiField && (
Copy link
Contributor

Choose a reason for hiding this comment

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

Nice addition!

},
}));
const component = mountComponent(props);

const categoryKeywordRow = findTestSubject(component, 'tableDocViewRow-category.keyword');
Copy link
Contributor

Choose a reason for hiding this comment

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

Since the implementation has changed a bit, should be testing for the lack of multifieldBadge here, same as in the previous test?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good point! Added.

@kibanamachine
Copy link
Contributor

💛 Build succeeded, but was flaky


Test Failures

Kibana Pipeline / general / X-Pack Accessibility Tests.x-pack/test/accessibility/apps/spaces·ts.Kibana spaces page meets a11y validations a11y test for space selection page

Link to Jenkins

Standard Out

Failed Tests Reporter:
  - Test has failed 3 times on tracked branches: https://github.com/elastic/kibana/issues/100968

[00:00:00]       │
[00:02:15]         └-: Kibana spaces page meets a11y validations
[00:02:15]           └-> "before all" hook for "a11y test for manage spaces menu from top nav on Kibana home"
[00:02:15]           └-> "before all" hook for "a11y test for manage spaces menu from top nav on Kibana home"
[00:02:15]             │ info [x-pack/test/functional/es_archives/empty_kibana] Loading "mappings.json"
[00:02:15]             │ info [o.e.c.m.MetadataDeleteIndexService] [kibana-ci-immutable-ubuntu-16-tests-xxl-1624955976227686286] [.kibana_task_manager_8.0.0_001/lc3JKcjPT6KMQrEkIoywKQ] deleting index
[00:02:15]             │ info [o.e.c.m.MetadataDeleteIndexService] [kibana-ci-immutable-ubuntu-16-tests-xxl-1624955976227686286] [.kibana_1/pltFv207Tv6psFMRAd5oHg] deleting index
[00:02:15]             │ info [o.e.c.m.MetadataDeleteIndexService] [kibana-ci-immutable-ubuntu-16-tests-xxl-1624955976227686286] [.kibana_8.0.0_001/STNbXj3URHK1sYTXMwdXkg] deleting index
[00:02:15]             │ info [x-pack/test/functional/es_archives/empty_kibana] Deleted existing index ".kibana_8.0.0_001"
[00:02:15]             │ info [x-pack/test/functional/es_archives/empty_kibana] Deleted existing index ".kibana_task_manager_8.0.0_001"
[00:02:15]             │ info [x-pack/test/functional/es_archives/empty_kibana] Deleted existing index ".kibana_1"
[00:02:15]             │ info [o.e.c.m.MetadataCreateIndexService] [kibana-ci-immutable-ubuntu-16-tests-xxl-1624955976227686286] [.kibana_1] creating index, cause [api], templates [], shards [1]/[1]
[00:02:15]             │ info [x-pack/test/functional/es_archives/empty_kibana] Created index ".kibana_1"
[00:02:15]             │ debg [x-pack/test/functional/es_archives/empty_kibana] ".kibana_1" settings {"index":{"number_of_replicas":"1","number_of_shards":"1"}}
[00:02:15]             │ debg Migrating saved objects
[00:02:15]             │ proc [kibana]   log   [09:04:53.995] [info][savedobjects-service] [.kibana_task_manager] INIT -> CREATE_NEW_TARGET. took: 6ms.
[00:02:15]             │ proc [kibana]   log   [09:04:54.004] [info][savedobjects-service] [.kibana] INIT -> WAIT_FOR_YELLOW_SOURCE. took: 19ms.
[00:02:15]             │ info [o.e.c.m.MetadataCreateIndexService] [kibana-ci-immutable-ubuntu-16-tests-xxl-1624955976227686286] [.kibana_task_manager_8.0.0_001] creating index, cause [api], templates [], shards [1]/[1]
[00:02:15]             │ info [o.e.c.r.a.AllocationService] [kibana-ci-immutable-ubuntu-16-tests-xxl-1624955976227686286] updating number_of_replicas to [0] for indices [.kibana_task_manager_8.0.0_001]
[00:02:15]             │ proc [kibana]   log   [09:04:54.010] [info][savedobjects-service] [.kibana] WAIT_FOR_YELLOW_SOURCE -> SET_SOURCE_WRITE_BLOCK. took: 6ms.
[00:02:15]             │ info [o.e.c.m.MetadataIndexStateService] [kibana-ci-immutable-ubuntu-16-tests-xxl-1624955976227686286] adding block write to indices [[.kibana_1/AOqnHn8vRAKWIrAHIx38Uw]]
[00:02:15]             │ info [o.e.c.m.MetadataIndexStateService] [kibana-ci-immutable-ubuntu-16-tests-xxl-1624955976227686286] completed adding block write to indices [.kibana_1]
[00:02:15]             │ proc [kibana]   log   [09:04:54.111] [info][savedobjects-service] [.kibana_task_manager] CREATE_NEW_TARGET -> MARK_VERSION_INDEX_READY. took: 116ms.
[00:02:15]             │ proc [kibana]   log   [09:04:54.133] [info][savedobjects-service] [.kibana] SET_SOURCE_WRITE_BLOCK -> CREATE_REINDEX_TEMP. took: 123ms.
[00:02:15]             │ proc [kibana]   log   [09:04:54.162] [info][savedobjects-service] [.kibana_task_manager] MARK_VERSION_INDEX_READY -> DONE. took: 51ms.
[00:02:15]             │ proc [kibana]   log   [09:04:54.162] [info][savedobjects-service] [.kibana_task_manager] Migration completed after 173ms
[00:02:15]             │ info [o.e.c.m.MetadataCreateIndexService] [kibana-ci-immutable-ubuntu-16-tests-xxl-1624955976227686286] [.kibana_8.0.0_reindex_temp] creating index, cause [api], templates [], shards [1]/[1]
[00:02:15]             │ info [o.e.c.r.a.AllocationService] [kibana-ci-immutable-ubuntu-16-tests-xxl-1624955976227686286] updating number_of_replicas to [0] for indices [.kibana_8.0.0_reindex_temp]
[00:02:15]             │ proc [kibana]   log   [09:04:54.228] [info][savedobjects-service] [.kibana] CREATE_REINDEX_TEMP -> REINDEX_SOURCE_TO_TEMP_OPEN_PIT. took: 95ms.
[00:02:15]             │ proc [kibana]   log   [09:04:54.233] [info][savedobjects-service] [.kibana] REINDEX_SOURCE_TO_TEMP_OPEN_PIT -> REINDEX_SOURCE_TO_TEMP_READ. took: 5ms.
[00:02:15]             │ proc [kibana]   log   [09:04:54.240] [info][savedobjects-service] [.kibana] REINDEX_SOURCE_TO_TEMP_READ -> REINDEX_SOURCE_TO_TEMP_CLOSE_PIT. took: 7ms.
[00:02:15]             │ proc [kibana]   log   [09:04:54.244] [info][savedobjects-service] [.kibana] REINDEX_SOURCE_TO_TEMP_CLOSE_PIT -> SET_TEMP_WRITE_BLOCK. took: 4ms.
[00:02:15]             │ info [o.e.c.m.MetadataIndexStateService] [kibana-ci-immutable-ubuntu-16-tests-xxl-1624955976227686286] adding block write to indices [[.kibana_8.0.0_reindex_temp/jTAZoRa2QWmKwa13bTyZaw]]
[00:02:15]             │ info [o.e.c.m.MetadataIndexStateService] [kibana-ci-immutable-ubuntu-16-tests-xxl-1624955976227686286] completed adding block write to indices [.kibana_8.0.0_reindex_temp]
[00:02:15]             │ proc [kibana]   log   [09:04:54.300] [info][savedobjects-service] [.kibana] SET_TEMP_WRITE_BLOCK -> CLONE_TEMP_TO_TARGET. took: 56ms.
[00:02:15]             │ info [o.e.c.m.MetadataCreateIndexService] [kibana-ci-immutable-ubuntu-16-tests-xxl-1624955976227686286] applying create index request using existing index [.kibana_8.0.0_reindex_temp] metadata
[00:02:15]             │ info [o.e.c.m.MetadataCreateIndexService] [kibana-ci-immutable-ubuntu-16-tests-xxl-1624955976227686286] [.kibana_8.0.0_001] creating index, cause [clone_index], templates [], shards [1]/[1]
[00:02:15]             │ info [o.e.c.r.a.AllocationService] [kibana-ci-immutable-ubuntu-16-tests-xxl-1624955976227686286] updating number_of_replicas to [0] for indices [.kibana_8.0.0_001]
[00:02:15]             │ info [o.e.c.m.MetadataMappingService] [kibana-ci-immutable-ubuntu-16-tests-xxl-1624955976227686286] [.kibana_8.0.0_001/rqwrhy1ARdOQNdMcmGyxrQ] create_mapping
[00:02:15]             │ proc [kibana]   log   [09:04:54.424] [info][savedobjects-service] [.kibana] CLONE_TEMP_TO_TARGET -> REFRESH_TARGET. took: 124ms.
[00:02:15]             │ proc [kibana]   log   [09:04:54.429] [info][savedobjects-service] [.kibana] REFRESH_TARGET -> OUTDATED_DOCUMENTS_SEARCH_OPEN_PIT. took: 5ms.
[00:02:15]             │ proc [kibana]   log   [09:04:54.434] [info][savedobjects-service] [.kibana] OUTDATED_DOCUMENTS_SEARCH_OPEN_PIT -> OUTDATED_DOCUMENTS_SEARCH_READ. took: 5ms.
[00:02:15]             │ proc [kibana]   log   [09:04:54.441] [info][savedobjects-service] [.kibana] OUTDATED_DOCUMENTS_SEARCH_READ -> OUTDATED_DOCUMENTS_SEARCH_CLOSE_PIT. took: 7ms.
[00:02:15]             │ proc [kibana]   log   [09:04:54.444] [info][savedobjects-service] [.kibana] OUTDATED_DOCUMENTS_SEARCH_CLOSE_PIT -> UPDATE_TARGET_MAPPINGS. took: 3ms.
[00:02:15]             │ info [o.e.c.m.MetadataMappingService] [kibana-ci-immutable-ubuntu-16-tests-xxl-1624955976227686286] [.kibana_8.0.0_001/rqwrhy1ARdOQNdMcmGyxrQ] update_mapping [_doc]
[00:02:15]             │ proc [kibana]   log   [09:04:54.526] [info][savedobjects-service] [.kibana] UPDATE_TARGET_MAPPINGS -> UPDATE_TARGET_MAPPINGS_WAIT_FOR_TASK. took: 82ms.
[00:02:15]             │ info [o.e.t.LoggingTaskListener] [kibana-ci-immutable-ubuntu-16-tests-xxl-1624955976227686286] 8209 finished with response BulkByScrollResponse[took=1.9ms,timed_out=false,sliceId=null,updated=0,created=0,deleted=0,batches=0,versionConflicts=0,noops=0,retries=0,throttledUntil=0s,bulk_failures=[],search_failures=[]]
[00:02:16]             │ proc [kibana]   log   [09:04:54.632] [info][savedobjects-service] [.kibana] UPDATE_TARGET_MAPPINGS_WAIT_FOR_TASK -> MARK_VERSION_INDEX_READY. took: 106ms.
[00:02:16]             │ info [o.e.c.m.MetadataDeleteIndexService] [kibana-ci-immutable-ubuntu-16-tests-xxl-1624955976227686286] [.kibana_8.0.0_reindex_temp/jTAZoRa2QWmKwa13bTyZaw] deleting index
[00:02:16]             │ proc [kibana]   log   [09:04:54.679] [info][savedobjects-service] [.kibana] MARK_VERSION_INDEX_READY -> DONE. took: 47ms.
[00:02:16]             │ proc [kibana]   log   [09:04:54.680] [info][savedobjects-service] [.kibana] Migration completed after 695ms
[00:02:16]             │ debg [x-pack/test/functional/es_archives/empty_kibana] Migrated Kibana index after loading Kibana data
[00:02:16]             │ debg [x-pack/test/functional/es_archives/empty_kibana] Ensured that default space exists in .kibana
[00:02:16]             │ debg applying update to kibana config: {"accessibility:disableAnimations":true,"dateFormat:tz":"UTC","visualization:visualize:legacyChartsLibrary":true,"visualization:visualize:legacyPieChartsLibrary":true}
[00:02:16]             │ info [o.e.c.m.MetadataMappingService] [kibana-ci-immutable-ubuntu-16-tests-xxl-1624955976227686286] [.kibana_8.0.0_001/rqwrhy1ARdOQNdMcmGyxrQ] update_mapping [_doc]
[00:02:18]             │ debg navigating to home url: http://localhost:61211/app/home#/
[00:02:18]             │ debg navigate to: http://localhost:61211/app/home#/
[00:02:18]             │ debg browser[INFO] http://localhost:61211/app/home?_t=1624957497371#/ 281 Refused to execute inline script because it violates the following Content Security Policy directive: "script-src 'unsafe-eval' 'self'". Either the 'unsafe-inline' keyword, a hash ('sha256-P5polb1UreUSOe5V/Pv7tc+yeZuJXiOi/3fqhGsU7BE='), or a nonce ('nonce-...') is required to enable inline execution.
[00:02:18]             │
[00:02:18]             │ debg browser[INFO] http://localhost:61211/bootstrap.js 41:19 "^ A single error about an inline script not firing due to content security policy is expected!"
[00:02:18]             │ debg ... sleep(700) start
[00:02:19]             │ debg ... sleep(700) end
[00:02:19]             │ debg returned from get, calling refresh
[00:02:20]             │ debg browser[INFO] http://localhost:61211/app/home?_t=1624957497371#/ 281 Refused to execute inline script because it violates the following Content Security Policy directive: "script-src 'unsafe-eval' 'self'". Either the 'unsafe-inline' keyword, a hash ('sha256-P5polb1UreUSOe5V/Pv7tc+yeZuJXiOi/3fqhGsU7BE='), or a nonce ('nonce-...') is required to enable inline execution.
[00:02:20]             │
[00:02:20]             │ debg browser[INFO] http://localhost:61211/bootstrap.js 41:19 "^ A single error about an inline script not firing due to content security policy is expected!"
[00:02:20]             │ debg currentUrl = http://localhost:61211/app/home#/
[00:02:20]             │          appUrl = http://localhost:61211/app/home#/
[00:02:20]             │ debg TestSubjects.find(kibanaChrome)
[00:02:20]             │ debg Find.findByCssSelector('[data-test-subj="kibanaChrome"]') with timeout=60000
[00:02:21]             │ debg ... sleep(501) start
[00:02:22]             │ debg ... sleep(501) end
[00:02:22]             │ debg in navigateTo url = http://localhost:61211/app/home#/
[00:02:22]           └-> a11y test for manage spaces menu from top nav on Kibana home
[00:02:22]             └-> "before each" hook: global before each for "a11y test for manage spaces menu from top nav on Kibana home"
[00:02:22]             │ debg TestSubjects.click(space-avatar-default)
[00:02:22]             │ debg Find.clickByCssSelector('[data-test-subj="space-avatar-default"]') with timeout=10000
[00:02:22]             │ debg Find.findByCssSelector('[data-test-subj="space-avatar-default"]') with timeout=10000
[00:02:22]             │ debg Waiting up to 20000ms for Manage spaces option visible...
[00:02:22]             │ debg TestSubjects.exists(manageSpaces)
[00:02:22]             │ debg Find.existsByDisplayedByCssSelector('[data-test-subj="manageSpaces"]') with timeout=2500
[00:02:22]             │ debg --- retry.tryForTime error: stale element reference: element is not attached to the page document
[00:02:22]             │        (Session info: headless chrome=91.0.4472.114)
[00:02:23]             └- ✓ pass  (1.2s) "Kibana spaces page meets a11y validations a11y test for manage spaces menu from top nav on Kibana home"
[00:02:23]           └-> a11y test for manage spaces page
[00:02:23]             └-> "before each" hook: global before each for "a11y test for manage spaces page"
[00:02:23]             │ debg TestSubjects.click(manageSpaces)
[00:02:23]             │ debg Find.clickByCssSelector('[data-test-subj="manageSpaces"]') with timeout=10000
[00:02:23]             │ debg Find.findByCssSelector('[data-test-subj="manageSpaces"]') with timeout=10000
[00:02:23]             │ debg isGlobalLoadingIndicatorVisible
[00:02:23]             │ debg TestSubjects.exists(globalLoadingIndicator)
[00:02:23]             │ debg Find.existsByDisplayedByCssSelector('[data-test-subj="globalLoadingIndicator"]') with timeout=1500
[00:02:25]             │ debg --- retry.tryForTime error: [data-test-subj="globalLoadingIndicator"] is not displayed
[00:02:25]             │ debg TestSubjects.exists(globalLoadingIndicator-hidden)
[00:02:25]             │ debg Find.existsByCssSelector('[data-test-subj="globalLoadingIndicator-hidden"]') with timeout=100000
[00:02:25]             │ debg TestSubjects.find(globalToastList)
[00:02:25]             │ debg Find.findByCssSelector('[data-test-subj="globalToastList"]') with timeout=10000
[00:02:35]             │ debg Waiting up to 20000ms for Manage spaces page visible...
[00:02:35]             │ debg TestSubjects.exists(createSpace)
[00:02:35]             │ debg Find.existsByDisplayedByCssSelector('[data-test-subj="createSpace"]') with timeout=2500
[00:02:36]             └- ✓ pass  (12.5s) "Kibana spaces page meets a11y validations a11y test for manage spaces page"
[00:02:36]           └-> a11y test for click on create space page
[00:02:36]             └-> "before each" hook: global before each for "a11y test for click on create space page"
[00:02:36]             │ debg TestSubjects.click(createSpace)
[00:02:36]             │ debg Find.clickByCssSelector('[data-test-subj="createSpace"]') with timeout=10000
[00:02:36]             │ debg Find.findByCssSelector('[data-test-subj="createSpace"]') with timeout=10000
[00:02:36]             └- ✓ pass  (478ms) "Kibana spaces page meets a11y validations a11y test for click on create space page"
[00:02:36]           └-> a11y test for for customize space card
[00:02:36]             └-> "before each" hook: global before each for "a11y test for for customize space card"
[00:02:36]             │ debg TestSubjects.click(addSpaceName)
[00:02:36]             │ debg Find.clickByCssSelector('[data-test-subj="addSpaceName"]') with timeout=10000
[00:02:36]             │ debg Find.findByCssSelector('[data-test-subj="addSpaceName"]') with timeout=10000
[00:02:36]             │ debg TestSubjects.setValue(addSpaceName, space_a)
[00:02:36]             │ debg TestSubjects.click(addSpaceName)
[00:02:36]             │ debg Find.clickByCssSelector('[data-test-subj="addSpaceName"]') with timeout=10000
[00:02:36]             │ debg Find.findByCssSelector('[data-test-subj="addSpaceName"]') with timeout=10000
[00:02:36]             │ debg TestSubjects.click(space-avatar-space_a)
[00:02:36]             │ debg Find.clickByCssSelector('[data-test-subj="space-avatar-space_a"]') with timeout=10000
[00:02:36]             │ debg Find.findByCssSelector('[data-test-subj="space-avatar-space_a"]') with timeout=10000
[00:02:37]             └- ✓ pass  (1.1s) "Kibana spaces page meets a11y validations a11y test for for customize space card"
[00:02:37]           └-> a11y test for color picker
[00:02:37]           └-> a11y test for customize and reset space URL identifier
[00:02:37]             └-> "before each" hook: global before each for "a11y test for customize and reset space URL identifier"
[00:02:37]             │ debg TestSubjects.click(CustomizeOrReset)
[00:02:37]             │ debg Find.clickByCssSelector('[data-test-subj="CustomizeOrReset"]') with timeout=10000
[00:02:37]             │ debg Find.findByCssSelector('[data-test-subj="CustomizeOrReset"]') with timeout=10000
[00:02:38]             │ debg TestSubjects.click(CustomizeOrReset)
[00:02:38]             │ debg Find.clickByCssSelector('[data-test-subj="CustomizeOrReset"]') with timeout=10000
[00:02:38]             │ debg Find.findByCssSelector('[data-test-subj="CustomizeOrReset"]') with timeout=10000
[00:02:38]             └- ✓ pass  (1.1s) "Kibana spaces page meets a11y validations a11y test for customize and reset space URL identifier"
[00:02:38]           └-> a11y test for describe space text space
[00:02:38]             └-> "before each" hook: global before each for "a11y test for describe space text space"
[00:02:38]             │ debg TestSubjects.click(descriptionSpaceText)
[00:02:38]             │ debg Find.clickByCssSelector('[data-test-subj="descriptionSpaceText"]') with timeout=10000
[00:02:38]             │ debg Find.findByCssSelector('[data-test-subj="descriptionSpaceText"]') with timeout=10000
[00:02:39]             └- ✓ pass  (398ms) "Kibana spaces page meets a11y validations a11y test for describe space text space"
[00:02:39]           └-> a11y test for toggling an entire feature category
[00:02:39]             └-> "before each" hook: global before each for "a11y test for toggling an entire feature category"
[00:02:39]             │ debg TestSubjects.click(featureCategoryButton_kibana)
[00:02:39]             │ debg Find.clickByCssSelector('[data-test-subj="featureCategoryButton_kibana"]') with timeout=10000
[00:02:39]             │ debg Find.findByCssSelector('[data-test-subj="featureCategoryButton_kibana"]') with timeout=10000
[00:02:39]             │ debg Find.findByCssSelector('button[aria-controls=featureCategory_kibana]') with timeout=10000
[00:02:39]             │ debg TestSubjects.click(featureCategoryButton_kibana)
[00:02:39]             │ debg Find.clickByCssSelector('[data-test-subj="featureCategoryButton_kibana"]') with timeout=10000
[00:02:39]             │ debg Find.findByCssSelector('[data-test-subj="featureCategoryButton_kibana"]') with timeout=10000
[00:02:39]             └- ✓ pass  (798ms) "Kibana spaces page meets a11y validations a11y test for toggling an entire feature category"
[00:02:39]           └-> a11y test for space listing page
[00:02:39]             └-> "before each" hook: global before each for "a11y test for space listing page"
[00:02:39]             │ debg TestSubjects.click(save-space-button)
[00:02:39]             │ debg Find.clickByCssSelector('[data-test-subj="save-space-button"]') with timeout=10000
[00:02:39]             │ debg Find.findByCssSelector('[data-test-subj="save-space-button"]') with timeout=10000
[00:02:40]             │ info [o.e.c.m.MetadataMappingService] [kibana-ci-immutable-ubuntu-16-tests-xxl-1624955976227686286] [.kibana_8.0.0_001/rqwrhy1ARdOQNdMcmGyxrQ] update_mapping [_doc]
[00:02:40]             └- ✓ pass  (471ms) "Kibana spaces page meets a11y validations a11y test for space listing page"
[00:02:40]           └-> a11y test for updating a space
[00:02:40]             └-> "before each" hook: global before each for "a11y test for updating a space"
[00:02:40]             │ debg TestSubjects.click(space_a-editSpace)
[00:02:40]             │ debg Find.clickByCssSelector('[data-test-subj="space_a-editSpace"]') with timeout=10000
[00:02:40]             │ debg Find.findByCssSelector('[data-test-subj="space_a-editSpace"]') with timeout=10000
[00:02:41]             │ debg TestSubjects.click(cancel-space-button)
[00:02:41]             │ debg Find.clickByCssSelector('[data-test-subj="cancel-space-button"]') with timeout=10000
[00:02:41]             │ debg Find.findByCssSelector('[data-test-subj="cancel-space-button"]') with timeout=10000
[00:02:41]             └- ✓ pass  (1.1s) "Kibana spaces page meets a11y validations a11y test for updating a space"
[00:02:41]           └-> a11y test for delete space button
[00:02:41]             └-> "before each" hook: global before each for "a11y test for delete space button"
[00:02:41]             │ debg TestSubjects.click(createSpace)
[00:02:41]             │ debg Find.clickByCssSelector('[data-test-subj="createSpace"]') with timeout=10000
[00:02:41]             │ debg Find.findByCssSelector('[data-test-subj="createSpace"]') with timeout=10000
[00:02:41]             │ debg TestSubjects.click(addSpaceName)
[00:02:41]             │ debg Find.clickByCssSelector('[data-test-subj="addSpaceName"]') with timeout=10000
[00:02:41]             │ debg Find.findByCssSelector('[data-test-subj="addSpaceName"]') with timeout=10000
[00:02:41]             │ debg TestSubjects.setValue(addSpaceName, space_b)
[00:02:41]             │ debg TestSubjects.click(addSpaceName)
[00:02:41]             │ debg Find.clickByCssSelector('[data-test-subj="addSpaceName"]') with timeout=10000
[00:02:41]             │ debg Find.findByCssSelector('[data-test-subj="addSpaceName"]') with timeout=10000
[00:02:41]             │ debg TestSubjects.click(save-space-button)
[00:02:41]             │ debg Find.clickByCssSelector('[data-test-subj="save-space-button"]') with timeout=10000
[00:02:41]             │ debg Find.findByCssSelector('[data-test-subj="save-space-button"]') with timeout=10000
[00:02:41]             │ debg navigating to home url: http://localhost:61211/app/home#/
[00:02:41]             │ debg navigate to: http://localhost:61211/app/home#/
[00:02:42]             │ debg browser[INFO] http://localhost:61211/app/home?_t=1624957520550#/ 281 Refused to execute inline script because it violates the following Content Security Policy directive: "script-src 'unsafe-eval' 'self'". Either the 'unsafe-inline' keyword, a hash ('sha256-P5polb1UreUSOe5V/Pv7tc+yeZuJXiOi/3fqhGsU7BE='), or a nonce ('nonce-...') is required to enable inline execution.
[00:02:42]             │
[00:02:42]             │ debg browser[INFO] http://localhost:61211/bootstrap.js 41:19 "^ A single error about an inline script not firing due to content security policy is expected!"
[00:02:42]             │ debg ... sleep(700) start
[00:02:42]             │ debg ... sleep(700) end
[00:02:42]             │ debg returned from get, calling refresh
[00:02:43]             │ debg browser[INFO] http://localhost:61211/app/home?_t=1624957520550#/ 281 Refused to execute inline script because it violates the following Content Security Policy directive: "script-src 'unsafe-eval' 'self'". Either the 'unsafe-inline' keyword, a hash ('sha256-P5polb1UreUSOe5V/Pv7tc+yeZuJXiOi/3fqhGsU7BE='), or a nonce ('nonce-...') is required to enable inline execution.
[00:02:43]             │
[00:02:43]             │ debg browser[INFO] http://localhost:61211/bootstrap.js 41:19 "^ A single error about an inline script not firing due to content security policy is expected!"
[00:02:44]             │ debg currentUrl = http://localhost:61211/app/home#/
[00:02:44]             │          appUrl = http://localhost:61211/app/home#/
[00:02:44]             │ debg TestSubjects.find(kibanaChrome)
[00:02:44]             │ debg Find.findByCssSelector('[data-test-subj="kibanaChrome"]') with timeout=60000
[00:02:44]             │ debg ... sleep(501) start
[00:02:45]             │ debg ... sleep(501) end
[00:02:45]             │ debg in navigateTo url = http://localhost:61211/app/home#/
[00:02:45]             │ debg openSpacesNav()
[00:02:45]             │ debg TestSubjects.click(spacesNavSelector)
[00:02:45]             │ debg Find.clickByCssSelector('[data-test-subj="spacesNavSelector"]') with timeout=10000
[00:02:45]             │ debg Find.findByCssSelector('[data-test-subj="spacesNavSelector"]') with timeout=10000
[00:02:45]             │ info SpaceSelectorPage:clickSpaceAvatar(space_b)
[00:02:45]             │ debg TestSubjects.click(space-avatar-space_b)
[00:02:45]             │ debg Find.clickByCssSelector('[data-test-subj="space-avatar-space_b"]') with timeout=10000
[00:02:45]             │ debg Find.findByCssSelector('[data-test-subj="space-avatar-space_b"]') with timeout=10000
[00:02:46]             │ debg ... sleep(1000) start
[00:02:46]             │ debg browser[INFO] http://localhost:61211/s/space_b/app/home 281 Refused to execute inline script because it violates the following Content Security Policy directive: "script-src 'unsafe-eval' 'self'". Either the 'unsafe-inline' keyword, a hash ('sha256-P5polb1UreUSOe5V/Pv7tc+yeZuJXiOi/3fqhGsU7BE='), or a nonce ('nonce-...') is required to enable inline execution.
[00:02:46]             │
[00:02:46]             │ debg browser[INFO] http://localhost:61211/s/space_b/bootstrap.js 41:19 "^ A single error about an inline script not firing due to content security policy is expected!"
[00:02:47]             │ debg ... sleep(1000) end
[00:02:47]             │ debg isGlobalLoadingIndicatorVisible
[00:02:47]             │ debg TestSubjects.exists(globalLoadingIndicator)
[00:02:47]             │ debg Find.existsByDisplayedByCssSelector('[data-test-subj="globalLoadingIndicator"]') with timeout=1500
[00:02:48]             │ debg --- retry.tryForTime error: [data-test-subj="globalLoadingIndicator"] is not displayed
[00:02:49]             │ debg TestSubjects.exists(globalLoadingIndicator-hidden)
[00:02:49]             │ debg Find.existsByCssSelector('[data-test-subj="globalLoadingIndicator-hidden"]') with timeout=100000
[00:02:49]             │ debg openSpacesNav()
[00:02:49]             │ debg TestSubjects.click(spacesNavSelector)
[00:02:49]             │ debg Find.clickByCssSelector('[data-test-subj="spacesNavSelector"]') with timeout=10000
[00:02:49]             │ debg Find.findByCssSelector('[data-test-subj="spacesNavSelector"]') with timeout=10000
[00:02:49]             │ debg TestSubjects.click(manageSpaces)
[00:02:49]             │ debg Find.clickByCssSelector('[data-test-subj="manageSpaces"]') with timeout=10000
[00:02:49]             │ debg Find.findByCssSelector('[data-test-subj="manageSpaces"]') with timeout=10000
[00:02:49]             │ debg TestSubjects.click(space_b-deleteSpace)
[00:02:49]             │ debg Find.clickByCssSelector('[data-test-subj="space_b-deleteSpace"]') with timeout=10000
[00:02:49]             │ debg Find.findByCssSelector('[data-test-subj="space_b-deleteSpace"]') with timeout=10000
[00:02:50]             └- ✓ pass  (9.2s) "Kibana spaces page meets a11y validations a11y test for delete space button"
[00:02:50]           └-> a11y test for space selection page
[00:02:50]             └-> "before each" hook: global before each for "a11y test for space selection page"
[00:02:50]             │ debg TestSubjects.click(confirmModalConfirmButton)
[00:02:50]             │ debg Find.clickByCssSelector('[data-test-subj="confirmModalConfirmButton"]') with timeout=10000
[00:02:50]             │ debg Find.findByCssSelector('[data-test-subj="confirmModalConfirmButton"]') with timeout=10000
[00:02:51]             │ info Taking screenshot "/dev/shm/workspace/parallel/21/kibana/x-pack/test/functional/screenshots/failure/Kibana spaces page meets a11y validations a11y test for space selection page.png"
[00:02:51]             │ debg browser[INFO] http://localhost:61211/spaces/space_selector 281 Refused to execute inline script because it violates the following Content Security Policy directive: "script-src 'unsafe-eval' 'self'". Either the 'unsafe-inline' keyword, a hash ('sha256-P5polb1UreUSOe5V/Pv7tc+yeZuJXiOi/3fqhGsU7BE='), or a nonce ('nonce-...') is required to enable inline execution.
[00:02:51]             │
[00:02:51]             │ debg browser[INFO] http://localhost:61211/bootstrap.js 41:19 "^ A single error about an inline script not firing due to content security policy is expected!"
[00:02:51]             │ info Current URL is: http://localhost:61211/spaces/space_selector
[00:02:52]             │ info Saving page source to: /dev/shm/workspace/parallel/21/kibana/x-pack/test/functional/failure_debug/html/Kibana spaces page meets a11y validations a11y test for space selection page.html
[00:02:52]             └- ✖ fail: Kibana spaces page meets a11y validations a11y test for space selection page
[00:02:52]             │      JavascriptError: javascript error: document unloaded while waiting for result
[00:02:52]             │   (Session info: headless chrome=91.0.4472.114)
[00:02:52]             │       at Object.throwDecodedError (/dev/shm/workspace/parallel/21/kibana/node_modules/selenium-webdriver/lib/error.js:550:15)
[00:02:52]             │       at parseHttpResponse (/dev/shm/workspace/parallel/21/kibana/node_modules/selenium-webdriver/lib/http.js:565:13)
[00:02:52]             │       at Executor.execute (/dev/shm/workspace/parallel/21/kibana/node_modules/selenium-webdriver/lib/http.js:491:26)
[00:02:52]             │       at runMicrotasks (<anonymous>)
[00:02:52]             │       at processTicksAndRejections (internal/process/task_queues.js:95:5)
[00:02:52]             │       at Task.exec (/dev/shm/workspace/parallel/21/kibana/test/functional/services/remote/prevent_parallel_calls.ts:28:20)
[00:02:52]             │ 
[00:02:52]             │ 

Stack Trace

JavascriptError: javascript error: document unloaded while waiting for result
  (Session info: headless chrome=91.0.4472.114)
    at Object.throwDecodedError (/dev/shm/workspace/parallel/21/kibana/node_modules/selenium-webdriver/lib/error.js:550:15)
    at parseHttpResponse (/dev/shm/workspace/parallel/21/kibana/node_modules/selenium-webdriver/lib/http.js:565:13)
    at Executor.execute (/dev/shm/workspace/parallel/21/kibana/node_modules/selenium-webdriver/lib/http.js:491:26)
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (internal/process/task_queues.js:95:5)
    at Task.exec (/dev/shm/workspace/parallel/21/kibana/test/functional/services/remote/prevent_parallel_calls.ts:28:20) {
  remoteStacktrace: '#0 0x562fb0b1d949 <unknown>\n'
}

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
discover 366 377 +11

Async chunks

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

id before after diff
discover 428.4KB 422.2KB -6.3KB

Page load bundle

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

id before after diff
discover 88.3KB 93.0KB +4.7KB

History

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

cc @dmitriynj

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.

One last question, looks pretty well, tested locally in Firefox, Chrome, Safari, I noted one difference to the old version how it's treating empty values. I assume it's the how EuiInMemoryTable is treating such values? is this configurable?

Screenshot_29_06_21__12_36

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.

Approving, since the display of (empty) is unrelated to this PR, it's also on master. Tested locally in Chrome, Firefox, Safari. Works as expected. Great work! 🥳

@kertal
Copy link
Member

kertal commented Jun 29, 2021

Note about (empty), it was introduced here #102877

@dimaanj dimaanj merged commit 6c3019d into elastic:master Jun 29, 2021
@dimaanj dimaanj deleted the improve-ui-doc-viewer branch June 29, 2021 14:36
dimaanj added a commit to dimaanj/kibana that referenced this pull request Jun 29, 2021
…2149)

* [Discover] replace legacy table with euiInMemoryTable

* [Discover] update styles, add badge

* fix font in badge and adjust line height

* add tooltip

* [Discover] update unit tests, return actions column to left side

* [Discover] update field name test snapshot

* [Discover] update wording

* [Discover] handle pagination, return formatting value styles

* [Discover] fix failing stylelint error

* [Discover] return responsive prop, update classes

* [Discover] update test and meet formatting rules

* improve table view on medium

* remove extra file

* [Discover] fix unit test

* [Discover] align top vertically field name and action cells, disable table responsive design

* [Discover] adjust styles for cross browser compatibility

* [Discover] remove pagination optimize styles, update test

* [Discover] fix eslint

* [Discover] clean up styles

* [Discover] fix single doc view

* [Discover] add check lack of multifieldBadge

Co-authored-by: Andrea Del Rio <delrio.andre@gmail.com>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
@timroes timroes added v7.15.0 and removed v7.14.0 labels Jul 1, 2021
dimaanj added a commit that referenced this pull request Jul 1, 2021
…103678)

* [Discover] replace legacy table with euiInMemoryTable

* [Discover] update styles, add badge

* fix font in badge and adjust line height

* add tooltip

* [Discover] update unit tests, return actions column to left side

* [Discover] update field name test snapshot

* [Discover] update wording

* [Discover] handle pagination, return formatting value styles

* [Discover] fix failing stylelint error

* [Discover] return responsive prop, update classes

* [Discover] update test and meet formatting rules

* improve table view on medium

* remove extra file

* [Discover] fix unit test

* [Discover] align top vertically field name and action cells, disable table responsive design

* [Discover] adjust styles for cross browser compatibility

* [Discover] remove pagination optimize styles, update test

* [Discover] fix eslint

* [Discover] clean up styles

* [Discover] fix single doc view

* [Discover] add check lack of multifieldBadge

Co-authored-by: Andrea Del Rio <delrio.andre@gmail.com>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>

Co-authored-by: Andrea Del Rio <delrio.andre@gmail.com>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
@kertal kertal added this to In progress in Discover via automation Jul 6, 2021
@timroes timroes moved this from In progress to Done in Discover Jul 14, 2021
@dimaanj dimaanj mentioned this pull request Aug 9, 2021
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature:Discover Discover Application release_note:skip Skip the PR/issue when compiling release notes Team:Visualizations Visualization editors, elastic-charts and infrastructure v7.15.0 v8.0.0
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

[Discover] Replace doc viewer table with EuiInMemoryTable
9 participants