Skip to content

Move simple Edit Button from top to right bottom corner to prevent cover - #3246

Merged
daniele-verducci merged 2 commits into
nextcloud:move-simple-edit-buttonsfrom
chrissooo:move-simple-edit-buttons
Aug 28, 2026
Merged

Move simple Edit Button from top to right bottom corner to prevent cover#3246
daniele-verducci merged 2 commits into
nextcloud:move-simple-edit-buttonsfrom
chrissooo:move-simple-edit-buttons

Conversation

@chrissooo

@chrissooo chrissooo commented Jul 1, 2026

Copy link
Copy Markdown

Like in #3241 reported, the plain edit mode Button covers the note text when the rich mod edit is deactivated. In this PR i moved the Big Button in the right bottom corner an follow the stype and position of the rich mode button. I leave the PR small and hope it will be accepted.

🖼️ Screenshots

🏚️ Before
Screenshot_20260701-222148

🏡 After
Screenshot_20260701-222214

🏁 Checklist

  • ⛑️ Tests (unit and/or integration) are included or not needed
  • 🔙 Backport requests are created or not needed: /backport to stable-xx.x
  • 📅 Milestone is set
  • 🌸 PR title is meaningful (if it should be in the changelog: is it meaningful to users?)

🤖 AI (if applicable)

  • The content of this PR was partly or fully generated using AI

@codacy-production

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

🟢 Metrics 0 complexity

Metric Results
Complexity 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.

@chrissooo

Copy link
Copy Markdown
Author

There is also a bigger PR that fix also the same problem and more: #3248

@chrissooo chrissooo closed this Jul 2, 2026
@chrissooo chrissooo reopened this Jul 2, 2026
@tobiasKaminsky

Copy link
Copy Markdown
Member

Thank you!
Can you check DCO?

@github-actions

Copy link
Copy Markdown
Contributor

Hello there,
Thank you so much for taking the time and effort to create a pull request to our Nextcloud project.

We hope that the review process is going smooth and is helpful for you. We want to ensure your pull request is reviewed to your satisfaction. If you have a moment, our community management team would very much appreciate your feedback on your experience with this PR review process.

Your feedback is valuable to us as we continuously strive to improve our community developer experience. Please take a moment to complete our short survey by clicking on the following link: https://cloud.nextcloud.com/apps/forms/s/i9Ago4EQRZ7TWxjfmeEpPkf6

Thank you for contributing to Nextcloud and we hope to hear from you soon!

(If you believe you should not receive this message, you can add yourself to the blocklist.)

…ver note text

Signed-off-by: chrissooo <christof@federowicz.de>
@alperozturk96
alperozturk96 force-pushed the move-simple-edit-buttons branch from 333d9a3 to d062624 Compare August 10, 2026 07:48
@alperozturk96

Copy link
Copy Markdown
Collaborator

@chrissooo Thank you for the PR.

How can I test this? I have local dev environment. Could you please share the steps to test thus I can verify the changes?

@daniele-verducci

Copy link
Copy Markdown

@alperozturk96 you have to go to settings and disable Direct Editing to be able to replicate the issue.
This fixed, as the OP said, #3241 , but also #2852 .
I could replicate the issue, tested this PR and works correctly... almost.

A crash can be induced doing this:

  • search for a text that doesn't exist (the search arrows appears and then disappears when nothing is found, and the FAB appears)
  • click the FAB
  • the app crashes
2026-08-28 15:46:11.411 20760-20760 AndroidRuntime          it.niedermann.owncloud.notes.dev     E  FATAL EXCEPTION: main
                                                                                                    Process: it.niedermann.owncloud.notes.dev, PID: 20760
                                                                                                    java.lang.IllegalStateException: Fragment NotePreviewFragment{1dba1af} (e67209a3-ed09-41f1-b37e-ff1bd4847be8) not attached to a context.
                                                                                                    	at androidx.fragment.app.Fragment.requireContext(Fragment.java:977)
                                                                                                    	at it.niedermann.owncloud.notes.edit.SearchableBaseNoteFragment.isDirectEditEnabled(SearchableBaseNoteFragment.java:136)
                                                                                                    	at it.niedermann.owncloud.notes.edit.SearchableBaseNoteFragment.hideSearchFabs(SearchableBaseNoteFragment.java:315)
                                                                                                    	at it.niedermann.owncloud.notes.edit.SearchableBaseNoteFragment.-$$Nest$mhideSearchFabs(SearchableBaseNoteFragment.java:0)
                                                                                                    	at it.niedermann.owncloud.notes.edit.SearchableBaseNoteFragment$1.onGlobalLayout(SearchableBaseNoteFragment.java:169)
                                                                                                    	at android.view.ViewTreeObserver.dispatchOnGlobalLayout(ViewTreeObserver.java:1166)
                                                                                                    	at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:4789)
                                                                                                    	at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:3386)
                                                                                                    	at android.view.ViewRootImpl$TraversalCallback.onVsync(ViewRootImpl.java:11522)
                                                                                                    	at android.view.Choreographer$CallbackRecord.run(Choreographer.java:1845)
                                                                                                    	at android.view.Choreographer.doCallbacks(Choreographer.java:1387)
                                                                                                    	at android.view.Choreographer.doFrame(Choreographer.java:1244)
                                                                                                    	at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:1821)
                                                                                                    	at android.os.Handler.handleCallback(Handler.java:1082)
                                                                                                    	at android.os.Handler.dispatchMessageImpl(Handler.java:135)
                                                                                                    	at android.os.Handler.dispatchMessage(Handler.java:126)
                                                                                                    	at android.os.Looper.loopOnce(Looper.java:295)
                                                                                                    	at android.os.Looper.loop(Looper.java:398)
                                                                                                    	at android.app.ActivityThread.main(ActivityThread.java:9569)
                                                                                                    	at java.lang.reflect.Method.invoke(Native Method)
                                                                                                    	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:575)
                                                                                                    	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:918)

This is not introduced by this PR's code, but happens when isDirectEditEnabled() is called when there's no context. Being a value that doesn't change, I propose to have it read on the fragment start and to keep it in a class variable. Reading it every time from shared preferences isn't any better...

@daniele-verducci daniele-verducci self-assigned this Aug 28, 2026
@daniele-verducci
daniele-verducci changed the base branch from main to move-simple-edit-buttons August 28, 2026 15:19
@daniele-verducci
daniele-verducci merged commit 403b6ba into nextcloud:move-simple-edit-buttons Aug 28, 2026
10 of 15 checks passed
@daniele-verducci

daniele-verducci commented Aug 28, 2026

Copy link
Copy Markdown

Hey @chrissooo , thank you a lot for the contribution! I merged to a branch I have write access on, so I can fix the crash and hopefully have it reviewed and merged. Will keep you informed.

Edit: new PR is here: #3328

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants