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

More info on setup tab 2 #3385

Merged
merged 6 commits into from
Apr 4, 2023
Merged

Conversation

HThuren
Copy link
Member

@HThuren HThuren commented Mar 18, 2023

Refine layout and add help icons/text
Now:
image

And with local build (and dark theme):
image

Before:
image

@HThuren
Copy link
Member Author

HThuren commented Mar 18, 2023

But not in control with dark theme .-(

@github-actions

This comment has been minimized.

@blckmn
Copy link
Member

blckmn commented Mar 18, 2023

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 -> FAIL
  • 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

@github-actions

This comment has been minimized.

@HThuren
Copy link
Member Author

HThuren commented Mar 19, 2023

Drak theme fixed

@nerdCopter
Copy link
Member

sorry, it still needs css work.
if the screen is narrow, items go off.
need to figure out the button style well.

image
image

@HThuren
Copy link
Member Author

HThuren commented Mar 22, 2023

sorry, it still needs css work. if the screen is narrow, items go off. need to figure out the button style well.

image image

I going to learn more CSS style, was there in 2005, but a lot has happen since :-)
Thank you for the test.

@nerdCopter
Copy link
Member

@HThuren , try to re-use existing css if you can, check all the surrounding elements for the text-issue. i hate css, fwiw 😆

@github-actions

This comment has been minimized.

@HThuren
Copy link
Member Author

HThuren commented Apr 1, 2023

@haslinghuis @nerdCopter, Now more alignment to existing layout, also in dark theme
Ready to go :-)

@haslinghuis
Copy link
Member

haslinghuis commented Apr 1, 2023

With no build key:

image

Should be

image

Did some testing on it we don't need the MSP call on line 341 and we should check length of buildKey in the first loop.

Proposal:

image

        const showFirmwareInfo = function() {
            // Firmware info
            msp_api_e.text([FC.CONFIG.apiVersion]);
            build_date_e.text([FC.CONFIG.buildInfo]);

            const buildRoot   = `https://build.betaflight.com/api/builds/${FC.CONFIG.buildKey}`;
            const buildConfig = `<span class="buildInfoBtn" title="${i18n.getMessage('initialSetupInfoBuildInfoConfig')}: ${buildRoot}/json">
                                    <a href="${buildRoot}/json" target="_blank"><strong>${i18n.getMessage('initialSetupInfoBuildInfoConfig')}</a></strong></span>`;
            const buildLog =    `<span class="buildInfoBtn" title="${i18n.getMessage('initialSetupInfoBuildInfoLog')}: ${buildRoot}/log">
                                    <a href="${buildRoot}/log" target="_blank"><strong>${i18n.getMessage('initialSetupInfoBuildInfoLog')}</a></strong></span>`;
            build_info_e.html(`${buildConfig} &nbsp &nbsp ${buildLog}`);

            if (FC.CONFIG.buildKey.length > 1) {
                $('.build-info a').removeClass('disabled');
            } else {
                $('.build-info a').addClass('disabled');
            }

            if (FC.CONFIG.buildOptions.length > 0) {
                let buildOptions = "";
                build_opt_e.text = "";
                for (const buildOption of FC.CONFIG.buildOptions) {
                    buildOptions = `${buildOptions} &nbsp ${buildOption}`;
                }
                build_opt_e.html(`<span class="buildInfoClassOptions" 
                                    title="${i18n.getMessage('initialSetupInfoBuildOptions')}${buildOptions}">
                                    <strong>${i18n.getMessage('initialSetupInfoBuildOptionsList')}</strong></span>`);
            } else {
                build_opt_e.text(i18n.getMessage('initialSetupInfoBuildOptionsEmpty'));
            }
        };

@nerdCopter
Copy link
Member

Another option: if the build key variable is undefined|null|empty, then simply hide the entire line (class).

@HThuren
Copy link
Member Author

HThuren commented Apr 2, 2023

I have made the disable / enable logic, but not the entire line/class. I think the lines are shown also when they are empty, then user know there existence.

@github-actions

This comment has been minimized.

Copy link
Member

@haslinghuis haslinghuis left a comment

Choose a reason for hiding this comment

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

Almost finished

src/js/tabs/setup.js Outdated Show resolved Hide resolved
src/js/tabs/setup.js Outdated Show resolved Hide resolved
@sonarqubecloud
Copy link

sonarqubecloud bot commented Apr 2, 2023

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 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@github-actions
Copy link
Contributor

github-actions bot commented Apr 2, 2023

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!

@haslinghuis haslinghuis requested a review from McGiverGim April 2, 2023 20:31
Copy link
Member

@nerdCopter nerdCopter left a comment

Choose a reason for hiding this comment

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

approving

  • looks good, light & dark theme. (buttons with build key)
  • tested without build key, empty line displays as per author's expectation.

@haslinghuis haslinghuis merged commit 08100ba into betaflight:master Apr 4, 2023
@HThuren HThuren deleted the moreInfoOnSetupTab_2 branch April 4, 2023 14:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: COMPLETED
Development

Successfully merging this pull request may close these issues.

4 participants