fix: preserve entity selection when navigating between viewer and editor#152
fix: preserve entity selection when navigating between viewer and editor#152R-Hart80 wants to merge 1 commit into
Conversation
1. "Open Editor" in the viewer now appends ?classIri=<encoded> when an entity is selected, so the editor restores the same selection on load. The editor already reads this param (classIri at page.tsx:54). 2. The "Back" link in the editor header is replaced with "Close Editor" (Eye icon) and also carries ?classIri=<encoded> back to the viewer, so the selection survives the round-trip. 3. The ContinuousEditingToggle button is removed from the editor toolbar. The toggle duplicated the concept of "being in the editor" and its per-entity auto-enter logic is superseded by the viewer↔editor navigation now preserving selection explicitly. The underlying continuousEditing store preference is left in place for future use in settings. Closes CatholicOS#98 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
Warning Rate limit exceeded
Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 50 minutes and 38 seconds. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
✨ 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 |
|
Closing as duplicate of #104, which addresses the same issue (#98) with a broader scope (also implements item 6 — auto-enter edit mode in detail panels — and removes the now-orphaned ContinuousEditingToggle component and test). The remaining gaps in #104 (preserving the user preference per issue items 4-5, plus a small cleanup) are being folded into #104 directly. Thanks for the contribution! |
Restore the persisted preference that was previously named "continuousEditing" under the new name "preferEditMode" with the semantics issue #98 calls for: "open ontology in edit mode by default" rather than the redundant per-entity toggle the old name implied. - Re-add preferEditMode + setPreferEditMode to editorModeStore (default false). - Replace the unconditional !!onUpdate* auto-enter trigger in ClassDetailPanel, PropertyDetailPanel, and IndividualDetailPanel with a check against preferEditMode, so users opt in to skipping the "Edit Item" click. - Surface the preference as a toggle in app/settings (User Settings → Editor Preferences) using the Pencil icon. - Drop a stray blank line left where the ContinuousEditingToggle import was removed from app/projects/[id]/editor/page.tsx. - Update detail panel test mocks to default preferEditMode: true (matching the editor-context behavior they exercise) and add explicit gating tests that assert no auto-enter when preferEditMode is off. - Cover the new field/setter in editorModeStore tests. Closes the items 4 and 5 gap from issue #98 that the original PR #104 had deferred. PR #152 is being closed as a duplicate of this one. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Closes #98
Summary
?classIri=<encoded>when an entity is selected. The editor already reads this param to restore the selected node on load./projects/{id}?classIri=<encoded>, so the viewer restores the same selection on return.continuousEditingstore preference is preserved for future use in settings.What was NOT changed
Items 4 and 5 from the issue (repurposing
continuousEditingas a default-open-in-editor preference, and simplifying detail panel edit state) are left for a follow-up — they touchClassDetailPanel,PropertyDetailPanel,IndividualDetailPanel, and the store, which carries more risk and warrants its own PR.Test plan
classIriparam in the URL)🤖 Generated with Claude Code