Add Split Button Functionality for Level Navigation#3043
Add Split Button Functionality for Level Navigation#3043jmcouffin merged 2 commits intopyrevitlabs:developfrom
Conversation
There was a problem hiding this comment.
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
...ls.extension/pyRevit.tab/Modify.panel/3D.pulldown/Section Box Navigator.pushbutton/script.py
Show resolved
Hide resolved
...ls.extension/pyRevit.tab/Modify.panel/3D.pulldown/Section Box Navigator.pushbutton/script.py
Show resolved
Hide resolved
...ls.extension/pyRevit.tab/Modify.panel/3D.pulldown/Section Box Navigator.pushbutton/script.py
Outdated
Show resolved
Hide resolved
...ls.extension/pyRevit.tab/Modify.panel/3D.pulldown/Section Box Navigator.pushbutton/script.py
Show resolved
Hide resolved
...ls.extension/pyRevit.tab/Modify.panel/3D.pulldown/Section Box Navigator.pushbutton/script.py
Show resolved
Hide resolved
- always wire up - valid box check - remove None returns
|
no comments on my side |
|
📦 New work-in-progress (wip) builds are available for 5.3.1.26032+1543-wip |
|
📦 New work-in-progress (wip) builds are available for 5.3.1.26032+1553-wip |
|
📦 New work-in-progress (wip) builds are available for 5.3.1.26032+1612-wip |
|
📦 New work-in-progress (wip) builds are available for 5.3.1.26032+1624-wip |
|
📦 New work-in-progress (wip) builds are available for 5.3.1.26032+1738-wip |
|
📦 New work-in-progress (wip) builds are available for 5.3.1.26032+1743-wip |
|
📦 New work-in-progress (wip) builds are available for 5.3.1.26032+1829-wip |
|
📦 New work-in-progress (wip) builds are available for 5.3.1.26032+1937-wip |
|
📦 New work-in-progress (wip) builds are available for 6.0.0.26032+1956-wip |
|
📦 New work-in-progress (wip) builds are available for 6.0.0.26032+2005-wip |
|
📦 New work-in-progress (wip) builds are available for 6.0.0.26032+2008-wip |
|
📦 New public release are available for 6.0.0.26032+2040 |
|
📦 New public release are available for 6.0.0.26032+2040 |
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
User Experience
Before: Click button → move to next level only
After:
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:
pipenv run black {source_file_or_directory}Related Issues
If applicable, link the issues resolved by this pull request:
Additional Notes
Maybe AI was involved 😉
Thank you for contributing to pyRevit! 🎉