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

Conditional set output is wrong #6244

Merged
merged 55 commits into from
Mar 17, 2023
Merged

Conversation

scottbell
Copy link
Contributor

@scottbell scottbell commented Feb 1, 2023

Closes #5918

Describe your changes:

  • Removed default output from being used before component has received and evaluated valid telemetry.
  • Added check in staleness for existence of staleness response (to prevent thrown error)

All Submissions:

  • Have you followed the guidelines in our Contributing document?
  • Have you checked to ensure there aren't other open Pull Requests for the same update/change?
  • Is this change backwards compatible? For example, developers won't need to change how they are calling the API or how they've extended core plugins such as Tables or Plots.

Author Checklist

  • Changes address original issue?
  • Tests included and/or updated with changes?
  • Command line build passes?
  • Has this been smoke tested?
  • Testing instructions included in associated issue OR is this a dependency/testcase change?

Reviewer Checklist

  • Changes appear to address issue?
  • Reviewer has tested changes by following the provided instructions?
  • Changes appear not to be breaking changes?
  • Appropriate automated tests included?
  • Code style and in-line documentation are appropriate?
  • Has associated issue been labelled unverified? (only applicable if this PR closes the issue)
  • Has associated issue been labelled bug? (only applicable if this PR is for a bug fix)

@scottbell scottbell linked an issue Feb 1, 2023 that may be closed by this pull request
7 tasks
@scottbell
Copy link
Contributor Author

scottbell commented Feb 1, 2023

Here's the new behavior:

Screen.Recording.2023-02-01.at.1.22.18.PM.mov

I'm turning of YAMCS data to simulate the "no data" situation, then starting YAMCS to show the ConditionSet receiving data. It also works if you create a Sine Wave Generator with a loading delay.

If this looks good, I'll add an e2e test with a Sine Wave Generator that has a loading delay.

@codecov
Copy link

codecov bot commented Feb 1, 2023

Codecov Report

Merging #6244 (3dab182) into master (eff0cc9) will increase coverage by 1.58%.
The diff coverage is 22.22%.

❗ Current head 3dab182 differs from pull request most recent head 1d1b9af. Consider uploading reports for the commit 1d1b9af to get more accurate results

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #6244      +/-   ##
==========================================
+ Coverage   53.33%   54.91%   +1.58%     
==========================================
  Files         626      626              
  Lines       26617    26617              
  Branches     2403     2403              
==========================================
+ Hits        14195    14616     +421     
+ Misses      11758    11341     -417     
+ Partials      664      660       -4     
Flag Coverage Δ *Carryforward flag
e2e-ci 39.35% <ø> (ø) Carriedforward from 7ec9dc7
e2e-full 51.08% <ø> (ø) Carriedforward from 7ec9dc7
e2e-stable 55.28% <50.00%> (+17.10%) ⬆️
unit 49.31% <22.22%> (+0.11%) ⬆️

*This pull request uses carry forward flags. Click here to find out more.

Impacted Files Coverage Δ
src/plugins/condition/components/Condition.vue 0.00% <ø> (ø)
...ugins/condition/components/ConditionCollection.vue 0.00% <0.00%> (ø)
src/plugins/condition/components/ConditionSet.vue 0.00% <ø> (ø)
src/plugins/condition/components/Criterion.vue 0.00% <ø> (ø)
...ns/displayLayout/components/AlphanumericFormat.vue 0.00% <0.00%> (ø)
...plugins/displayLayout/components/TelemetryView.vue 2.60% <0.00%> (ø)
src/plugins/condition/ConditionManager.js 62.37% <50.00%> (-0.27%) ⬇️

... and 71 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update eff0cc9...1d1b9af. Read the comment docs.

@unlikelyzero
Copy link
Collaborator

https://www.w3.org/WAI/ARIA/apg/patterns/accordion/ is a good guideline for the rules within the condition set.

Mainly isExpanded and button

@scottbell scottbell self-assigned this Feb 2, 2023
@shefalijoshi
Copy link
Contributor

@scottbell @charlesh88 If you drag the condition set with output --- into a display layout, it displays a different output. Expectation is that it should also show --- right?

ConditionSetDefaultOutput.mov

@scottbell
Copy link
Contributor Author

scottbell commented Feb 6, 2023

@shefalijoshi

Be sure the Sine Wave Generators you're testing with have a somewhat low frequency and substantial delay. Also, changing the delay of a Sine Wave Generator necessitates a page reload (from what I can tell):

Screen.Recording.2023-02-06.at.11.23.10.PM.mov

@scottbell
Copy link
Contributor Author

scottbell commented Feb 7, 2023

@shefalijoshi @charlesh88 Regarding the difference between DisplayLayouts and the ConditionSet view on historical data, this appears to be a pre-existing issue in master from what I can tell:

Screen.Recording.2023-02-07.at.2.25.27.PM.mov

Namely, the ConditionSet view only updates if it's Local Clock mode:

Screen.Recording.2023-02-07.at.2.26.50.PM.mov

I've got something cobbled together to fix the historical data issue here.

From what I can tell, the "Test Data" also only seems to work in Local Clock mode. Is that expected?

Screen.Recording.2023-02-07.at.3.55.27.PM.mov

@akhenry akhenry removed this from the Target:2.1.6 milestone Feb 9, 2023
@akhenry
Copy link
Contributor

akhenry commented Mar 15, 2023

In testing this I found a weird edge-case, which I will file a followup for because I think it's actually a long-standing issue with conditional styling and not an issue with condition sets themselves.

  1. Drag a condition set with no flowing telemetry (as created here) into a display layout
  2. Define some conditional style rules
  3. Save
  4. Note that whichever conditional style was last selected remains active in the display layout. Navigating away clears it.

@akhenry
Copy link
Contributor

akhenry commented Mar 15, 2023

Filed #6444 for the followup issue

@akhenry akhenry enabled auto-merge (squash) March 15, 2023 21:49
Copy link
Contributor

@charlesh88 charlesh88 left a comment

Choose a reason for hiding this comment

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

I'm now seeing composition problems. Specifically:

  1. Make a new Condition Set (CS).
  2. Add telem to it (sine wave gen). Define condition(s).
  3. Save and exit editing.
  4. In the tree, expand the CS.
  5. Use the "Remove" action to remove the telem element. The element will appear to be removed. The CS outputs "---" but incorrectly highlights the Default condition.
  6. Collapse the CS in the tree, then re-expand it. Note that the telem element returns, and is clickable/navigable. The CS is not evaluating, and displays "---".
  7. Edit the CS, note that the telem element appears in the CS's Elements pool and the CS does not evaluate it.

I tested this with another domain object (Gauge) and did not see the same issue. No console errors were thrown during the above sequence.

Default condition hilited after telem element removed
Screen Shot 2023-03-16 at 9 23 44 AM

Telem element reappears after toggle in tree
Screen Shot 2023-03-16 at 9 24 02 AM

@scottbell
Copy link
Contributor Author

@charlesh88 I think the composition issue is separate from this PR, in that the behavior is also happening in master. It may be due to this recent PR? Here's a screenshare of it on master:

Screen.Recording.2023-03-16.at.6.51.17.PM.mov

@scottbell
Copy link
Contributor Author

@charlesh88 I think the composition issue is separate from this PR, in that the behavior is also happening in master. It may be due to this recent PR? Here's a screenshare of it on master:

Tested before that other recent PR in, and it looks like this bug predates that too.

@scottbell
Copy link
Contributor Author

scottbell commented Mar 16, 2023

@charlesh88 I think the composition issue is separate from this PR, in that the behavior is also happening in master. It may be due to this recent PR? Here's a screenshare of it on master:

Tested before that other recent PR in, and it looks like this bug predates that too.

@charlesh88 talked to @akhenry about this, and we've filed a separate issue for the tree composition problem. Regarding this:

The CS outputs "---" but incorrectly highlights the Default condition.

I'll look into it for this PR.

@scottbell
Copy link
Contributor Author

@charlesh88 The current condition should be getting cleared now when there isn't telemetry:

Screen.Recording.2023-03-17.at.1.26.16.PM.mov

@scottbell scottbell requested review from charlesh88 and removed request for 360macky March 17, 2023 12:30
@akhenry akhenry added the sim-3 label Mar 17, 2023
@akhenry akhenry merged commit 6cb5c47 into master Mar 17, 2023
@akhenry akhenry deleted the 5918-conditional-set-output-is-wrong branch March 17, 2023 15:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Conditional Set "output" is wrong
7 participants