Skip to content

SearchAnchor search view close and clear buttons don't have hover tooltips #141347

@parlough

Description

@parlough

Steps to reproduce

  1. Add a SearchAnchor to your app
  2. Run the app. (I tried macOS, CanvasKit, and skwasm)
  3. Open the full search view
  4. Hover over the close/back or clear buttons
  5. Notice no tooltips show up like other built-in Material widgets

Expected results

Like other Material widgets, I'd expect these icon buttons to have helpful default tooltips.

  • When I hover over the close/back button, I'd expect it to say "Close" or "Back" depending on the context.
  • When I hover over the clear button, I'd expect it to say "Clear search".

This is especially important in this case as the clear button could easily be mistaken as close.

Actual results

When hovering over these icon buttons, no tooltips appear.

Code sample

Code sample
import 'package:flutter/material.dart';

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

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        body: Center(
          child: SearchAnchor.bar(
            barHintText: 'Search',
            suggestionsBuilder: (context, controller) {
              return [];
            },
          ),
        ),
      ),
    );
  }
}

Screenshots

Screenshots

Search view close button:
Search view close button

Search view clear button:
Search view clear button

Flutter version info

Version
Flutter 3.19.0-3.0.pre.43 • channel main • https://github.com/flutter/flutter
Framework • revision f961fdf2ba (4 hours ago) • 2024-01-10 17:37:07 -0500
Engine • revision a045134c91
Tools • Dart 3.4.0 (build 3.4.0-14.0.dev) • DevTools 2.31.0

Metadata

Metadata

Assignees

Labels

P2Important issues not at the top of the work listf: material designflutter/packages/flutter/material repository.found in release: 3.16Found to occur in 3.16found in release: 3.19Found to occur in 3.19frameworkflutter/packages/flutter repository. See also f: labels.has reproducible stepsThe issue has been confirmed reproducible and is ready to work onr: fixedIssue is closed as already fixed in a newer versionteam-designOwned by Design Languages teamtriaged-designTriaged by Design Languages team

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions