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

[App Search] Migrate expanded rows for meta engines table in Engines Overview #96251

Merged
merged 23 commits into from
Apr 14, 2021

Conversation

byronhulcher
Copy link
Contributor

@byronhulcher byronhulcher commented Apr 5, 2021

Summary

Migrates the expanded rows from the Meta Engines table containing information about the source engines and their conflicts for each meta engine. This required the creation of a new MetaEnginesTable component, with its own logic file responsible for retrieving the source engines for each meta engine from the API when the user requests it. We also have some logic to inform the user about schema conflicts, and which source engines are responsible for them.

On mobile this is usable but having a responsive table inside a responsive table is a little rough. This could be a good candidate for a design pass later.

Screenshots

Screen Shot 2021-04-05 at 3 28 00 PM

Checklist

Comment on lines 9 to 17
@include euiBreakpoint('l', 'xl') {
.euiTableRowCell {
border-top: none;
}

.euiTitle {
display: none;
}
}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Is there a better way to accomplish this?

Copy link
Member

Choose a reason for hiding this comment

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

After thinking about this and how the expanded row works I don't think so, currently. One possible option would be to not nest an EuiBasicTable within the expanded row and instead try to directly use cell components, e.g. <EuiTableRowCell> - but then you lose some of the automatic mobile UX that comes with the basic table.

I think this is fine for now, especially since after testing the expanded row behavior in a screenreader, it appears that EUI's implementation of expanded rows has a known issue where screen readers cannot dive into the expanded row, so it's not really possible to test this accessibility-wise anyway.

It might be interesting to revisit it someday to try and compare implementations, but I'm definitely good with a nested table for now (which I learned today is semantically valid! 🤯)

@byronhulcher byronhulcher marked this pull request as ready for review April 5, 2021 21:55
@byronhulcher byronhulcher requested a review from a team April 5, 2021 21:55
@byronhulcher byronhulcher added auto-backport Deprecated - use backport:version if exact versions are needed release_note:skip Skip the PR/issue when compiling release notes v7.14.0 labels Apr 5, 2021
@byronhulcher byronhulcher self-assigned this Apr 5, 2021
Copy link
Member

@cee-chen cee-chen left a comment

Choose a reason for hiding this comment

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

General folder architecture request: Can we move all table-related components/logic/styles to its own directory? I'm fine with either:

engines/
|_ components/
  |_tables/
    |- engines_table.tsx
    |- meta_engines_table_expansion.tsx
    |- meta_engines_table_logic.tsx
    |- meta_engines_table.tsx
    |_ // etc.

or skipping components/ and just giving it its own tables/ dir

engines/
|_ tables/
  |- engines_table.tsx
  |- meta_engines_table_expansion.tsx
  |- meta_engines_table_logic.tsx
  |- meta_engines_table.tsx
  |_ // etc.

LMK what you think!

On another shared architecture note - I'd love it if the shared columns between the 2 tables got pulled out to a columns.tsx or shared_columns.tsx file rather than only living in engines_table.tsx - I think that will make it easier to find/see when exploring the component from a directory POV.

Copy link
Member

@cee-chen cee-chen left a comment

Choose a reason for hiding this comment

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

First pass of feedback - I have a few more subjective or higher level thoughts/suggestions, but need to stop for today - will come back to this tomorrow!

@byronhulcher
Copy link
Contributor Author

General folder architecture request: [...]

If so, can we DRY this out to a shared types.ts file that lives under the new tables/ folder I proposed in my earlier comment?

Yes to both of these.

Thanks for reviewing this so far @constancecchen, I'm going to be pushing updates in response to this review, but will anticipate another round from you today/next week.

@byronhulcher
Copy link
Contributor Author

Hey @constancecchen I've pushed some updates based on your feedback. Let me know what else I can do to improve this. Even if we decide to have you take over the PR I still think I could do another round today.

Copy link
Member

@cee-chen cee-chen left a comment

Choose a reason for hiding this comment

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

Here's an optional round of feedback that contain a few higher-level / more complex questions/requests. If those would take too long to do, definitely feel free to say you'd rather defer and I can grab it in a follow-up PR or take over the PR. Alternatively if you're strongly not a fan, I'd love to hear your thoughts

@byronhulcher
Copy link
Contributor Author

Hey @constancecchen another round your way. I hit some of the suggestions you made in the third round of feedback, but passed on the ones involving abstraction. I've given you access to this remote repo, its up to you if you'd rather take over the branch or do a follow-up PR, I'm happy either way as long as this is in 7.13 😎

@byronhulcher
Copy link
Contributor Author

@elasticmachine merge upstream

@byronhulcher
Copy link
Contributor Author

@elasticmachine merge upstream

@byronhulcher
Copy link
Contributor Author

@elasticmachine merge upstream

@cee-chen cee-chen enabled auto-merge (squash) April 13, 2021 23:12
@kibanamachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
enterpriseSearch 1332 1348 +16

Async chunks

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

id before after diff
enterpriseSearch 2.0MB 2.0MB +11.0KB

History

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

cc @byronhulcher

@cee-chen cee-chen merged commit 71672c4 into elastic:master Apr 14, 2021
@kibanamachine
Copy link
Contributor

💔 Backport failed

Status Branch Result
7.14 The branch "7.14" is invalid or doesn't exist

To backport manually run:
node scripts/backport --pr 96251

jloleysens added a commit to jloleysens/kibana that referenced this pull request Apr 14, 2021
…ax_primary_shard_size

* 'master' of github.com:elastic/kibana: (99 commits)
  added missing optional chain for bracket notation (elastic#96939)
  [Discover][DocViewer] Fix toggle columns from doc viewer table tab (elastic#95748)
  [TSVB] Fix per-request caching of index patterns (elastic#97043)
  [Datatable] Fix filter cell flakiness (elastic#96934)
  Unskip heatmap suite and fixes flakiness (elastic#96941)
  [Fleet] Improve performance of data stream API (elastic#97058)
  [ML] Data Frame Analytics: remove beta badge (elastic#96977)
  [App Search] Migrate expanded rows for meta engines table in Engines Overview (elastic#96251)
  Instances latency distribution chart tooltips and axis fixes (elastic#95577)
  [Monitoring] Using primary average shard size (elastic#96177)
  [Workplace Search] Hide Kibana chrome on 3rd party connector redirects (elastic#97028)
  ## [Security Solution] Fixes `Exit full screen` and `Copy to cliboard` styling issues (elastic#96676)
  Index pattern field editor - Add warning on name or type change (elastic#95528)
  [App Search] Add small engine breadcrumb utility helper (elastic#96917)
  Copy esArchiver commands from ./reassign.ts to fix tests (elastic#97012)
  [Security Solution][Detections] Updates MITRE Tactics, Techniques, and Subtechniques for 7.13 (elastic#97011)
  Index patterns server - throw correct error on field caps 404 (elastic#95879)
  Use `EuiThemeProvider` in lists plugin tests and stories (elastic#96129)
  [npm] upgrade caniuse database (elastic#97002)
  chore(NA): moving @kbn/apm-utils into bazel (elastic#96227)
  ...

# Conflicts:
#	x-pack/plugins/index_lifecycle_management/__jest__/client_integration/edit_policy/serialization/policy_serialization.test.ts
#	x-pack/plugins/index_lifecycle_management/public/application/sections/edit_policy/form/schema.ts
phillipb added a commit to phillipb/kibana that referenced this pull request Apr 14, 2021
…to-metrics-tab

* 'master' of github.com:elastic/kibana: (61 commits)
  [Usage collection] Usage counters (elastic#96696)
  UI actions readme (elastic#96925)
  [TSVB] Enable brush for visualizations created with no index patterns (elastic#96727)
  [Data telemetry] Add Async Search to the tests (elastic#96693)
  added missing optional chain for bracket notation (elastic#96939)
  [Discover][DocViewer] Fix toggle columns from doc viewer table tab (elastic#95748)
  [TSVB] Fix per-request caching of index patterns (elastic#97043)
  [Datatable] Fix filter cell flakiness (elastic#96934)
  Unskip heatmap suite and fixes flakiness (elastic#96941)
  [Fleet] Improve performance of data stream API (elastic#97058)
  [ML] Data Frame Analytics: remove beta badge (elastic#96977)
  [App Search] Migrate expanded rows for meta engines table in Engines Overview (elastic#96251)
  Instances latency distribution chart tooltips and axis fixes (elastic#95577)
  [Monitoring] Using primary average shard size (elastic#96177)
  [Workplace Search] Hide Kibana chrome on 3rd party connector redirects (elastic#97028)
  ## [Security Solution] Fixes `Exit full screen` and `Copy to cliboard` styling issues (elastic#96676)
  Index pattern field editor - Add warning on name or type change (elastic#95528)
  [App Search] Add small engine breadcrumb utility helper (elastic#96917)
  Copy esArchiver commands from ./reassign.ts to fix tests (elastic#97012)
  [Security Solution][Detections] Updates MITRE Tactics, Techniques, and Subtechniques for 7.13 (elastic#97011)
  ...
@cee-chen cee-chen added v7.13.0 and removed v7.14.0 labels Apr 14, 2021
@cee-chen
Copy link
Member

Will take care of the manual backport for this: #97123

cee-chen pushed a commit that referenced this pull request Apr 14, 2021
…Overview (#96251) (#97123)

* Pull out columns to be re-used for MetaEnginesTable

* Add route to get source engines for meta engines

* New MetaEnginesTableLogic

* New MetaEnginesTable component

* Remove isMeta prop from EnginesTable

* Swap EnginesTable with MetaEnginesTable in EnginesOverview for meta engines

* Missing test for MetaEnginesTableNameColumnContent

* Created new /app_search/components/engines/components/tables directory

* Moving columns to shared_columns.tsx file

* Updates to MetaEnginesTableExpandedRow and MetaEnginesTableNameColumnContent

* Fixes to EnginesTable, MetaEnginesTable, MetaEnginesTableLogic

* Remove flatten import

* Fix i18n

* PR Feedback

* DRY out shared engine link helpers

* DRY out shared ACTIONS_COLUMN

* Tests: DRY out shared columns/props tests

+ update to account for 2 previous DRY commits (e.g. deleteEngine mock)

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Constance Chen <constance.chen.3@gmail.com>

Co-authored-by: Byron Hulcher <byronhulcher@gmail.com>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
madirey pushed a commit to madirey/kibana that referenced this pull request May 11, 2021
…Overview (elastic#96251)

* Pull out columns to be re-used for MetaEnginesTable

* Add route to get source engines for meta engines

* New MetaEnginesTableLogic

* New MetaEnginesTable component

* Remove isMeta prop from EnginesTable

* Swap EnginesTable with MetaEnginesTable in EnginesOverview for meta engines

* Missing test for MetaEnginesTableNameColumnContent

* Created new /app_search/components/engines/components/tables directory

* Moving columns to shared_columns.tsx file

* Updates to MetaEnginesTableExpandedRow and MetaEnginesTableNameColumnContent

* Fixes to EnginesTable, MetaEnginesTable, MetaEnginesTableLogic

* Remove flatten import

* Fix i18n

* PR Feedback

* DRY out shared engine link helpers

* DRY out shared ACTIONS_COLUMN

* Tests: DRY out shared columns/props tests

+ update to account for 2 previous DRY commits (e.g. deleteEngine mock)

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Constance Chen <constance.chen.3@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auto-backport Deprecated - use backport:version if exact versions are needed release_note:skip Skip the PR/issue when compiling release notes v7.13.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants