Fixed Geometry Viewer not auto-updating on first query execution afte…#9785
Fixed Geometry Viewer not auto-updating on first query execution afte…#9785anilsahoo20 wants to merge 3 commits intopgadmin-org:masterfrom
Conversation
…r View/Edit Data to Query Tool promotion. pgadmin-org#9392
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
WalkthroughReplaced the GeometryViewer's previous keyless rendering by computing a memoized Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
🚥 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.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@web/pgadmin/tools/sqleditor/static/js/components/sections/ResultSet.jsx`:
- Around line 1499-1505: The code currently forces a full remount of
GeometryViewer by incrementing gvRenderKeyRef.current in openGeometryViewerTab
and passing it as the key to <GeometryViewer />, which discards viewer-local
state; stop bumping and using that key so the viewer instance remains stable
across data refreshes. Edit the openGeometryViewerTab implementation (and remove
gvRenderKeyRef usage) so layoutDocker.openTab({ id: PANELS.GEOMETRY, title:
gettext('Geometry Viewer'), content: <GeometryViewer rows={rowsData}
columns={columns} column={column}/> }) is used instead, leaving map-level
rekeying inside GeometryViewer (MapContainer keyed by SRID/column) to handle
necessary updates. Ensure any leftover gvRenderKeyRef declarations are removed
or unused.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 7b316552-3e2e-480b-968b-4893c923180b
📒 Files selected for processing (1)
web/pgadmin/tools/sqleditor/static/js/components/sections/ResultSet.jsx
…r View/Edit Data to Query Tool promotion. #9392
Summary by CodeRabbit