Add MyDocument page editing, import/export, and page creation#3692
Merged
tuomas2 merged 13 commits intocurrent-stablefrom Mar 18, 2026
Merged
Add MyDocument page editing, import/export, and page creation#3692tuomas2 merged 13 commits intocurrent-stablefrom
tuomas2 merged 13 commits intocurrent-stablefrom
Conversation
- Inline editing of MyDocument pages via MarkdownEditor/HtmlEditor in WebView, triggered from footer edit link - New MyDocFooter component replaces AiFooter, shows edit link for all MyDocument pages and regenerate/delete for AI pages - MyDocumentPagesActivity: new page creation (with content type selection), Markdown/HTML file import, and page export - Bridge methods: getMyDocumentPageRawContent, saveMyDocumentPageContent, reloadMyDocumentPage - Window listens to MyDocumentUpdatedEvent to reload only affected windows - MarkdownEditor scroll fix: preserve scroll position during auto-resize
Resolve conflicts in OsisDocument.vue, OsisSegment.vue, and MyDocumentBackend.kt by keeping current-stable's approach: AiFooter as Vue component instead of backend-embedded MyDocFooter.
Export writes all pages as numbered files (01-Title.md) to a user-selected folder. Import creates a new document from multiple selected .md/.html files.
Remove AiFooter.vue and consolidate into MyDocFooter.vue with isAiPage prop. All MyDocument pages get edit button; AI pages also get regenerate and delete. Use FontAwesome icons instead of emoji characters. Add FontAwesome usage note to CLAUDE.md.
Move "Imported", "page", and "Page N" fallback strings to strings.xml for localization.
Remove ab-action:// URL scheme and AiDocumentAction enum from BibleView. Edit uses eventbus emit directly in Vue.js. Regenerate and delete call new JS interface methods. Footer uses buttons instead of links.
Re-add EditableText component, edit mode state, and eventbus listener for start_mydocument_edit that was lost during merge conflict resolution. Add .stop modifier to footer buttons to prevent event bubbling.
Guard SwordGenBook.getKey() calls with try-catch for NullPointerException when the book's internal key map is not initialized. Affects both MyDocumentPagesActivity and MyDocumentsActivity result handlers.
Pass pageId with start_mydocument_edit event so only the correct OsisDocument instance opens the editor when multiple pages are loaded via infinite scroll.
Deactivate the old SwordGenBook in Activator before unregistering it. Without this, the Activator's HashSet retained the old instance, and because AbstractBookMetaData.equals/hashCode matches by name+initials, the newly registered book was never activated — leaving SwordGenBook's internal key map null and causing NPE in getKey(). Also reverts the try-catch workaround from cdcf8fa which masked the real issue.
Combine the separate MyDoc action buttons (edit/regenerate/delete) and whole-page bookmark icons into a single ButtonRow-based toggle menu component at the top of each OsisDocument. The toggle icon shows a bookmark icon when bookmarks exist, or ellipsis otherwise.
Instead of destroying and recreating the SwordGenBook instance (which causes stale Activator entries due to equals/hashCode matching by name+initials), reuse the existing instance by deactivating and reactivating it. This forces readIndex() to reload pages from the database while keeping the same object identity in Activator's set.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Test plan