-
-
Notifications
You must be signed in to change notification settings - Fork 952
Update Setup tab to hide build type/info/firmware when not available (#4459) #4460
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
Conversation
WalkthroughThe changes modularize the display logic for the "Build type," "Build info," and "Firmware" sections within the "Firmware info" box on the setup tab UI. Three pairs of new helper functions are introduced to show and hide each section independently. The main Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant SetupTab
participant FirmwareInfoBox
User->>SetupTab: Open Setup Tab
SetupTab->>SetupTab: Check API version
alt API version >= 1.45
SetupTab->>FirmwareInfoBox: showBuildType()
SetupTab->>FirmwareInfoBox: showBuildInfo()
SetupTab->>FirmwareInfoBox: showBuildFirmware()
else API version < 1.45
SetupTab->>FirmwareInfoBox: hideBuildType()
SetupTab->>FirmwareInfoBox: hideBuildInfo()
SetupTab->>FirmwareInfoBox: hideBuildFirmware()
end
Assessment against linked issues
Possibly related PRs
Suggested labels
Poem
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (1)
🧰 Additional context used🧬 Code Graph Analysis (1)src/js/tabs/setup.js (3)
🔇 Additional comments (5)
✨ Finishing Touches
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
|
Preview URL: https://f93a3627.betaflight-configurator.pages.dev |
Per your request, @haslinghuis |
we would typically just use jQuery's |
@nerdCopter - yes show/hide is abstracted using functions using jquery constants. |
Thank you both! @haslinghuis, @nerdCopter, if you know of some other trivial UI issues like this that never get done because you're doing more important things, point me at them and maybe I can help with one or two in my spare time. |
@DavidAnson replacing jBox with Vue equivalent - but not sure if trivial |
Haha, I don't know either of those, but I'll have a look. :) |
@DavidAnson also checkout https://github.com/betaflight/betaflight-configurator/issues if there is something more trivial :) |
You could have just asked me to port to Safari - which I want, but doesn't matter without WebUSB... ;) |
Fixes #4459
Summary by CodeRabbit
New Features
Refactor