Skip to content

Feature/inline image viewing#3190

Closed
amalg wants to merge 4 commits into
nextcloud:mainfrom
amalg:feature/inline-image-viewing
Closed

Feature/inline image viewing#3190
amalg wants to merge 4 commits into
nextcloud:mainfrom
amalg:feature/inline-image-viewing

Conversation

@amalg
Copy link
Copy Markdown

@amalg amalg commented May 16, 2026

🖼️ Screenshots

🏚️ Before 🏡 After
B A

🏁 Checklist

  • 🧪 Tests written, or not not needed

amalg and others added 4 commits May 14, 2026 23:31
Set the Nextcloud server URL as the markdown image prefix so that
relative image paths (/.attachments/, /f/fileId, etc.) are converted
to full URLs that can be loaded with SSO authentication.

Fixes nextcloud#1877

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Transform attachment paths to WebDAV URLs for proper image loading
- Include note category in path for notes in subfolders
- Apply transformation on refresh to maintain image display
- Prevent saving transformed URLs back to server
- Hide edit FAB in preview mode, use toolbar menu icon instead

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Edit mode previously showed only the raw markdown source for image
attachments. It now replaces each ![alt](.attachments...) reference with
the rendered image via a ReplacementSpan, loaded through SSO-Glide. The
markdown characters remain in the note content, so saving is unaffected.

- Add AttachmentUrlUtil with the shared attachment-path to WebDAV URL
  transform, used by both preview and edit modes
- Add AttachmentImagePreviewSpan, a ReplacementSpan that draws the image
  in place of the markdown
- Add AttachmentPreviewController to scan content, attach spans, load
  images downsampled, and re-scan on a debounce as the note is edited
- Refactor NotePreviewFragment to use the shared AttachmentUrlUtil
@codacy-production
Copy link
Copy Markdown

Not up to standards ⛔

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

🟢 Metrics 53 complexity · 0 duplication

Metric Results
Complexity 53
Duplication 0

View in Codacy

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

@amalg
Copy link
Copy Markdown
Author

amalg commented May 16, 2026

Closing: this branch was opened against upstream by mistake. It is intended for my personal fork (amalg/notes-android), not as an upstream contribution.

@amalg amalg closed this May 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant