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

Cherry-pick "[SuperEditor][SuperReader][Android] Fix scroll physics (Resolves #1539) (#1541)" to stable #1612

Merged

Conversation

angelosilvestre
Copy link
Collaborator

This PR cherry-picks "[SuperEditor][SuperReader][Android] Fix scroll physics (Resolves #1539) (#1541)" to stable.

@matthew-carroll
Copy link
Contributor

@angelosilvestre we seem to have failing tests

@angelosilvestre
Copy link
Collaborator Author

@matthew-carroll We have two failing tests that seems to be related to the new flutter version:

The first seems to be that Colors.grey now returns a MaterialColor:

SuperEditor floating cursor shows grey caret when far from text
══╡ EXCEPTION CAUGHT BY FLUTTER TEST FRAMEWORK ╞════════════════════════════════════════════════════
The following TestFailure was thrown running a test:
Expected: MaterialColor:<MaterialColor(primary value: Color(0xff2196f3))>
  Actual: Color:<Color(0xff6750a4)>

The second is a temporary code I added when Flutter didn't report a specific selector:

           // TODO: remove this code after Flutter's next stable version.
          // In Flutter 3.13, released in August 2023, this selector isn't generated during tests yet.
          // Simulate a performSelector call from the IME.
          await TestDefaultBinaryMessengerBinding.instance.defaultBinaryMessenger.handlePlatformMessage(
            SystemChannels.textInput.name,
            SystemChannels.textInput.codec.encodeMethodCall(
              const MethodCall('TextInputClient.performSelectors', <dynamic>[
                -1,
                ['deleteBackwardByDecomposingPreviousCharacter:']
              ]),
            ),
            (ByteData? data) {/* response from framework is discarded */},
          );

I can open another PR fixing those issues.

@matthew-carroll
Copy link
Contributor

@angelosilvestre If you'd like to fix the issue in another PR, then please go ahead and raise that PR and merge it first, then we can merge this one with passing tests.

@matthew-carroll
Copy link
Contributor

@angelosilvestre I re-ran these tests after merging in your other stable PR with fixes, but it looks like we still have failing tests. Not sure which ones.

@angelosilvestre
Copy link
Collaborator Author

@matthew-carroll A rebase was needed.

Done.

@matthew-carroll matthew-carroll merged commit a28d2a2 into superlistapp:stable Nov 26, 2023
8 checks passed
@angelosilvestre angelosilvestre deleted the 1539_cherry_pick branch November 26, 2023 22:14
@angelosilvestre angelosilvestre restored the 1539_cherry_pick branch November 26, 2023 22:49
@angelosilvestre angelosilvestre deleted the 1539_cherry_pick branch November 26, 2023 22:49
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.

2 participants