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

Toggle trace/field visibility #664

Merged
merged 4 commits into from
Oct 20, 2023

Conversation

atomgomba
Copy link
Contributor

@atomgomba atomgomba commented Oct 19, 2023

Fixes #380. I removed the equalizer icon from the legend because it had no real function and clicking on the field name had the same functionality (opening the analyzer display). Instead I replaced that icon with a toggle button to show/hide individual traces within a graph. The field names are now underlined on hover to indicate that they are clickable and open the analyser display just like before.

Screenshot from 2023-10-19 14-44-46

@github-actions

This comment has been minimized.

@nerdCopter
Copy link
Member

i like this; however, would like color bar and possibly the number still be clickable for showing/updating the spectral graph

@nerdCopter
Copy link
Member

nerdCopter commented Oct 19, 2023

unsure if this is possible to fix, but i also notice that occasionally, but not 100% of the time, the legend bars disappear during screen-update upon clicking an eye.
here i screen-recorded, then panned to a frame to show the disappearance which is only for milliseconds.
image

https://youtu.be/nU5Xhy7arOU

@atomgomba
Copy link
Contributor Author

unsure if this is possible to fix, but i also notice that occasionally, but not 100% of the time, the legend bars disappear during screen-update upon clicking an eye. here i screen-recorded, then panned to a frame to show the disappearance which is only for milliseconds. image

https://youtu.be/nU5Xhy7arOU

Thanks for noticing this! Yea, it's fixable; oh the joys of CSS!

@blckmn
Copy link
Member

blckmn commented Oct 19, 2023

AUTOMERGE: (FAIL)

  • github identifies PR as mergeable -> FAIL
  • assigned to a milestone -> FAIL
  • cooling off period lapsed -> PASS
  • commit count less or equal to three -> FAIL
  • Don't merge label NOT found -> PASS
  • at least one RN: label found -> FAIL
  • Tested label found -> FAIL
  • assigned to an approver -> FAIL
  • approver count at least three -> FAIL

@sonarcloud
Copy link

sonarcloud bot commented Oct 20, 2023

SonarCloud Quality Gate failed.    Quality Gate failed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
16.2% 16.2% Duplication

idea Catch issues before they fail your Quality Gate with our IDE extension sonarlint SonarLint

@atomgomba
Copy link
Contributor Author

unsure if this is possible to fix, but i also notice that occasionally, but not 100% of the time, the legend bars disappear during screen-update upon clicking an eye. here i screen-recorded, then panned to a frame to show the disappearance which is only for milliseconds. image

https://youtu.be/nU5Xhy7arOU

Turns out it was the unnecessary re-rendering of some elements. I also made the other elements clickable to open the analyser.

@github-actions
Copy link

Do you want to test this code? Here you have an automated build:
Betaflight-Blackbox-Explorer-Linux
Betaflight-Blackbox-Explorer-macOS
Betaflight-Blackbox-Explorer-Windows
WARNING: It may be unstable and result in corrupted configurations or data loss. Use only for testing!

Comment on lines +153 to +159
if (config.isGraphFieldHidden(graphIndex, fieldIndex)) {
$this.removeClass("glyphicon-eye-open");
$this.addClass("glyphicon-eye-close");
} else {
$this.addClass("glyphicon-eye-open");
$this.removeClass("glyphicon-eye-close");
}
Copy link
Member

Choose a reason for hiding this comment

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

Maybe use toggleClass (with state param)

@haslinghuis haslinghuis added this to the 3.7.0 milestone Oct 20, 2023
@haslinghuis haslinghuis merged commit 964ce3f into betaflight:master Oct 20, 2023
5 of 6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Feature: enable/disable graphs on click on "Legend graph description"
4 participants