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 styling doesn't apply Default styles when no data is present #5925

Open
7 tasks
charlesh88 opened this issue Oct 28, 2022 · 4 comments
Open
7 tasks

Comments

@charlesh88
Copy link
Contributor

charlesh88 commented Oct 28, 2022

Summary

Because Condition Sets (CS) only output when they receive data, it becomes impossible to apply styling to an object when using Conditional Styling and no data is available to the CS. Steps to reproduce makes this a little more clear below.

Expected vs Current Behavior

For objects that use conditional styling, the user must have a way to set a desired style that is applied when no data is available to trigger a Condition Set's condition. This is especially important where things like large font sizes and background colors are desired.

Steps to Reproduce

  1. Make a Condition Set. Don't include any data sources, and you don't even have to add a condition. Save it.
  2. Make a Display Layout, then use that CS to conditionally style something like an alphanumeric or a drawing object in the layout. Make sure to set fill and stroke for the default condition (or even better, visibility). Save and exit the layout.
  3. Nav away and back to the layout, and observe: the styled object will appear with whatever it's baseline "system" default style is, and will not use the conditional's default condition styling.

Proposed Solution

  • Apply the default condition style in the case where the Condition Set isn't outputting anything. Note that I do NOT think that Condition Sets should be changed to always output their default value in the absence of a triggering input.

Environment

  • Open MCT Version: 2.1.2
  • Deployment Type: local, servers
  • OS: all
  • Browser: yes please

Impact Check List

  • Data loss or misrepresented data?
  • Regression? Did this used to work or has it always been broken?
  • Is there a workaround available?
  • Does this impact a critical component?
  • Is this just a visual bug with no functional impact?
  • Does this block the execution of e2e tests?
  • Does this have an impact on Performance?

Additional Information

@shefalijoshi
Copy link
Contributor

See #6244

@ozyx
Copy link
Member

ozyx commented Mar 21, 2023

Verified fixed

@ozyx ozyx removed the unverified label Mar 22, 2023
@charlesh88 charlesh88 reopened this May 17, 2024
@charlesh88
Copy link
Contributor Author

charlesh88 commented May 17, 2024

This has regressed and is currently broken: a conditional styling's default style is not being applied as expected when no data is available. Additionally, the Inspector highlights that style as if it's being matched and output, which is also incorrect behavior.

Screenshot 2024-05-17 at 10 45 45 AM

This example uses a Condition Set with no telemetry added to it; I also tested by adding an end point with no data, with the same result.

The fix, again:

  1. When using Conditional Styling, apply the default style in all cases unless the Condition Set in use is getting data and matches a condition other than the default.
  2. The default style should not highlight in the Inspector, even when it's "being applied". This is not a critical change, but could be misleading, as if that condition was being matched and was being output by the Condition Set, which is not the case. In the example below, the Condition Set's view in browse mode is what's expected for the current case.

Screenshot 2024-05-17 at 10 58 28 AM

@ozyx
Copy link
Member

ozyx commented May 18, 2024

@charlesh88 Let's sync on this next week. To me, this is conflicting with the requirements previously stated here and the work done to separate the concept of a "default value" from "no value".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants