Skip to content

Conversation

Ahmed-Naguib93
Copy link
Contributor

@Ahmed-Naguib93 Ahmed-Naguib93 commented Oct 11, 2024

refs: MBL-17838
affects: Student , Teacher
release note: Fixed issues after pasting long text in inbox messages.

Fixed an issue where pasting long text and typing in the middle moved the cursor to the end.

Test Plane

1- Open new message.
2- Set long text.
3- Start type in the middle on the text and set new line will work fine.

Screenshots

Simulator.Screen.Recording.-.iPhone.15.Pro.Max.-.2024-10-11.at.13.51.35.mp4

Checklist

  • Tested on phone
  • Tested on tablet
  • Tested on iOS 17
  • Tested on iOS 18

refs:MBL-17838
affects:Student, Teacher
release note: Moved the cursor to the end when pasting long text

test plan:
refs:MBL-17838
affects:Student, Teacher
release note: Moved the cursor to the end when pasting long text

test plan:
@inst-danger
Copy link
Contributor

inst-danger commented Oct 11, 2024

Teacher Build QR Code:

@inst-danger
Copy link
Contributor

inst-danger commented Oct 11, 2024

Student Build QR Code:

@Ahmed-Naguib93 Ahmed-Naguib93 self-assigned this Oct 11, 2024
@inst-danger
Copy link
Contributor

inst-danger commented Oct 11, 2024

Warnings
⚠️ One or more files are below the minimum test coverage 50%

Release Note:

Fixed an issue where pasting long text and typing in the middle moved the cursor to the end.

Affected Apps: Student, Teacher

MBL-17838

Coverage New % Master % Delta
Canvas iOS 91.18% 91.18% -0%
Core/Core/Planner/CalendarEvent/Model/API/PostCalendarEventRequest.swift 0% 0% 0%
Core/Core/Planner/CalendarEvent/View/CustomFrequencyComponents/OccurrencesCountInputDialog.swift 0% 0% 0%
Core/Core/Planner/CalendarEvent/Model/Helpers/RecurrenceRule+SelectionDescription.swift 43.33% 43.33% 0%
Core/Core/Grades/View/CustomSwipeAction.swift 0% 0% 0%

Generated by 🚫 dangerJS against 18d0f50

Copy link
Collaborator

@vargaat vargaat left a comment

Choose a reason for hiding this comment

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

I get this strange behavior on iOS 17.5.1. Besides that, I think we can't just scroll to the end of the text (where attachments are) because the user is not necessarily pasting text at the end of the message. The original bug was about when you enter some characters after pasting a long text the characters are not entered to where the cursor is visible but instead at the end of the document. If we could fix that alone would be enough, if we could scroll to the end of the pasted text that would nice to have.

RPReplay_Final1728996199.MP4

refs: MBL-17838
affects: Student , Teacher
release note: Moved the cursor to the end when pasting long text

test plan:
refs:MBL-17838
affects:Student , Teacher
release note:Moved the cursor to the end when pasting long text

test plan:
refs:MBL-17838
affects:Student , Teacher
release note:Moved the cursor to the end when pasting long text

test plan:
@Ahmed-Naguib93
Copy link
Contributor Author

Ahmed-Naguib93 commented Oct 15, 2024

I get this strange behavior on iOS 17.5.1. Besides that, I think we can't just scroll to the end of the text (where attachments are) because the user is not necessarily pasting text at the end of the message. The original bug was about when you enter some characters after pasting a long text the characters are not entered to where the cursor is visible but instead at the end of the document. If we could fix that alone would be enough, if we could scroll to the end of the pasted text that would nice to have.

RPReplay_Final1728996199.MP4

Thanks for your comment and your are right. The issue is now fixed, but I removed the feature that scrolls to the bottom when pasting text. It was misleading because if the text was pasted in the middle, it would incorrectly scroll to the bottom.

Simulator.Screen.Recording.-.iPhone.15.Pro.Max.-.2024-10-15.at.23.42.27.mp4

refs:MBL-17838
affects:Student , Teacher
release note:Moved the cursor to the end when pasting long text

test plan:
refs:MBL-17838
affects:Student , Teacher
release note: Fixed an issue where pasting long text and typing in the middle moved the cursor to the end.

test plan:
@Ahmed-Naguib93 Ahmed-Naguib93 changed the title Move the cursor to the end when pasting long text Fixed an issue where pasting long text and typing in the middle moved the cursor to the end. Oct 15, 2024
refs:MBL-17838
affects:Student , Teacher
release note:Fixed an issue where pasting long text and typing in the middle moved the cursor to the end.

test plan:
refs:MBL-17838
affects:Student , Teacher
release note: Fixed an issue where pasting long text and typing in the middle moved the cursor to the end.

test plan:
refs:MBL-17838
affects:Student , Teacher
release note: Fixed an issue where pasting long text and typing in the middle moved the cursor to the end.

test plan:
refs:MBL-17838
affects:Student , Teacher
release note:Fixed an issue where pasting long text and typing in the middle moved the cursor to the end.

test plan:
refs: MBL-17838
affects: Student , Teacher
release note: Fixed an issue where pasting long text and typing in the middle moved the cursor to the end.

test plan:
refs:MBL-17838
affects: Student , Teacher
release note: Fixed an issue where pasting long text and typing in the middle moved the cursor to the end.

test plan:
refs:MBL-17838
affects: Student , Teacher
release note:Fixed an issue where pasting long text and typing in the middle moved the cursor to the end.

test plan:
@Ahmed-Naguib93 Ahmed-Naguib93 requested a review from rh12 October 17, 2024 10:28
Copy link
Contributor

@rh12 rh12 left a comment

Choose a reason for hiding this comment

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

QA + 1
The original issue is fixed, but there is a known issue with InstUI.TextEditorCell on iOS 17.
It's mentioned in the PR introducing it, but please add this text to the code:
As a doc comment just before InstUI.TextEditorCell:

    /// Known issue on iOS 17 (but not on iOS 16):
    ///   TextEditor jumps to the top, when the top was already scrolled out of view, and some text is pasted at or near the bottom.
    ///   Continuing typing jumps back to the cursor, which stayed correctly at the end of the pasted text.

Please test this behaviour on iOS 18 as well, if you can, and add that to the doc comment accordingly. (I only have iOS 17 test devices at the moment)

@Ahmed-Naguib93
Copy link
Contributor Author

InstUI.TextEditorCell on iOS 17.

Yes, I have tested it on iOS 18.0.1, and it is working fine. This is a standard UITextView, an older controller.

@rh12
Copy link
Contributor

rh12 commented Oct 17, 2024

Yes, I have tested it on iOS 18.0.1, and it is working fine. This is a standard UITextView, an older controller.

Sorry, I tested the right thing, but wrote about the other thing... anyway, please disregard the PR comment above about the doc comment in code.

Approving

Copy link
Collaborator

@szabinst szabinst left a comment

Choose a reason for hiding this comment

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

QA + 1

Copy link
Contributor

@suhaibabsi-inst suhaibabsi-inst left a comment

Choose a reason for hiding this comment

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

QA + 1

@rh12 rh12 merged commit 42959c9 into master Oct 21, 2024
5 checks passed
@rh12 rh12 deleted the feature/MBL-17838-Typing-in-long-pasted-text-moves-the-cursor-to-the-end branch October 21, 2024 09:53
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.

6 participants