-
Notifications
You must be signed in to change notification settings - Fork 29.8k
Update SelectableRegion test for M3 #129627
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
Update SelectableRegion test for M3 #129627
Conversation
|
I think one issue here is that this case in flutter/packages/flutter/lib/src/widgets/selectable_region.dart Lines 1984 to 1986 in 3e66c86
flutter/packages/flutter/lib/src/widgets/selectable_region.dart Lines 1978 to 1980 in 3e66c86
if (index == selectables.length - 1 && lastSelectionResult == SelectionResult.next) {
return SelectionResult.next;
}
if (lastSelectionResult == SelectionResult.next) {
continue;
}
.
.
. |
|
I haven't been able to find the root cause of this yet. The M3 Typography does set the If I try, and resize the window (I tried making it smaller). I am also not able to select the final import 'package:flutter/material.dart';
void main() {
runApp(const MainApp());
}
class MainApp extends StatelessWidget {
const MainApp({super.key});
@override
Widget build(BuildContext context) {
return MaterialApp(
// theme: ThemeData.light(useMaterial3: true),
home: Scaffold(
body: SafeArea(
child: Center(
child: SelectionArea(
child: Text.rich(
const TextSpan(
children: <InlineSpan>[
TextSpan(
text:
'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.',
),
WidgetSpan(child: Text('Some text in a WidgetSpan. ')),
TextSpan(text: 'Hello, world.'),
],
),
),
),
),
),
),
);
}
}I think we can do two things in this situation if we cannot find and fix the root cause in time.
|
|
(Triage): @bleroux Do you still have plans to follow up on the feedback given above? |
Yes, I will soon update this PR as proposed in #129627 (comment). |
|
@Renzo-Olivares , revisiting this, I wonder if the issue is only related to how the test is written. The test simulates a right click on the word ‘Hello,’.
So my question for you is “‘should |
|
Hey @bleroux, just checking in from triage, what's the status of this PR? |
|
Hi @bleroux I apologize for missing this. Thank you for the clear and in depth explanation of the issue. Screen.Recording.2023-08-29.at.4.22.13.PM.movFrom my observation on the web you can select between above and below the |
c30c770 to
e9eaa49
Compare
|
Hey @Renzo-Olivares!
|
Renzo-Olivares
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM thanks for the change!
flutter/flutter@6c95737...1fe2495 2023-08-30 leroux_bruno@yahoo.fr Update SelectableRegion test for M3 (flutter/flutter#129627) 2023-08-30 godofredoc@google.com Remove cirrus tests from the flutter framework. (flutter/flutter#133575) 2023-08-30 engine-flutter-autoroll@skia.org Roll Flutter Engine from 749e67a947bc to 69f04bdfe952 (2 revisions) (flutter/flutter#133621) 2023-08-30 xilaizhang@google.com [flutter roll] Revert "Fix `Chip.shape`'s side is not used when provided in Material 3" (flutter/flutter#133615) 2023-08-30 engine-flutter-autoroll@skia.org Roll Flutter Engine from 9f2cf5c99b0f to 749e67a947bc (2 revisions) (flutter/flutter#133618) 2023-08-30 engine-flutter-autoroll@skia.org Roll Flutter Engine from c5854a6b3658 to 9f2cf5c99b0f (4 revisions) (flutter/flutter#133616) 2023-08-30 parlough@gmail.com No longer include `.packages` in created `.gitignore` files (flutter/flutter#133484) 2023-08-30 engine-flutter-autoroll@skia.org Roll Flutter Engine from db3ecf8b2739 to c5854a6b3658 (1 revision) (flutter/flutter#133610) 2023-08-29 engine-flutter-autoroll@skia.org Roll Flutter Engine from 1feb9302050c to db3ecf8b2739 (4 revisions) (flutter/flutter#133609) 2023-08-29 polinach@google.com Fix one notDisposed leak and mark another. (flutter/flutter#133595) 2023-08-29 engine-flutter-autoroll@skia.org Roll Flutter Engine from 01a1579808b5 to 1feb9302050c (1 revision) (flutter/flutter#133604) 2023-08-29 polinach@google.com Upgrade packages. (flutter/flutter#133593) 2023-08-29 polinach@google.com Cover more tests with leak tracking. (flutter/flutter#133596) 2023-08-29 engine-flutter-autoroll@skia.org Roll Flutter Engine from 73cc3fb451fd to 01a1579808b5 (3 revisions) (flutter/flutter#133591) 2023-08-29 hans.muller@gmail.com Added DropdownMenuEntry.labelWidget (flutter/flutter#133491) 2023-08-29 ian@hixie.ch Use a fake stopwatch to remove flakiness. (flutter/flutter#133229) 2023-08-29 engine-flutter-autoroll@skia.org Roll Flutter Engine from d1e6eb080f08 to 73cc3fb451fd (3 revisions) (flutter/flutter#133580) 2023-08-29 mdebbar@google.com [web] Migrate remaining web-only API usages to `dart:ui_web` (flutter/flutter#132248) 2023-08-29 gspencergoog@users.noreply.github.com Add doxygen doc generation. (flutter/flutter#131356) 2023-08-29 engine-flutter-autoroll@skia.org Roll Flutter Engine from 50bd80773287 to d1e6eb080f08 (2 revisions) (flutter/flutter#133570) 2023-08-29 polinach@google.com ShortcutManager should dispatch creation in constructor. (flutter/flutter#133487) 2023-08-29 tessertaha@gmail.com Add FAB Additional Color Mappings example (flutter/flutter#133453) 2023-08-29 engine-flutter-autoroll@skia.org Roll Flutter Engine from 65438c7bb46a to 50bd80773287 (1 revision) (flutter/flutter#133565) 2023-08-29 engine-flutter-autoroll@skia.org Roll Packages from 383bffa to d7d3150 (13 revisions) (flutter/flutter#133564) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/flutter-packages Please CC rmistry@google.com,stuartmorgan@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Packages: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md

Description
This PR fixes one selectable region test failure when switching to M3.
The failure is somewhat tricky because it is related to the M3 typography (line height set to 1.43).
Related Issue
fixes #129626
Tests
Updates 1 test.