fiftyone
fiftyone copied to clipboard
fix adaptive menu hidden items
What changes are proposed in this pull request?
Fix error from lastVisibleItem not existing:
Also handle duplicate ids in the indexing that can cause the buttons rendered to not match the number of items... not sure how this happens though and it prob should be handled earlier
How is this patch tested? If it is not, please explain why.
- run locally
Release Notes
Is this a user-facing change that should be mentioned in the release notes?
- [ ] No. You can skip the rest of this section.
- [ ] Yes. Give a description of this change to be included in the release notes for FiftyOne users.
(Details in 1-2 sentences. You can just refer to another PR with a description if this PR is part of a larger change.)
What areas of FiftyOne does this PR affect?
- [ ] App: FiftyOne application changes
- [ ] Build: Build and test infrastructure changes
- [ ] Core: Core
fiftyone
Python library changes - [ ] Documentation: FiftyOne documentation changes
- [ ] Other
Summary by CodeRabbit
-
New Features
- Enhanced the
AdaptiveMenu
component to handle duplicate item IDs, ensuring uniqueness and preventing errors. - Improved logic for item movement based on priority, refining user interactions.
- Updated visibility calculations for menu items to enhance user experience.
- Enhanced the
-
Bug Fixes
- Resolved potential issues with item visibility and movement logic.