-
Notifications
You must be signed in to change notification settings - Fork 10
fix: Fix QtViewer initialization as preparation for napari 0.7.0
#1351
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
Reviewer's guide (collapsed on small PRs)Reviewer's GuideAdjusts NapariQtViewer initialization to be compatible with napari 0.7.0 by safely accessing the main widget layout before modifying margins. Class diagram for updated NapariQtViewer initializationclassDiagram
class QtViewer
class NapariQtViewer {
+NapariQtViewer(viewer)
+dragEnterEvent(event)
}
NapariQtViewer --|> QtViewer
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
📝 WalkthroughWalkthroughThis PR updates a project dictionary entry version and adds a new QtViewer entry, while also adding a defensive null-check guard around layout margin adjustments in the NapariQtViewer initialization to prevent failures when layout is unavailable. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey - I've left some high level feedback:
- Consider making the version-dependent behavior explicit (e.g., via a helper or version check) instead of relying on
layout is not Noneplus a comment, so future maintainers understand in which napari versions this branch is expected to run.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- Consider making the version-dependent behavior explicit (e.g., via a helper or version check) instead of relying on `layout is not None` plus a comment, so future maintainers understand in which napari versions this branch is expected to run.Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #1351 +/- ##
===========================================
- Coverage 93.17% 93.15% -0.02%
===========================================
Files 210 210
Lines 33251 33253 +2
===========================================
- Hits 30981 30978 -3
- Misses 2270 2275 +5 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|



Summary by Sourcery
Bug Fixes:
Summary by CodeRabbit
Bug Fixes
Chores