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] Deangularize classic table #104361

Merged
merged 50 commits into from
Aug 10, 2021

Conversation

dimaanj
Copy link
Contributor

@dimaanj dimaanj commented Jul 5, 2021

Closes #103444

Summary

  • legacy angular directives of classic doc table replaced with appropriate react components
  • layout adjusted, but user interface remains the same (exсect embeddable pagination view and doc viewer style adjusting)
  • tested manually in Chrome, FF and Safari (MacOS) for main table, context page and embeddable

Before

Classic table

7100C34C-F717-436A-AA79-F074B79CFD44

Data grid

C7894CB7-79F4-49D7-83AD-5465A6561CC1_4_5005_c

After

Classic table

845526CC-F5F5-4BBE-8F47-5E53BF4BD06D

Data grid

44827032-358B-4982-B470-DB312AA25E80

Checklist

@dimaanj dimaanj added the Feature:Discover Discover Application label Jul 5, 2021
@dimaanj dimaanj self-assigned this Jul 5, 2021
@dimaanj dimaanj requested review from kertal and majagrubic July 6, 2021 07:48
@dimaanj
Copy link
Contributor Author

dimaanj commented Jul 6, 2021

@elasticmachine merge upstream

@dimaanj
Copy link
Contributor Author

dimaanj commented Jul 7, 2021

@elasticmachine merge upstream

@dimaanj
Copy link
Contributor Author

dimaanj commented Jul 9, 2021

@elasticmachine merge upstream

@dimaanj dimaanj requested a review from timroes July 12, 2021 18:39
…id-of-angular-for-classic-table

# Conflicts:
#	src/plugins/discover/public/application/angular/doc_table/doc_table.test.js
@dimaanj
Copy link
Contributor Author

dimaanj commented Jul 14, 2021

@elasticmachine merge upstream

@dimaanj dimaanj added v7.15.0 release_note:skip Skip the PR/issue when compiling release notes labels Jul 14, 2021
Copy link
Contributor

@ryankeairns ryankeairns left a comment

Choose a reason for hiding this comment

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

I should have rolled my two comments into this review (1- regarding the 1% width on kbnDocTableCell--extraWidth and 2- a reply to removing the display rule on kbnDocViewer__value).

Once those are addressed, then I think we are good from the design side. Thanks

@kertal
Copy link
Member

kertal commented Aug 4, 2021

@ryankeairns I noted 1 difference to the angular world while testing, so now classic grid on Dashboard uses Roboto (Like in Discover) as font while before it was Inter. is this fine / intended?
for_testing_saved_searches_-Elastic_und_for_testing_saved_searches-_Elastic

Copy link
Contributor

@majagrubic majagrubic left a comment

Choose a reason for hiding this comment

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

Reviewing, some initial comments/questions...

@ryankeairns
Copy link
Contributor

@ryankeairns I noted 1 difference to the angular world while testing, so now classic grid on Dashboard uses Roboto (Like in Discover) as font while before it was Inter. is this fine / intended?
for_testing_saved_searches_-Elastic_und_for_testing_saved_searches-_Elastic

I'm not aware of the history, but I believe the table should look the same in Dashboard as it does in Discover. In my opinion, that was a 'bug' prior to this change.

@kertal
Copy link
Member

kertal commented Aug 5, 2021

@ryankeairns I noted 1 difference to the angular world while testing, so now classic grid on Dashboard uses Roboto (Like in Discover) as font while before it was Inter. is this fine / intended?
for_testing_saved_searches_-Elastic_und_for_testing_saved_searches-_Elastic

I'm not aware of the history, but I believe the table should look the same in Dashboard as it does in Discover. In my opinion, that was a 'bug' prior to this change.

Agreed, think it's better this way 👍

@dimaanj
Copy link
Contributor Author

dimaanj commented Aug 6, 2021

I should have rolled my two comments into this review (1- regarding the 1% width on kbnDocTableCell--extraWidth and 2- a reply to removing the display rule on kbnDocViewer__value).

Once those are addressed, then I think we are good from the design side. Thanks

Regarding width: 1% for time field cells. @ryankeairns, I have found that in Firefox (90.0.2 version was used), time column width growing, which leads to unexpected table layout jumps, see video below.

ff-issue.mp4

…id-of-angular-for-classic-table

# Conflicts:
#	src/plugins/discover/public/application/angular/doc_table/components/table_header.ts
#	src/plugins/discover/public/application/apps/main/components/doc_table/lib/row_formatter.test.ts
Copy link
Contributor

@ryankeairns ryankeairns left a comment

Choose a reason for hiding this comment

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

