Skip to content

[ML] Data frame analytics: Fix screen flickering in Results Explorer and Analytics Map when no jobs are available - #193890

Merged
rbrtj merged 6 commits into
elastic:mainfrom
rbrtj:no-analytics-id-detected-screen-unnecessary-appearing
Oct 1, 2024
Merged

rbrtj merged 6 commits into
elastic:mainfrom
rbrtj:no-analytics-id-detected-screen-unnecessary-appearing

Conversation

@rbrtj

@rbrtj rbrtj commented Sep 24, 2024 •

Copy link
Copy Markdown
Contributor

Summary

Fix for #138193
I didn't find any relation between user permissions and the issue.
The error mentioned in the issue doesn't come from the ML package and is unrelated to the problem.
The view was visible due to the initial state of jobsExist. Added additional loading state to prevent screen flickering.

Disabled automatic display of the job selection flyout when no jobs are available.

After:

Screen.Recording.2024-09-24.at.17.07.16.mov

@rbrtj rbrtj added release_note:fix :ml Feature:Data Frame Analytics ML data frame analytics features v9.0.0 Team:ML Team label for ML (also use :ml) t// v8.16.0 backport:version Backport to applied version labels v8.15.3 labels Sep 24, 2024
@rbrtj rbrtj self-assigned this Sep 24, 2024
@rbrtj
rbrtj requested a review from a team as a code owner September 24, 2024 15:20
@elasticmachine

Copy link
Copy Markdown
Contributor

Pinging @elastic/ml-ui (:ml)

@rbrtj rbrtj added backport:prev-major and removed backport:version Backport to applied version labels labels Sep 24, 2024
@peteharverson
peteharverson requested review from walterra and removed request for alvarezmelissa87 September 24, 2024 16:45
@peteharverson

Copy link
Copy Markdown
Contributor

This looks good, but I'm wondering if we need to show the job selection flyout at all if the user has no DFA jobs in the current space? Could the flyout only be opened when switching to the Results Explorer or Map view if there are jobs? This is the behavior used in the Anomaly Explorer for anomaly detection jobs. Can you look to see if this would be an easy change?

@walterra walterra left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Was able to reproduce the original problem and verified this PR fixes it, LGTM.

@rbrtj rbrtj added backport:version Backport to applied version labels and removed backport:prev-major labels Sep 27, 2024
@rbrtj

rbrtj commented Sep 27, 2024

Copy link
Copy Markdown
Contributor Author

This looks good, but I'm wondering if we need to show the job selection flyout at all if the user has no DFA jobs in the current space? Could the flyout only be opened when switching to the Results Explorer or Map view if there are jobs? This is the behavior used in the Anomaly Explorer for anomaly detection jobs. Can you look to see if this would be an easy change?

Changed the flyout behavior to not automatically display when there are no jobs: a5296df

@peteharverson peteharverson left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Tested latest changes and LGTM.

@kibana-ci

Copy link
Copy Markdown

💛 Build succeeded, but was flaky

Failed CI Steps

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
ml 4.6MB 4.6MB +138.0B

History

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

cc @rbrtj

@rbrtj
rbrtj merged commit a2e995a into elastic:main Oct 1, 2024
@kibanamachine

Copy link
Copy Markdown
Contributor

Starting backport for target branches: 8.15, 8.x

https://github.com/elastic/kibana/actions/runs/11121619503

kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Oct 1, 2024
…and Analytics Map when no jobs are available (elastic#193890)

## Summary

Fix for [elastic#138193](elastic#138193)
I didn't find any relation between user permissions and the issue.
The error mentioned in the issue doesn't come from the ML package and is
unrelated to the problem.
The view was visible due to the initial state of `jobsExist`. Added
additional loading state to prevent screen flickering.

Disabled automatic display of the job selection flyout when no jobs are
available.

After:

https://github.com/user-attachments/assets/a8c6e5e2-ebcc-4320-b5be-f586ca6c0672
(cherry picked from commit a2e995a)
kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Oct 1, 2024
…and Analytics Map when no jobs are available (elastic#193890)

## Summary

Fix for [elastic#138193](elastic#138193)
I didn't find any relation between user permissions and the issue.
The error mentioned in the issue doesn't come from the ML package and is
unrelated to the problem.
The view was visible due to the initial state of `jobsExist`. Added
additional loading state to prevent screen flickering.

Disabled automatic display of the job selection flyout when no jobs are
available.

After:

https://github.com/user-attachments/assets/a8c6e5e2-ebcc-4320-b5be-f586ca6c0672
(cherry picked from commit a2e995a)
@kibanamachine

Copy link
Copy Markdown
Contributor

💚 All backports created successfully

Status Branch Result
✅ 8.15
✅ 8.x

Note: Successful backport PRs will be merged automatically after passing CI.

Questions ?

Please refer to the Backport tool documentation

kibanamachine added a commit that referenced this pull request Oct 1, 2024
…plorer and Analytics Map when no jobs are available (#193890) (#194526)

# Backport

This will backport the following commits from `main` to `8.15`:
- [[ML] Data frame analytics: Fix screen flickering in Results Explorer
and Analytics Map when no jobs are available
(#193890)](#193890)

<!--- Backport version: 9.4.3 -->

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

<!--BACKPORT [{"author":{"name":"Robert
Jaszczurek","email":"92210485+rbrtj@users.noreply.github.com"},"sourceCommit":{"committedDate":"2024-10-01T08:32:37Z","message":"[ML]
Data frame analytics: Fix screen flickering in Results Explorer and
Analytics Map when no jobs are available (#193890)\n\n##
Summary\r\n\r\nFix for
[#138193](https://github.com/elastic/kibana/issues/138193)\r\nI didn't
find any relation between user permissions and the issue.\r\nThe error
mentioned in the issue doesn't come from the ML package and
is\r\nunrelated to the problem.\r\nThe view was visible due to the
initial state of `jobsExist`. Added\r\nadditional loading state to
prevent screen flickering.\r\n\r\nDisabled automatic display of the job
selection flyout when no jobs
are\r\navailable.\r\n\r\nAfter:\r\n\r\n\r\nhttps://github.com/user-attachments/assets/a8c6e5e2-ebcc-4320-b5be-f586ca6c0672","sha":"a2e995a9e735a50f54a314197ab1c2812a8416fb","branchLabelMapping":{"^v9.0.0$":"main","^v8.16.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:fix",":ml","Feature:Data
Frame
Analytics","v9.0.0","Team:ML","v8.16.0","backport:version","v8.15.3"],"title":"[ML]
Data frame analytics: Fix screen flickering in Results Explorer and
Analytics Map when no jobs are
available","number":193890,"url":"https://github.com/elastic/kibana/pull/193890","mergeCommit":{"message":"[ML]
Data frame analytics: Fix screen flickering in Results Explorer and
Analytics Map when no jobs are available (#193890)\n\n##
Summary\r\n\r\nFix for
[#138193](https://github.com/elastic/kibana/issues/138193)\r\nI didn't
find any relation between user permissions and the issue.\r\nThe error
mentioned in the issue doesn't come from the ML package and
is\r\nunrelated to the problem.\r\nThe view was visible due to the
initial state of `jobsExist`. Added\r\nadditional loading state to
prevent screen flickering.\r\n\r\nDisabled automatic display of the job
selection flyout when no jobs
are\r\navailable.\r\n\r\nAfter:\r\n\r\n\r\nhttps://github.com/user-attachments/assets/a8c6e5e2-ebcc-4320-b5be-f586ca6c0672","sha":"a2e995a9e735a50f54a314197ab1c2812a8416fb"}},"sourceBranch":"main","suggestedTargetBranches":["8.x","8.15"],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/193890","number":193890,"mergeCommit":{"message":"[ML]
Data frame analytics: Fix screen flickering in Results Explorer and
Analytics Map when no jobs are available (#193890)\n\n##
Summary\r\n\r\nFix for
[#138193](https://github.com/elastic/kibana/issues/138193)\r\nI didn't
find any relation between user permissions and the issue.\r\nThe error
mentioned in the issue doesn't come from the ML package and
is\r\nunrelated to the problem.\r\nThe view was visible due to the
initial state of `jobsExist`. Added\r\nadditional loading state to
prevent screen flickering.\r\n\r\nDisabled automatic display of the job
selection flyout when no jobs
are\r\navailable.\r\n\r\nAfter:\r\n\r\n\r\nhttps://github.com/user-attachments/assets/a8c6e5e2-ebcc-4320-b5be-f586ca6c0672","sha":"a2e995a9e735a50f54a314197ab1c2812a8416fb"}},{"branch":"8.x","label":"v8.16.0","branchLabelMappingKey":"^v8.16.0$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.15","label":"v8.15.3","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

Co-authored-by: Robert Jaszczurek <92210485+rbrtj@users.noreply.github.com>
kibanamachine added a commit that referenced this pull request Oct 1, 2024
…lorer and Analytics Map when no jobs are available (#193890) (#194527)

# Backport

This will backport the following commits from `main` to `8.x`:
- [[ML] Data frame analytics: Fix screen flickering in Results Explorer
and Analytics Map when no jobs are available
(#193890)](#193890)

<!--- Backport version: 9.4.3 -->

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

<!--BACKPORT [{"author":{"name":"Robert
Jaszczurek","email":"92210485+rbrtj@users.noreply.github.com"},"sourceCommit":{"committedDate":"2024-10-01T08:32:37Z","message":"[ML]
Data frame analytics: Fix screen flickering in Results Explorer and
Analytics Map when no jobs are available (#193890)\n\n##
Summary\r\n\r\nFix for
[#138193](https://github.com/elastic/kibana/issues/138193)\r\nI didn't
find any relation between user permissions and the issue.\r\nThe error
mentioned in the issue doesn't come from the ML package and
is\r\nunrelated to the problem.\r\nThe view was visible due to the
initial state of `jobsExist`. Added\r\nadditional loading state to
prevent screen flickering.\r\n\r\nDisabled automatic display of the job
selection flyout when no jobs
are\r\navailable.\r\n\r\nAfter:\r\n\r\n\r\nhttps://github.com/user-attachments/assets/a8c6e5e2-ebcc-4320-b5be-f586ca6c0672","sha":"a2e995a9e735a50f54a314197ab1c2812a8416fb","branchLabelMapping":{"^v9.0.0$":"main","^v8.16.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:fix",":ml","Feature:Data
Frame
Analytics","v9.0.0","Team:ML","v8.16.0","backport:version","v8.15.3"],"title":"[ML]
Data frame analytics: Fix screen flickering in Results Explorer and
Analytics Map when no jobs are
available","number":193890,"url":"https://github.com/elastic/kibana/pull/193890","mergeCommit":{"message":"[ML]
Data frame analytics: Fix screen flickering in Results Explorer and
Analytics Map when no jobs are available (#193890)\n\n##
Summary\r\n\r\nFix for
[#138193](https://github.com/elastic/kibana/issues/138193)\r\nI didn't
find any relation between user permissions and the issue.\r\nThe error
mentioned in the issue doesn't come from the ML package and
is\r\nunrelated to the problem.\r\nThe view was visible due to the
initial state of `jobsExist`. Added\r\nadditional loading state to
prevent screen flickering.\r\n\r\nDisabled automatic display of the job
selection flyout when no jobs
are\r\navailable.\r\n\r\nAfter:\r\n\r\n\r\nhttps://github.com/user-attachments/assets/a8c6e5e2-ebcc-4320-b5be-f586ca6c0672","sha":"a2e995a9e735a50f54a314197ab1c2812a8416fb"}},"sourceBranch":"main","suggestedTargetBranches":["8.x","8.15"],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/193890","number":193890,"mergeCommit":{"message":"[ML]
Data frame analytics: Fix screen flickering in Results Explorer and
Analytics Map when no jobs are available (#193890)\n\n##
Summary\r\n\r\nFix for
[#138193](https://github.com/elastic/kibana/issues/138193)\r\nI didn't
find any relation between user permissions and the issue.\r\nThe error
mentioned in the issue doesn't come from the ML package and
is\r\nunrelated to the problem.\r\nThe view was visible due to the
initial state of `jobsExist`. Added\r\nadditional loading state to
prevent screen flickering.\r\n\r\nDisabled automatic display of the job
selection flyout when no jobs
are\r\navailable.\r\n\r\nAfter:\r\n\r\n\r\nhttps://github.com/user-attachments/assets/a8c6e5e2-ebcc-4320-b5be-f586ca6c0672","sha":"a2e995a9e735a50f54a314197ab1c2812a8416fb"}},{"branch":"8.x","label":"v8.16.0","branchLabelMappingKey":"^v8.16.0$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.15","label":"v8.15.3","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

Co-authored-by: Robert Jaszczurek <92210485+rbrtj@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport:version Backport to applied version labels Feature:Data Frame Analytics ML data frame analytics features :ml release_note:fix Team:ML Team label for ML (also use :ml) t// v8.15.3 v8.16.0 v9.0.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants