Skip to content

Add Split Button Functionality for Level Navigation#3043

Merged
jmcouffin merged 2 commits intopyrevitlabs:developfrom
Wurschdhaud:splibutton-like-level-select
Feb 1, 2026
Merged

Add Split Button Functionality for Level Navigation#3043
jmcouffin merged 2 commits intopyrevitlabs:developfrom
Wurschdhaud:splibutton-like-level-select

Conversation

@Wurschdhaud
Copy link
Copy Markdown
Contributor

Description

Summary

Adds dropdown menus to level navigation buttons, allowing users to jump directly to any level instead of only moving to the next level.

UI Enhancement

  • Added dropdown arrows (▼) to all 6 level navigation buttons (Top Up/Down, Bottom Up/Down, Box Up/Down)
  • Dropdowns show list of all available levels in the selected direction (up to 20 levels)
  • Each level displays name and elevation: "Level 2 (3.50 m)"
  • Dropdown arrows only visible in Level mode, hidden in Nudge mode

User Experience

Before: Click button → move to next level only
After:

  • Click main button → move to next level (unchanged)
  • Click dropdown arrow → select from list of all levels → jump directly to selected level

Features

✅ Hover preview works on both main buttons and dropdown items
✅ Dynamic level gathering using existing get_next_level_above/below functions
✅ Automatic mode switching shows/hides dropdowns based on Level/Nudge toggle
✅ Popup auto-close after level selection

Why This Matters

Users working with multi-story buildings can now jump directly to any level without clicking through intermediate levels, significantly improving navigation efficiency.


Checklist

Before submitting your pull request, ensure the following requirements are met:

  • Code follows the PEP 8 style guide.
  • Code has been formatted with Black using the command:
    pipenv run black {source_file_or_directory}
  • Changes are tested and verified to work as expected.

Related Issues

If applicable, link the issues resolved by this pull request:

  • Resolves #[issue number]

Additional Notes

Maybe AI was involved 😉


Thank you for contributing to pyRevit! 🎉

Copy link
Copy Markdown
Contributor

@devloai devloai bot left a comment

Choose a reason for hiding this comment

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

PR Summary:

This PR adds split button functionality to the Section Box Navigator's level navigation buttons, enabling users to jump directly to any level via dropdown menus instead of clicking through intermediate levels. The implementation includes:

  • 6 new split buttons with dropdown arrows (Top Up/Down, Bottom Up/Down, Box Up/Down)
  • Dynamic menu population showing up to 20 levels with names and elevations
  • Preview functionality on dropdown items
  • Auto-hide dropdowns in Nudge mode

Review Summary:

Identified 5 issues requiring attention before merge, including 1 high-severity bug that could cause runtime crashes. The refactoring from string-based tags to structured dictionaries is well-designed but has incomplete null-checking and validation. Main concerns include missing None checks after tag normalization (causing potential TypeErrors), inconsistent success messages for elevation-based movements, and missing validation for box movements. The code follows pyRevit's IronPython 2.7.12 patterns and has proper UTF-8 encoding.

Issues found:

  • 1 High severity (TypeError from missing null checks)
  • 3 Medium severity (validation and UX issues)
  • 1 Low severity (silent failure feedback)

Follow-up suggestions:

  • @devloai fix the identified issues - Address the high-severity TypeError and validation gaps
  • @devloai add unit tests for the tag normalization logic - Ensure proper handling of edge cases

- always wire up
- valid box check
- remove None returns
@jmcouffin jmcouffin self-assigned this Feb 1, 2026
@jmcouffin jmcouffin added the Tools Issues related to pyRevit commands [subsystem] label Feb 1, 2026
@jmcouffin jmcouffin merged commit 9de1f3d into pyrevitlabs:develop Feb 1, 2026
@jmcouffin
Copy link
Copy Markdown
Contributor

no comments on my side
thanks for this improvement!

@Wurschdhaud Wurschdhaud deleted the splibutton-like-level-select branch February 1, 2026 15:42
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Feb 1, 2026

📦 New work-in-progress (wip) builds are available for 5.3.1.26032+1543-wip

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Feb 1, 2026

📦 New work-in-progress (wip) builds are available for 5.3.1.26032+1553-wip

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Feb 1, 2026

📦 New work-in-progress (wip) builds are available for 5.3.1.26032+1612-wip

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Feb 1, 2026

📦 New work-in-progress (wip) builds are available for 5.3.1.26032+1624-wip

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Feb 1, 2026

📦 New work-in-progress (wip) builds are available for 5.3.1.26032+1738-wip

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Feb 1, 2026

📦 New work-in-progress (wip) builds are available for 5.3.1.26032+1743-wip

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Feb 1, 2026

📦 New work-in-progress (wip) builds are available for 5.3.1.26032+1829-wip

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Feb 1, 2026

📦 New work-in-progress (wip) builds are available for 5.3.1.26032+1937-wip

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Feb 1, 2026

📦 New work-in-progress (wip) builds are available for 6.0.0.26032+1956-wip

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Feb 1, 2026

📦 New work-in-progress (wip) builds are available for 6.0.0.26032+2005-wip

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Feb 1, 2026

📦 New work-in-progress (wip) builds are available for 6.0.0.26032+2008-wip

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Feb 1, 2026

📦 New public release are available for 6.0.0.26032+2040

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Feb 1, 2026

📦 New public release are available for 6.0.0.26032+2040

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Tools Issues related to pyRevit commands [subsystem]

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants