flutter / flutter

Flutter makes it easy and fast to build beautiful apps for mobile and beyond
https://flutter.dev
BSD 3-Clause "New" or "Revised" License
165.01k stars 27.19k forks source link

Show on screen no longer works in the collapsed header #64973

Open chunhtai opened 4 years ago

chunhtai commented 4 years ago

Internal: b/168395763

Steps to Reproduce

import 'package:flutter/material.dart';

void main() {
  runApp(Demo());
}

class Demo extends StatelessWidget {
    @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        body: CustomScrollView(
          slivers: [
            SliverAppBar(
              pinned: true,
              expandedHeight: 200,
              title: const Text('Title'),
              flexibleSpace: FlexibleSpaceBar(
                background: Padding(
                  padding: EdgeInsets.only(top: 100),
                  child: Semantics(
                    header: true,
                    child: const Text('Expanded title'),
                  ),
                ),
              ),
            ),
            SliverList(
              delegate: SliverChildListDelegate(
                [
                  for (var i = 0; i < 50; i++)
                    Container(
                      height: 200,
                      child: Center(child: Text('Text $i')),
                    ),
                ],
              ),
            ),
          ],
        ),
      ),
    );
  }
}
  1. Turn on ios Voice Over
  2. swipe right to go through the list until header collapsed
  3. swipe left to go back to the header

expect: collapsed header should be expended when it has the focus actual: header still collapses when focused.

the bug seemed to be introduced in https://github.com/flutter/flutter/commit/fe55dc2b135b5b71ae3c19062b34dc6e8d02e9d5

chunhtai commented 4 years ago

cc @LongCatIsLooong

chunhtai commented 4 years ago

I ping the wrong issue in my PR please ignore

TahaTesser commented 4 years ago
code sample ```dart import 'package:flutter/material.dart'; void main() { runApp(Demo()); } class Demo extends StatelessWidget { @override Widget build(BuildContext context) { return MaterialApp( home: Scaffold( body: CustomScrollView( slivers: [ SliverAppBar( pinned: true, expandedHeight: 200, title: const Text('Title'), flexibleSpace: FlexibleSpaceBar( background: Padding( padding: EdgeInsets.only(top: 100), child: Semantics( header: true, child: const Text('Expanded title'), ), ), ), ), SliverList( delegate: SliverChildListDelegate( [ for (var i = 0; i < 50; i++) Container( height: 200, child: Center(child: Text('Text $i')), ), ], ), ), ], ), ), ); } } ```
flutter doctor -v ``` [✓] Flutter (Channel master, 1.22.0-10.0.pre.39, on Mac OS X 10.15.6 19G2021, locale en-GB) • Flutter version 1.22.0-10.0.pre.39 at /Users/tahatesser/Code/flutter_master • Framework revision a8281e31af (17 hours ago), 2020-09-01 10:57:59 -0700 • Engine revision 165abef0a2 • Dart version 2.10.0 (build 2.10.0-77.0.dev) [✓] Android toolchain - develop for Android devices (Android SDK version 29.0.2) • Android SDK at /Users/tahatesser/Code/sdk • Platform android-29, build-tools 29.0.2 • ANDROID_HOME = /Users/tahatesser/Code/sdk • Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6222593) • All Android licenses accepted. [✓] Xcode - develop for iOS and macOS (Xcode 11.7) • Xcode at /Applications/Xcode.app/Contents/Developer • Xcode 11.7, Build version 11E801a • CocoaPods version 1.9.3 [✓] Chrome - develop for the web • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome [✓] Android Studio (version 4.0) • Android Studio at /Applications/Android Studio.app/Contents • Flutter plugin version 48.1.2 • Dart plugin version 193.7547 • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6222593) [✓] VS Code (version 1.48.2) • VS Code at /Applications/Visual Studio Code.app/Contents • Flutter extension version 3.13.2 [✓] Connected device (5 available) • Taha’s iPhone (mobile) • 00008020-001059882212002E • ios • iOS 13.7 • iPhone 11 (mobile) • EDB19945-0B9F-4A6E-BAA1-425E68E3B6D6 • ios • com.apple.CoreSimulator.SimRuntime.iOS-13-7 (simulator) • macOS (desktop) • macos • darwin-x64 • Mac OS X 10.15.6 19G2021 • Web Server (web) • web-server • web-javascript • Flutter Tools • Chrome (web) • chrome • web-javascript • Google Chrome 85.0.4183.83 • No issues found! ```
LongCatIsLooong commented 4 years ago

@chunhtai is this high priority?

chunhtai commented 4 years ago

raise to P1 according to the discussion in b/166068876

goderbauer commented 4 years ago

@LongCatIsLooong says he's currently working on this.

goderbauer commented 4 years ago

(issue triage): According to @LongCatIsLooong we are waiting for clarification from the customer.

HansMuller commented 4 years ago

I've lowered this issue's priority pending getting some additional clarity about exactly what's going wrong in the customer's app and what a practical solution would be.

markusaksli-nc commented 3 years ago

The wait label hit timeout but since this is reproducible I'll leave this open.

flutter doctor -v ``` [✓] Flutter (Channel master, 1.23.0-8.0.pre.254, on Mac OS X 10.15.7 19H2 x86_64, locale en-GB) • Flutter version 1.23.0-8.0.pre.254 at /Users/markus/development/flutter_master • Framework revision 0d8696f655 (2 hours ago), 2020-10-09 01:12:02 -0400 • Engine revision 349889833c • Dart version 2.11.0 (build 2.11.0-203.0.dev) [✓] Android toolchain - develop for Android devices (Android SDK version 30.0.1) • Android SDK at /Users/markus/Library/Android/sdk • Platform android-30, build-tools 30.0.1 • Java binary at: /Users/markus/Library/Application Support/JetBrains/Toolbox/apps/AndroidStudio/ch-0/193.6821437/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6222593) • All Android licenses accepted. [✓] Xcode - develop for iOS and macOS (Xcode 12.0.1) • Xcode at /Applications/Xcode.app/Contents/Developer • Xcode 12.0.1, Build version 12A7300 • CocoaPods version 1.9.3 [✓] Chrome - develop for the web • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome [✓] Android Studio (version 4.0) • Android Studio at /Users/markus/Library/Application Support/JetBrains/Toolbox/apps/AndroidStudio/ch-0/193.6821437/Android Studio.app/Contents • Flutter plugin version 50.0.1 • Dart plugin version 193.7547 • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6222593) [✓] Connected device (4 available) • Nevercode’s iPhone (mobile) • b668e524315069f3db3661ac11ff1f66afafebdb • ios • iOS 13.7 • macOS (desktop) • macos • darwin-x64 • Mac OS X 10.15.7 19H2 x86_64 • Web Server (web) • web-server • web-javascript • Flutter Tools • Chrome (web) • chrome • web-javascript • Google Chrome 85.0.4183.121 • No issues found! ```
chunhtai commented 3 years ago

Hi @mehmetf , we are waiting for the respond in the internal issue.

mehmetf commented 3 years ago

Thanks. This was part of an automated update. I lowered the priority of the internal bug (which is considered the source of truth for priorities).

danagbemava-nc commented 1 year ago

Reproduces on the latest versions of flutter using the code sample provided in https://github.com/flutter/flutter/issues/64973#issue-689509515

recording https://user-images.githubusercontent.com/88313112/233627704-480465f1-b12e-46b4-a470-fc1669017f0b.MP4
flutter doctor -v ``` [✓] Flutter (Channel stable, 3.7.12, on macOS 13.3.1 22E261 darwin-arm64, locale en-GB) • Flutter version 3.7.12 on channel stable at /Users/nexus/dev/sdks/flutter • Upstream repository https://github.com/flutter/flutter.git • Framework revision 4d9e56e694 (3 days ago), 2023-04-17 21:47:46 -0400 • Engine revision 1a65d409c7 • Dart version 2.19.6 • DevTools version 2.20.1 [✓] Android toolchain - develop for Android devices (Android SDK version 33.0.0) • Android SDK at /Users/nexus/Library/Android/sdk • Platform android-33, build-tools 33.0.0 • Java binary at: /Users/nexus/Library/Application Support/JetBrains/Toolbox/apps/AndroidStudio/ch-0/222.4459.24.2221.9862592/Android Studio.app/Contents/jbr/Contents/Home/bin/java • Java version OpenJDK Runtime Environment (build 17.0.6+0-17.0.6b802.4-9586694) • All Android licenses accepted. [✓] Xcode - develop for iOS and macOS (Xcode 14.3) • Xcode at /Applications/Xcode-14.3.0.app/Contents/Developer • Build 14E222b • CocoaPods version 1.11.3 [✓] Chrome - develop for the web • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome [✓] Android Studio (version 2022.1) • Android Studio at /Users/nexus/Library/Application Support/JetBrains/Toolbox/apps/AndroidStudio/ch-0/221.6008.13.2211.9619390/Android Studio.app/Contents • Flutter plugin can be installed from: 🔨 https://plugins.jetbrains.com/plugin/9212-flutter • Dart plugin can be installed from: 🔨 https://plugins.jetbrains.com/plugin/6351-dart • Java version OpenJDK Runtime Environment (build 11.0.15+0-b2043.56-8887301) [✓] Android Studio (version 2022.2) • Android Studio at /Users/nexus/Library/Application Support/JetBrains/Toolbox/apps/AndroidStudio/ch-0/222.4459.24.2221.9862592/Android Studio.app/Contents • Flutter plugin can be installed from: 🔨 https://plugins.jetbrains.com/plugin/9212-flutter • Dart plugin can be installed from: 🔨 https://plugins.jetbrains.com/plugin/6351-dart • Java version OpenJDK Runtime Environment (build 17.0.6+0-17.0.6b802.4-9586694) [✓] IntelliJ IDEA Ultimate Edition (version 2023.1) • IntelliJ at /Users/nexus/Applications/JetBrains Toolbox/IntelliJ IDEA Ultimate.app • Flutter plugin version 73.0.4 • Dart plugin version 231.8109.91 [✓] IntelliJ IDEA Ultimate Edition (version 2023.1) • IntelliJ at /Users/nexus/Library/Application Support/JetBrains/Toolbox/apps/IDEA-U/ch-0/231.8109.175/IntelliJ IDEA.app • Flutter plugin can be installed from: 🔨 https://plugins.jetbrains.com/plugin/9212-flutter • Dart plugin can be installed from: 🔨 https://plugins.jetbrains.com/plugin/6351-dart [✓] VS Code (version 1.77.3) • VS Code at /Applications/Visual Studio Code.app/Contents • Flutter extension version 3.62.0 [✓] Connected device (4 available) • Pixel 7 (mobile) • 28291FDH2001SA • android-arm64 • Android 13 (API 33) • Nexus (mobile) • 00008020-001875E83A38002E • ios • iOS 16.4.1 20E252 • macOS (desktop) • macos • darwin-arm64 • macOS 13.3.1 22E261 darwin-arm64 • Chrome (web) • chrome • web-javascript • Google Chrome 112.0.5615.137 [✓] HTTP Host Availability • All required HTTP hosts are available • No issues found! ``` ``` [!] Flutter (Channel master, 3.10.0-10.0.pre.39, on macOS 13.3.1 22E261 darwin-arm64, locale en-GB) • Flutter version 3.10.0-10.0.pre.39 on channel master at /Users/nexus/dev/sdks/flutters ! Warning: `flutter` on your path resolves to /Users/nexus/dev/sdks/flutter/bin/flutter, which is not inside your current Flutter SDK checkout at /Users/nexus/dev/sdks/flutters. Consider adding /Users/nexus/dev/sdks/flutters/bin to the front of your path. ! Warning: `dart` on your path resolves to /Users/nexus/dev/sdks/flutter/bin/dart, which is not inside your current Flutter SDK checkout at /Users/nexus/dev/sdks/flutters. Consider adding /Users/nexus/dev/sdks/flutters/bin to the front of your path. • Upstream repository https://github.com/flutter/flutter.git • Framework revision d186792c00 (8 hours ago), 2023-04-20 20:50:59 -0700 • Engine revision 122c3b3820 • Dart version 3.1.0 (build 3.1.0-26.0.dev) • DevTools version 2.23.1 • If those were intentional, you can disregard the above warnings; however it is recommended to use "git" directly to perform update checks and upgrades. [✓] Android toolchain - develop for Android devices (Android SDK version 33.0.0) • Android SDK at /Users/nexus/Library/Android/sdk • Platform android-33, build-tools 33.0.0 • Java binary at: /Users/nexus/Library/Application Support/JetBrains/Toolbox/apps/AndroidStudio/ch-0/222.4459.24.2221.9862592/Android Studio.app/Contents/jbr/Contents/Home/bin/java • Java version OpenJDK Runtime Environment (build 17.0.6+0-17.0.6b802.4-9586694) • All Android licenses accepted. [✓] Xcode - develop for iOS and macOS (Xcode 14.3) • Xcode at /Applications/Xcode-14.3.0.app/Contents/Developer • Build 14E222b • CocoaPods version 1.11.3 [✓] Chrome - develop for the web • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome [✓] Android Studio (version 2022.1) • Android Studio at /Users/nexus/Library/Application Support/JetBrains/Toolbox/apps/AndroidStudio/ch-0/221.6008.13.2211.9619390/Android Studio.app/Contents • Flutter plugin can be installed from: 🔨 https://plugins.jetbrains.com/plugin/9212-flutter • Dart plugin can be installed from: 🔨 https://plugins.jetbrains.com/plugin/6351-dart • Java version OpenJDK Runtime Environment (build 11.0.15+0-b2043.56-8887301) [✓] Android Studio (version 2022.2) • Android Studio at /Users/nexus/Library/Application Support/JetBrains/Toolbox/apps/AndroidStudio/ch-0/222.4459.24.2221.9862592/Android Studio.app/Contents • Flutter plugin can be installed from: 🔨 https://plugins.jetbrains.com/plugin/9212-flutter • Dart plugin can be installed from: 🔨 https://plugins.jetbrains.com/plugin/6351-dart • Java version OpenJDK Runtime Environment (build 17.0.6+0-17.0.6b802.4-9586694) [✓] IntelliJ IDEA Ultimate Edition (version 2023.1) • IntelliJ at /Users/nexus/Applications/JetBrains Toolbox/IntelliJ IDEA Ultimate.app • Flutter plugin version 73.0.4 • Dart plugin version 231.8109.91 [✓] IntelliJ IDEA Ultimate Edition (version 2023.1) • IntelliJ at /Users/nexus/Library/Application Support/JetBrains/Toolbox/apps/IDEA-U/ch-0/231.8109.175/IntelliJ IDEA.app • Flutter plugin can be installed from: 🔨 https://plugins.jetbrains.com/plugin/9212-flutter • Dart plugin can be installed from: 🔨 https://plugins.jetbrains.com/plugin/6351-dart [✓] VS Code (version 1.77.3) • VS Code at /Applications/Visual Studio Code.app/Contents • Flutter extension version 3.62.0 [✓] Connected device (4 available) • Pixel 7 (mobile) • 28291FDH2001SA • android-arm64 • Android 13 (API 33) • Nexus (mobile) • 00008020-001875E83A38002E • ios • iOS 16.4.1 20E252 • macOS (desktop) • macos • darwin-arm64 • macOS 13.3.1 22E261 darwin-arm64 • Chrome (web) • chrome • web-javascript • Google Chrome 112.0.5615.137 [✓] Network resources • All expected network resources are available. ! Doctor found issues in 1 category. ```
flutter-triage-bot[bot] commented 1 year ago

