betaflight-configurator icon indicating copy to clipboard operation
betaflight-configurator copied to clipboard

Test throttle selector UI component

Open atomgomba opened this issue 3 years ago • 12 comments

This is a UI component for selecting throttle value in the motor setup dialogs. Currently it is not functional in the sense that throttle value changes do not take effect because actual motor control is better understood by @limonspb so take this as half-baked strictly UI feature to free limon from the hassle of dealing with HTML/CSS.

Screenshot from 2022-01-20 10-22-10

Screenshot from 2022-01-20 10-21-43

atomgomba avatar Jan 20 '22 09:01 atomgomba

@atomgomba the picture, plus check a couple of sonar warnings plz here image

limonspb avatar Jan 21 '22 05:01 limonspb

This PR seems a needed fix to make the new motor order dialog working properly since latest changes on how idle works on firmware. So i have asigned to 10.8.0 milestone.

asizon avatar Jan 21 '22 06:01 asizon

Windows enviroment builds are failing here:

D:\a\1\s\src\components\shared\TestThrottleSelector\TestThrottleSelectorComponent.js
  4:26  error  Parsing error: Unexpected token =

yeah i think our Chrome version is not supporting static variables yet.

limonspb avatar Jan 21 '22 07:01 limonspb

It's a pitty but it seems like if the supported ECMA version is different in the test env than the app? 😳

atomgomba avatar Jan 21 '22 09:01 atomgomba

It's a pitty but it seems like if the supported ECMA version is different in the test env than the app? 😳

When I started working on presets I also wanted to use static class variables. But after some compatibility researsh I found I'd better not to yet. I don't remember why tho :) maybe because this standard has not been officially released yet, or something like that.

So all my static class variables I made like that, after the class closing bracket: MyClass.MyVariable = value; Works the same as static variable.

limonspb avatar Jan 21 '22 09:01 limonspb

AUTOMERGE: (FAIL)

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

blckmn avatar Jan 21 '22 11:01 blckmn

See: https://chromestatus.com/feature/6482797915013120

We are using:

navigator.appVersion.match(/.*Chrome\/([0-9\.]+)/)[1];
"91.0.4472.114"

According to NW.js we should be on Node 16.4.0 already:

        {
            "version": "v0.54.1",
            "date": "2021/07/02",
            "files": ["win-x64", "win-ia32", "linux-x64", "linux-ia32", "osx-x64"],
            "flavors": ["normal", "sdk"],
            "components": {
                "node": "16.4.0",
                "chromium": "91.0.4472.114"
            }
        },

haslinghuis avatar Jan 23 '22 13:01 haslinghuis

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

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

No Coverage information No Coverage information
0.1% 0.1% Duplication

sonarqubecloud[bot] avatar Feb 12 '22 11:02 sonarqubecloud[bot]

I cannot merge for some reason

atomgomba avatar Feb 13 '22 19:02 atomgomba

I cannot merge for some reason

what do you mean?

limonspb avatar Feb 14 '22 05:02 limonspb

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

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

No Coverage information No Coverage information
0.0% 0.0% Duplication

sonarqubecloud[bot] avatar Sep 21 '22 16:09 sonarqubecloud[bot]

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

github-actions[bot] avatar Sep 21 '22 16:09 github-actions[bot]

@atomgomba there is no need for this PR as I talked with @limonspb

haslinghuis avatar Oct 20 '22 01:10 haslinghuis