Improve note preview#3155
Merged
Merged
Conversation
Signed-off-by: alperozturk96 <alper_ozturk@proton.me>
Signed-off-by: alperozturk96 <alper_ozturk@proton.me>
Collaborator
Author
|
/backport to stable-33.1.0 |
Not up to standards ⛔🔴 Issues
|
| Category | Results |
|---|---|
| Documentation | 4 minor |
| CodeStyle | 1 minor |
| Complexity | 5 medium |
🟢 Metrics 26 complexity · 0 duplication
Metric Results Complexity 26 Duplication 0
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. Give us feedback
Contributor
|
APK file: https://github.com/nextcloud/notes-android/actions/runs/24773634499/artifacts/6576631874 |
tobiasKaminsky
approved these changes
Apr 23, 2026
4 tasks
jancborchardt
added a commit
that referenced
this pull request
May 22, 2026
generateNoteExcerpt() always truncated to 200 chars via truncateString() on the markdown path, but the sanitizeHtml() path added in #3155 returned the full content untruncated. Any note whose content matches the broad HTML_PATTERN (which includes informal tags like <todo>, <action>, generics like List<String>, or Markdown email syntax) would have its full 35-41 kB stored as the excerpt. On every search keystroke, the adapter called textView.setText() and highlightText() with those large strings on the main thread for every visible item, blocking the UI for several seconds. Fix: strip remaining HTML tags and truncate to 200 chars in sanitizeHtml(), consistent with the markdown path. Search still operates on the full note content via SQL LIKE. Fixes: #3180 AI-assisted: Claude Code (Sonnet 4.6) Signed-off-by: Jan C. Borchardt <925062+jancborchardt@users.noreply.github.com>
alperozturk96
pushed a commit
that referenced
this pull request
May 26, 2026
generateNoteExcerpt() always truncated to 200 chars via truncateString() on the markdown path, but the sanitizeHtml() path added in #3155 returned the full content untruncated. Any note whose content matches the broad HTML_PATTERN (which includes informal tags like <todo>, <action>, generics like List<String>, or Markdown email syntax) would have its full 35-41 kB stored as the excerpt. On every search keystroke, the adapter called textView.setText() and highlightText() with those large strings on the main thread for every visible item, blocking the UI for several seconds. Fix: strip remaining HTML tags and truncate to 200 chars in sanitizeHtml(), consistent with the markdown path. Search still operates on the full note content via SQL LIKE. Fixes: #3180 AI-assisted: Claude Code (Sonnet 4.6) Signed-off-by: Jan C. Borchardt <925062+jancborchardt@users.noreply.github.com>
alperozturk96
pushed a commit
that referenced
this pull request
May 28, 2026
generateNoteExcerpt() always truncated to 200 chars via truncateString() on the markdown path, but the sanitizeHtml() path added in #3155 returned the full content untruncated. Any note whose content matches the broad HTML_PATTERN (which includes informal tags like <todo>, <action>, generics like List<String>, or Markdown email syntax) would have its full 35-41 kB stored as the excerpt. On every search keystroke, the adapter called textView.setText() and highlightText() with those large strings on the main thread for every visible item, blocking the UI for several seconds. Fix: strip remaining HTML tags and truncate to 200 chars in sanitizeHtml(), consistent with the markdown path. Search still operates on the full note content via SQL LIKE. Fixes: #3180 AI-assisted: Claude Code (Sonnet 4.6) Signed-off-by: Jan C. Borchardt <925062+jancborchardt@users.noreply.github.com>
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.
No description provided.