Thanks for fixing things. I've reviewed the related PR you mentioned to me as well.
Andrea may have an outstanding comment, but looks good from me.

@dimaanj
Copy link
Contributor Author

dimaanj commented Aug 9, 2021

@elasticmachine merge upstream

@kertal
Copy link
Member

kertal commented Aug 10, 2021

@elasticmachine merge upstream

@kibanamachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
discover 421 429 +8

Async chunks

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

id before after diff
discover 509.8KB 554.0KB +44.2KB

Page load bundle

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

id before after diff
discover 93.7KB 93.8KB +113.0B

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.

Did a final testing focused on Firefox, did several testings before using Chrome, Safari. LGTM! Works as expected Congrats! Great work, this a big step forward 🦶 !

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.

LGTM

@kertal kertal added the auto-backport Deprecated - use backport:version if exact versions are needed label Aug 10, 2021
@dimaanj dimaanj merged commit 328c36d into elastic:master Aug 10, 2021
@dimaanj dimaanj deleted the get-rid-of-angular-for-classic-table branch August 10, 2021 15:21
dimaanj added a commit to dimaanj/kibana that referenced this pull request Aug 11, 2021
* [Discover] move angular directives to react compoenents

* [Discover] add support of infiniteScroll

* [Discover] support paginated classic table

* [Discover] refactor docTable component, remove redundant angular code

* [Discover] remove redundant files

* [Discover] fix some functional tests and pgination

* [Discover] fix functionals

* [Discover] code refactoring, adding tests

* [Discover] update tests

* [Discover] fix embeddable view of doc table

* [Discover] update pagination view

* [Discover] remove unused translations

* [Discover] improve readability, fix pagination

* [Discover] adjust isFilterable check

* [Discover] improve doc viewer table row display

* [Discover] clean up implementation, fix functional test

* [Discover] fix skip button

* [Discover] update test snapshot

* [Discover] update test

* [Discover] simplify pagination, update layout in embeddable

* [Discover] fix functional, remove redundant i18n translations

* [Discover] return indexPatternField

* [Discover] add support of fixed footer for embeddable

* [Discover] move doc_table to apps/components folder, update test

* [Discover] fix imports

* [Discover] update imports, beautify code

* Update src/plugins/discover/public/application/apps/main/components/doc_table/doc_table_wrapper.tsx

Co-authored-by: Tim Roes <[email protected]>

* [Discover] remove redundant styles

* [Discover] fix lining

* [Discover] fix discover grid embeddable

* [Discover] fix by comments

* [Discover] return extraWidth, describe the problem

* [Discover] fix unresolved conflicts

Co-authored-by: Kibana Machine <[email protected]>
Co-authored-by: Tim Roes <[email protected]>
# Conflicts:
#	test/functional/apps/discover/_doc_table.ts
dimaanj added a commit that referenced this pull request Aug 11, 2021
* [Discover] move angular directives to react compoenents

* [Discover] add support of infiniteScroll

* [Discover] support paginated classic table

* [Discover] refactor docTable component, remove redundant angular code

* [Discover] remove redundant files

* [Discover] fix some functional tests and pgination

* [Discover] fix functionals

* [Discover] code refactoring, adding tests

* [Discover] update tests

* [Discover] fix embeddable view of doc table

* [Discover] update pagination view

* [Discover] remove unused translations

* [Discover] improve readability, fix pagination

* [Discover] adjust isFilterable check

* [Discover] improve doc viewer table row display

* [Discover] clean up implementation, fix functional test

* [Discover] fix skip button

* [Discover] update test snapshot

* [Discover] update test

* [Discover] simplify pagination, update layout in embeddable

* [Discover] fix functional, remove redundant i18n translations

* [Discover] return indexPatternField

* [Discover] add support of fixed footer for embeddable

* [Discover] move doc_table to apps/components folder, update test

* [Discover] fix imports

* [Discover] update imports, beautify code

* Update src/plugins/discover/public/application/apps/main/components/doc_table/doc_table_wrapper.tsx

Co-authored-by: Tim Roes <[email protected]>

* [Discover] remove redundant styles

* [Discover] fix lining

* [Discover] fix discover grid embeddable

* [Discover] fix by comments

* [Discover] return extraWidth, describe the problem

* [Discover] fix unresolved conflicts

Co-authored-by: Kibana Machine <[email protected]>
Co-authored-by: Tim Roes <[email protected]>
# Conflicts:
#	test/functional/apps/discover/_doc_table.ts
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 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
None yet
Development

Successfully merging this pull request may close these issues.

[Discover] Deangularize classic table
8 participants