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

[Uptime] Step Details Page navigation - handle unequal steps between check groups #106289

Conversation

dominiqueclarke
Copy link
Contributor

@dominiqueclarke dominiqueclarke commented Jul 20, 2021

Fixes #106248

When navigating between different checks on the step details page, we attempt to preserve the state of the accordion, keeping the appropriate accordion open as the user navigates. This can cause issues when there is an unequal amount of steps between each check, causing an unhandled reference error.

This PR adds additional defense to prevent this error.

Steps for testing:

  1. Create a synthetic monitor with one step and run heartbeat
  2. Stop heartbeat, update the same monitor to have two steps, and run heartbeat
  3. Navigate to the step details page for a check that has two steps.
  4. Expand the second row
  5. Navigate to backwards through step details page to previous checks until you get to a check with 1 step.
  6. Observe that there is no error and only one row that is collapsed

Screen Shot 2021-07-20 at 9 30 16 AM

Screen Shot 2021-07-20 at 9 26 45 AM

@dominiqueclarke dominiqueclarke added bug Fixes for quality problems that affect the customer experience v8.0.0 Team:Uptime - DEPRECATED Synthetics & RUM sub-team of Application Observability release_note:skip Skip the PR/issue when compiling release notes v7.14.0 auto-backport Deprecated - use backport:version if exact versions are needed v7.15.0 labels Jul 20, 2021
@dominiqueclarke dominiqueclarke requested a review from a team as a code owner July 20, 2021 16:49
@elasticmachine
Copy link
Contributor

Pinging @elastic/uptime (Team:uptime)

Copy link
Contributor

@justinkambic justinkambic left a comment

Choose a reason for hiding this comment

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

Tested this locally, not seeing the issue anymore! LGTM!


const step = steps.find((stepF) => stepF.synthetics?.step?.index !== expandedRowKey)!;
Copy link
Contributor

Choose a reason for hiding this comment

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

I knew! it.


// expect only one accordion to be expanded
expect(Object.keys(result.current.expandedRows)).toEqual(['0']);
});
Copy link
Contributor

Choose a reason for hiding this comment

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

Great job on this test 👍

@kibanamachine
Copy link
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
uptime 946.5KB 946.5KB +8.0B

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

@kibanamachine
Copy link
Contributor

💚 Backport successful

Status Branch Result
7.14
7.x

The backport PRs will be merged automatically after passing CI.

kibanamachine added a commit that referenced this pull request Jul 20, 2021
…tails page in Uptime (#106289) (#106320)

Co-authored-by: Dominique Clarke <doclarke71@gmail.com>
kibanamachine added a commit that referenced this pull request Jul 20, 2021
…tails page in Uptime (#106289) (#106321)

Co-authored-by: Dominique Clarke <doclarke71@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 bug Fixes for quality problems that affect the customer experience release_note:skip Skip the PR/issue when compiling release notes Team:Uptime - DEPRECATED Synthetics & RUM sub-team of Application Observability v7.14.0 v7.15.0 v8.0.0
Projects
None yet
4 participants