Skip to content

[8.x] [Lens][Embeddable] Make UI react faster to click actions like create or edit (#210810)#212052

Merged
dej611 merged 1 commit intoelastic:8.xfrom
dej611:backport/8.x/pr-210810
Mar 3, 2025
Merged

[8.x] [Lens][Embeddable] Make UI react faster to click actions like create or edit (#210810)#212052
dej611 merged 1 commit intoelastic:8.xfrom
dej611:backport/8.x/pr-210810

Conversation

@dej611
Copy link
Copy Markdown
Contributor

@dej611 dej611 commented Feb 21, 2025

Backport

This will backport the following commits from main to 8.x:

Questions ?

Please refer to the Backport tool documentation

Fixes elastic#198754

Restore previous removed tests when performing the refactor.
The new tests take advantage of the new architecture to be more modular
and close to the logic modules.

The `data_loader` tests are not just covering the re-render logic but
also some `expression_params` logic, who in the past have proven to be
the source of some bugs: specifically the tests will check that the
params are correctly passed to the params logic and then stored
correctly in the observable.

New mocks take advantage of the plain initializers to build some of the
API, that will make it in sync with the actual implementation for future
maintenance.

Check the PR satisfies following conditions.

- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Marta Bondyra <4283304+mbondyra@users.noreply.github.com>
(cherry picked from commit 41950c2)
@dej611 dej611 added the backport This PR is a backport of another PR label Feb 21, 2025
@dej611 dej611 enabled auto-merge (squash) February 21, 2025 11:41
@elasticmachine
Copy link
Copy Markdown
Contributor

💚 Build Succeeded

Metrics [docs]

Async chunks

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

id before after diff
lens 1.5MB 1.5MB -9.7KB

Page load bundle

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

id before after diff
lens 49.0KB 58.6KB +9.6KB

@dej611 dej611 merged commit d7aa703 into elastic:8.x Mar 3, 2025
SoniaSanzV pushed a commit to SoniaSanzV/kibana that referenced this pull request Mar 4, 2025
…reate or edit (elastic#210810) (elastic#212052)

# Backport

This will backport the following commits from `main` to `8.x`:
- [[Lens][Embeddable] Make UI react faster to click actions like create
or edit (elastic#210810)](elastic#210810)

<!--- Backport version: 9.6.4 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sorenlouv/backport)

<!--BACKPORT [{"author":{"name":"Marco
Liberati","email":"dej611@users.noreply.github.com"},"sourceCommit":{"committedDate":"2025-02-20T17:19:46Z","message":"[Lens][Embeddable]
Make UI react faster to click actions like create or edit
(elastic#210810)\n\n## Summary\n\nThis PR is based on the idea in elastic#209361 and
tries to improve perceived\nperformances for all the scenarios where the
`editorFrame` is loaded.\n\nOn fast connections this is now perceived
very
fast:\n\n![esql_fast](https://github.com/user-attachments/assets/efb26416-bf15-449e-912f-a689c689c593)\n\nOn
Fast 4g is still
fast\n\n![esql_fast_4g](https://github.com/user-attachments/assets/acc199be-683d-4a4b-a53c-f37a9117c258)\n\nOn
Slow 4g is
acceptable\n\n\n![esql_slow_4g](https://github.com/user-attachments/assets/6fed9ec4-dc3f-4557-976c-91d82bddc10f)\n\nEven
on 3G connection the feedback is much better
now\n\n\n![esql_3g](https://github.com/user-attachments/assets/27e96c01-9149-4dd1-8a6d-e005202149ff)\n\nAs
a bonus extra tests have been added for the ES|QL creation flow.\n\ncc
@thomasneirynck @nreese \n\n### Checklist\n\n- [x] [Unit or
functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere
updated or added to match the most common
scenarios\n\n---------\n\nCo-authored-by: Nick Partridge
<nick.ryan.partridge@gmail.com>","sha":"1e92ae8afbec96f437040a7d3147b20e52478833","branchLabelMapping":{"^v9.1.0$":"main","^v8.19.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:enhancement","Team:Visualizations","release_note:skip","Feature:Lens","backport:version","v9.1.0","v8.19.0"],"title":"[Lens][Embeddable]
Make UI react faster to click actions like create or
edit","number":210810,"url":"https://github.com/elastic/kibana/pull/210810","mergeCommit":{"message":"[Lens][Embeddable]
Make UI react faster to click actions like create or edit
(elastic#210810)\n\n## Summary\n\nThis PR is based on the idea in elastic#209361 and
tries to improve perceived\nperformances for all the scenarios where the
`editorFrame` is loaded.\n\nOn fast connections this is now perceived
very
fast:\n\n![esql_fast](https://github.com/user-attachments/assets/efb26416-bf15-449e-912f-a689c689c593)\n\nOn
Fast 4g is still
fast\n\n![esql_fast_4g](https://github.com/user-attachments/assets/acc199be-683d-4a4b-a53c-f37a9117c258)\n\nOn
Slow 4g is
acceptable\n\n\n![esql_slow_4g](https://github.com/user-attachments/assets/6fed9ec4-dc3f-4557-976c-91d82bddc10f)\n\nEven
on 3G connection the feedback is much better
now\n\n\n![esql_3g](https://github.com/user-attachments/assets/27e96c01-9149-4dd1-8a6d-e005202149ff)\n\nAs
a bonus extra tests have been added for the ES|QL creation flow.\n\ncc
@thomasneirynck @nreese \n\n### Checklist\n\n- [x] [Unit or
functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere
updated or added to match the most common
scenarios\n\n---------\n\nCo-authored-by: Nick Partridge
<nick.ryan.partridge@gmail.com>","sha":"1e92ae8afbec96f437040a7d3147b20e52478833"}},"sourceBranch":"main","suggestedTargetBranches":["8.x"],"targetPullRequestStates":[{"branch":"main","label":"v9.1.0","branchLabelMappingKey":"^v9.1.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/210810","number":210810,"mergeCommit":{"message":"[Lens][Embeddable]
Make UI react faster to click actions like create or edit
(elastic#210810)\n\n## Summary\n\nThis PR is based on the idea in elastic#209361 and
tries to improve perceived\nperformances for all the scenarios where the
`editorFrame` is loaded.\n\nOn fast connections this is now perceived
very
fast:\n\n![esql_fast](https://github.com/user-attachments/assets/efb26416-bf15-449e-912f-a689c689c593)\n\nOn
Fast 4g is still
fast\n\n![esql_fast_4g](https://github.com/user-attachments/assets/acc199be-683d-4a4b-a53c-f37a9117c258)\n\nOn
Slow 4g is
acceptable\n\n\n![esql_slow_4g](https://github.com/user-attachments/assets/6fed9ec4-dc3f-4557-976c-91d82bddc10f)\n\nEven
on 3G connection the feedback is much better
now\n\n\n![esql_3g](https://github.com/user-attachments/assets/27e96c01-9149-4dd1-8a6d-e005202149ff)\n\nAs
a bonus extra tests have been added for the ES|QL creation flow.\n\ncc
@thomasneirynck @nreese \n\n### Checklist\n\n- [x] [Unit or
functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere
updated or added to match the most common
scenarios\n\n---------\n\nCo-authored-by: Nick Partridge
<nick.ryan.partridge@gmail.com>","sha":"1e92ae8afbec96f437040a7d3147b20e52478833"}},{"branch":"8.x","label":"v8.19.0","branchLabelMappingKey":"^v8.19.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport This PR is a backport of another PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants