Skip to content

Refactor NoteEditor to use a AnkiActivity instead of SingleFragmentActivity#18836

Merged
david-allison merged 1 commit intoankidroid:mainfrom
Haz3-jolt:NoteEditor
Jul 17, 2025
Merged

Refactor NoteEditor to use a AnkiActivity instead of SingleFragmentActivity#18836
david-allison merged 1 commit intoankidroid:mainfrom
Haz3-jolt:NoteEditor

Conversation

@Haz3-jolt
Copy link
Member

@Haz3-jolt Haz3-jolt commented Jul 10, 2025

Purpose / Description

  • Renames note_editor.xml to note_editor_fragment.xml
  • Introduce Activity to Host NoteEditor

Fixes

Approach

  • Introduces NoteEditorActivity
  • Uses a Interface in NoteEditorFragment to get toolbar from activity layout

Checklist

  • You have a descriptive commit message with a short title (first line, max 50 chars).
  • You have commented your code, particularly in hard-to-understand areas
  • You have performed a self-review of your own code
  • UI changes: include screenshots of all affected screens (in particular showing any new or changed strings)
  • UI Changes: You have tested your change using the Google Accessibility Scanner

@Haz3-jolt Haz3-jolt added Review High Priority Request for high priority review Needs Review GSoC Pull requests authored by a Google Summer of Code participant [Candidate/Selected], for GSoC mentors labels Jul 10, 2025
@Haz3-jolt
Copy link
Member Author

@david-allison I think LayoutValidationTest is flaky. I tried running it locally on my main branch and it still fails.

@BrayanDSO BrayanDSO removed the Review High Priority Request for high priority review label Jul 10, 2025
@BrayanDSO
Copy link
Member

You can specify the number of iterations of the Unit tests workflow to test if something is flaky.

Copy link
Member

@david-allison david-allison left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cheers! CI failure

@david-allison
Copy link
Member

CI is passing on main. It's likely related to this PR If all 3 test runs failed

@Haz3-jolt
Copy link
Member Author

Cheers! CI failure

Tried many reruns, LayoutValidationTest seems to fail on a fresh branch? What should I do about it

@Haz3-jolt
Copy link
Member Author

CI is passing on main. It's likely related to this PR If all 3 test runs failed

I'll check again

@sanjaysargam
Copy link
Member

@Haz3-jolt
Input field is not gaining focus, so the keyboard isn’t appearing.

@Haz3-jolt Haz3-jolt marked this pull request as draft July 11, 2025 07:37
@sanjaysargam sanjaysargam added the Needs Author Reply Waiting for a reply from the original author label Jul 11, 2025
@Haz3-jolt Haz3-jolt removed the Needs Author Reply Waiting for a reply from the original author label Jul 11, 2025
@Haz3-jolt Haz3-jolt force-pushed the NoteEditor branch 10 times, most recently from 5ed38fb to ec8e779 Compare July 12, 2025 11:33
@Haz3-jolt
Copy link
Member Author

@Haz3-jolt Input field is not gaining focus, so the keyboard isn’t appearing.

Yeah I kinda don't understand why showsoftinput isn't working when requestfocus() seems to work fine. I'll try to get it fixed

@Arthur-Milchior Arthur-Milchior added Needs Author Reply Waiting for a reply from the original author and removed Needs Review labels Jul 14, 2025
@Haz3-jolt Haz3-jolt added Needs Review and removed Needs Author Reply Waiting for a reply from the original author labels Jul 15, 2025
@david-allison david-allison reopened this Jul 16, 2025
Copy link
Member

@david-allison david-allison left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking great! I believe there's an issue with replace if Don't Keep Activities is enabled (Fragment would lose state on restore)

@david-allison david-allison added the Needs Author Reply Waiting for a reply from the original author label Jul 17, 2025
@Haz3-jolt Haz3-jolt removed the Needs Author Reply Waiting for a reply from the original author label Jul 17, 2025
@Haz3-jolt Haz3-jolt requested a review from david-allison July 17, 2025 11:36
Copy link
Member

@david-allison david-allison left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great, cheers!

@david-allison david-allison added Needs Second Approval Has one approval, one more approval to merge and removed Needs Review labels Jul 17, 2025
@david-allison david-allison added Pending Merge Things with approval that are waiting future merge (e.g. targets a future release, CI wait, etc) and removed Needs Second Approval Has one approval, one more approval to merge labels Jul 17, 2025
@david-allison david-allison added this pull request to the merge queue Jul 17, 2025
Merged via the queue into ankidroid:main with commit a7ee965 Jul 17, 2025
10 checks passed
@github-actions github-actions bot added this to the 2.22 release milestone Jul 17, 2025
@github-actions github-actions bot removed the Pending Merge Things with approval that are waiting future merge (e.g. targets a future release, CI wait, etc) label Jul 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

GSoC Pull requests authored by a Google Summer of Code participant [Candidate/Selected], for GSoC mentors

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants