Skip to content

Conversation

@sensei-hacker
Copy link
Member

@sensei-hacker sensei-hacker commented Jan 21, 2026

See poll at
#2531

User description

Summary

Reorganizes the 24 configuration tabs into 8 collapsible accordion groups to reduce visual clutter and improve navigation.

Groups:

  • Setup & Configuration (5 tabs)
  • Flight Control (5 tabs)
  • Tuning (3 tabs)
  • Navigation & Mission (2 tabs)
  • Sensors & Peripherals (3 tabs)
  • Data Logging (2 tabs)
  • Programming (2 tabs)
  • Tools (2 tabs)

Implementation

  • Accordion HTML structure in index.html
  • Accordion styling in src/css/main.css (preserves INAV cyan theme #37a8db)
  • Expand/collapse JavaScript in js/configurator_main.js
  • English translation keys in locale/en/messages.json
  • First group expands by default

Testing

  • ✅ Manual testing confirmed navigation works correctly
  • ✅ Tabs load and switch as expected within accordion groups
  • ✅ Build verification completed (no errors)
  • ✅ No new dependencies required

Screenshots

User can provide screenshots of the accordion navigation in action.

Problem:
The decompiler was eagerly decompiling both operandA and operandB for all action operations,
even when operandB was unused. This caused incorrect type-specific validation warnings for
operations like SET_PROFILE (operation 42) which only uses operandA.

Example: SET_PROFILE with operandB type=6 (PID), value=1700 (garbage data) would trigger:
"Invalid PID operand value 1700. Valid range is 0-3."

Solution:
Added operation-specific operand handling with two categories:
- operandAOnlyOperations: Operations that only use operandA (skip operandB decompilation)
- noOperandOperations: Operations that use no operands (skip both)

Additionally, added version detection warnings for unexpected operands:
- Warns when unused operands have non-zero type or value
- Helps detect firmware/configurator version mismatches
- Shows operation name, type, and value for debugging

Example warning: "Unexpected operand B to Set Profile operation (type=6, value=1700).
This may indicate a firmware version mismatch."

Benefits:
- Prevents type-specific validation errors on garbage data in unused operands
- Preserves validation for operations that legitimately use PID/other operands
- Provides version detection when firmware adds new operand usage
Organizes the 24 configuration tabs into 8 collapsible accordion groups
for improved navigation and reduced visual clutter.

Groups:
- Setup & Configuration (5 tabs)
- Flight Control (5 tabs)
- Tuning (3 tabs)
- Navigation & Mission (2 tabs)
- Sensors & Peripherals (3 tabs)
- Data Logging (2 tabs)
- Programming (2 tabs)
- Tools (2 tabs)

Implementation:
- Added accordion group structure to index.html
- Added accordion styling to main.css (preserves INAV cyan theme)
- Added expand/collapse JavaScript to configurator_main.js
- Added English translation keys for navigation groups
- First group (Setup & Configuration) expands by default

No new dependencies required - uses existing jQuery and CSS transitions.
@github-actions
Copy link

Branch Targeting Suggestion

You've targeted the master branch with this PR. Please consider if a version branch might be more appropriate:

  • maintenance-9.x - If your change is backward-compatible and won't create compatibility issues between INAV firmware and Configurator 9.x versions. This will allow your PR to be included in the next 9.x release.

  • maintenance-10.x - If your change introduces compatibility requirements between firmware and configurator that would break 9.x compatibility. This is for PRs which will be included in INAV 10.x

If master is the correct target for this change, no action is needed.


This is an automated suggestion to help route contributions to the appropriate branch.

@qodo-code-review
Copy link
Contributor

qodo-code-review bot commented Jan 21, 2026

PR Compliance Guide 🔍

All compliance sections have been disabled in the configurations.

@MrD-RC
Copy link
Member

MrD-RC commented Jan 21, 2026

Would there be a configuration option (gear icon) to allow them all to be expanded by default? I'd prefer that to having everything collapsed in menus.

@sensei-hacker sensei-hacker added the For Discussion Discussion needed label Jan 21, 2026
@sensei-hacker sensei-hacker changed the base branch from master to maintenance-9.x January 21, 2026 19:22
Adds an icon-only toggle button at the bottom of the navigation menu to
expand or collapse all accordion groups.

Features:
- SVG icon button that swaps between expand (double chevron down) and
  collapse (double chevron up) states
- Clicking expands all 8 navigation groups or collapses to first group only
- Preference persists across configurator restarts via electron-store
- When all groups expanded, headers become minimal cyan divider lines to
  maximize vertical space
- Icon-only design saves space - all 24 tabs fit without scrolling
- Smooth CSS transitions for icon swap and header state changes

Implementation:
- Toggle button in index.html with both expand/collapse SVG icons
- JavaScript in configurator_main.js handles toggle logic and persistence
- CSS in main.css for compact headers when expanded and icon styling
- Translation keys in locale/en/messages.json for accessibility

Addresses need for quick access to all tabs while maintaining visual
organization of accordion groups.
@sensei-hacker
Copy link
Member Author

sensei-hacker commented Jan 21, 2026

Would there be a configuration option (gear icon) to allow them all to be expanded by default? I'd prefer that to having everything collapsed in menus.

I like that idea! Instead of hiding it away, I put it right there:

image

It automatically saves your preference, so you only have to click it once.

At first that gave this beautiful menu:
image

But the section headings made it too tall and would require a scrollbar at 1080p.
Removing the section headings, we get this when you choose the expanded option

image

Just a subtle hint of that tuning stuff is with tuning stuff, for more quickly finding what you need.

@MrD-RC
Copy link
Member

MrD-RC commented Jan 21, 2026

I like that. Nice work my friend 👍🏻

Adds WCAG-compliant accessibility features to accordion navigation:

HTML changes:
- Added role="button" to all group headers for screen reader compatibility
- Added tabindex="0" to make headers keyboard-navigable
- Added aria-expanded="false" initial state to indicate collapsed groups

JavaScript changes:
- Updates aria-expanded dynamically when groups expand/collapse
- Added keyboard event handler for Enter and Space keys
- Ensures aria-expanded is set correctly on initialization
- Updates aria-expanded when using expand/collapse all button
- Fixed localization attribute on JavaScript Programming tab (i18n → data-i18n)

Benefits:
- Screen readers announce group headers as interactive buttons
- Keyboard users can Tab to headers and activate with Enter/Space
- Assistive technology correctly reports expanded/collapsed state
- Meets WCAG 2.1 Level AA compliance for keyboard navigation

Addresses qodo-merge code review suggestions for accessibility.
@sensei-hacker sensei-hacker removed the For Discussion Discussion needed label Jan 21, 2026
@sensei-hacker sensei-hacker added this to the 9.1 milestone Jan 21, 2026
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.

2 participants