This issue is marked P1 but has had no recent status updates.

The P1 label indicates high-priority issues that are at the top of the work list. This is the highest priority level a bug can have if it isn't affecting a top-tier customer or breaking the build. Bugs marked P1 are generally actively being worked on unless the assignee is dealing with a P0 bug (or another P1 bug). Issues at this level should be resolved in a matter of months and should have monthly updates on GitHub.

Please consider where this bug really falls in our current priorities, and label it or assign it accordingly. This allows people to have a clearer picture of what work is actually planned. Thanks!

HansMuller commented 1 year ago

CC @LongCatIsLooong

flutter-triage-bot[bot] commented 7 months ago

This issue is marked P1 but has had no recent status updates.

The P1 label indicates high-priority issues that are at the top of the work list. This is the highest priority level a bug can have if it isn't affecting a top-tier customer or breaking the build. Bugs marked P1 are generally actively being worked on unless the assignee is dealing with a P0 bug (or another P1 bug). Issues at this level should be resolved in a matter of months and should have monthly updates on GitHub.

Please consider where this bug really falls in our current priorities, and label it or assign it accordingly. This allows people to have a clearer picture of what work is actually planned. Thanks!

HansMuller commented 7 months ago

CC @LongCatIsLooong

LongCatIsLooong commented 7 months ago

For future reference, a pinned header doesn't expand until you scroll the scroll view to the start. We need to distinguish "show on screen" and "fully expand", since the latter would also imply that scroll view be scrolled to the start -- a side effect that could be annoying for the user to undo if they're 100 pages in.

The closed PR would allow a pinned header to fully expand when showOnScreen is called, without scrolling to the start, but I wasn't sure that's the right change to make, I wonder if the material spec has related guidelines.

flutter-triage-bot[bot] commented 3 months ago

This issue is marked P1 but has had no recent status updates.

The P1 label indicates high-priority issues that are at the top of the work list. This is the highest priority level a bug can have if it isn't affecting a top-tier customer or breaking the build. Bugs marked P1 are generally actively being worked on unless the assignee is dealing with a P0 bug (or another P1 bug). Issues at this level should be resolved in a matter of months and should have monthly updates on GitHub.

Please consider where this bug really falls in our current priorities, and label it or assign it accordingly. This allows people to have a clearer picture of what work is actually planned. Thanks!

Piinks commented 3 months ago

I have lowered the priority here since this is no longer blocking the customer. It was also discussed in the internal issue that this behavior actually matches native iOS behavior, in that the header receiving focus does not cause it to expand.