Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix selection in readOnly mode, Add magnifier via RawMagnifier widget #2529

Open
wants to merge 12 commits into
base: master
Choose a base branch
from

Conversation

mtallenca
Copy link
Contributor

@mtallenca mtallenca commented Apr 2, 2025

Description

  1. Allow selection in read only mode
  2. Displays magnifier when dragging on iOS/Android

Related Issues

Type of Change

  • Feature: New functionality without breaking existing features.
  • 🛠️ Bug fix: Resolves an issue without altering current behavior.

@CatHood0
Copy link
Collaborator

CatHood0 commented Apr 5, 2025

From what I see, this restores the magnifier behavior, right?

We've had issues with this implementation before, and it led to some problems during rollbacks.

For the reasons mentioned above, it's best to test this PR until we know it won't cause us problems, like it did last time.

In any case, thank you for taking the time and effort to make these changes.

@CatHood0 CatHood0 requested review from EchoEllet and CatHood0 April 5, 2025 11:08
@mtallenca
Copy link
Contributor Author

This does restore magnifier behavior. I did not create the previous magnifier implementation, but I did fix some of it's bugs that had been merged. However, this is a completely different implementation that is using Flutter's RawMagnifier widget in the Widget tree (see text_selection.dart) instead of changing events / config / etc throughout the editor. The other dart changes in this PR are just passing a ValueNotifier around, and that ValueNotifier is only used in text_selection.dart.

(This PR also has some selection fixes when in read only mode)

I agree needs to be tested. I have an internal team of 8, 1.2 million app users creating just over 10K notes a day. They have been running the 10.8.5 version that had my previous magnifier fixes. Prior to the fixes, we received several support tickets about the magnifier bugs, since the fixes no reports.

After we finish internal testing, we will do a rollout to our users and the feature will be used there. We have finished updating to flutter_quill 11.x and require the selection and magnification changes.

@EchoEllet EchoEllet changed the title Allow selection in readonly mode, added magnifier via RawMagnifier widget Fix selection in readOnly mode, Add magnifier via RawMagnifier widget Apr 8, 2025
…llMangifierBuilder, also added a defaultQuillMagnifierBuilder function, when not specified the magnifier will not be used.
@EchoEllet
Copy link
Collaborator

As a minor note, we should update the v11 migration guide to inform clients that the magnifier has been restored in version X after it was removed. This is not part of this PR since it should be done after releasing the new version.

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.

Can't select text when readOnly to true Text magnification feature for the Quill Editor
3 participants