1. 31 Jan, 2024 1 commit
    • LongCatIsLooong's avatar
      Fix unresponsive mouse tooltip (#142282) · 43aee92e
      LongCatIsLooong authored
      Fixes https://github.com/flutter/flutter/issues/142045
      
      The intent of using `??=` was that if the tooltip is already scheduled for showing, rescheduling another show does nothing. But if the tooltip is already scheduled for dismissing, the `??=` won't cancel the dismiss timer and as a result the tooltip won't show. So the `??=` is now replaced by `=` to keep it consistent with the `_scheduleDismissTooltip` implementation.
      43aee92e
  2. 24 Jan, 2024 1 commit
  3. 22 Jan, 2024 1 commit
    • Hassan Toor's avatar
      [web] - Fix broken `TextField` in semantics mode when it's a sibling of `Navigator` (#138446) · 59e892d3
      Hassan Toor authored
      When a `TextField` is rendered before a `Navigator`, it breaks in semantics mode.  This is because the framework generates the incorrect semantics tree (excludes the TextField) and when that tree gets sent to the engine, we don't get the signal to create the corresponding `<input>` element.
      
      This happens for a few reasons:
      * `ModalBarrier` uses `BlockSemantics` to drop the semantics of routes beneath the current route in `Navigator`
      * `ModalBarrier` mistakenly recognizes the widget outside of the `Navigator` to be its sibling
      *  So we end up dropping the semantics node of the `TextField` rendered before it. 
      
      The fix is to let `Navigator` generate a semantics node so that `ModalBarrier` doesn't mistakenly think widgets outside of `Navigator` are its siblings.  
      
      `Navigator` doesn't currently do this, which causes all the nodes generated from its widget subtree to be directly attached to the parent semantics node above `Navigator` - since this is also the parent of `TextField`, it considers them siblings. 
      
      Fixes https://github.com/flutter/flutter/issues/129324
      59e892d3
  4. 20 Jan, 2024 1 commit
    • LongCatIsLooong's avatar
      Remove more textScaleFactor references (#141816) · 5892a003
      LongCatIsLooong authored
      Remove more `textScaleFactor` references from flutter/flutter.  
      
      - Some changes are related to label scaling: the padding EdgeInsets values of some chip subclasses scale linearly between predetermined "max" padding values and "min" padding values. Before they scale with the `textScaleFactor` scalar, now they scale with the font size and are still capped at the original "max" and "min" values.
      - The rest of them are tests or size heuristics that depend on `textScaleFactor`, these are replaced by an effective text scale factor computed using a default font size (which is determined in a pretty random fashion, but it will only make a difference on Android 14+).
      
      No API changes in this batch. There are still some references left that I intend to remove in a different batch that would introduce API changes.
      5892a003
  5. 17 Jan, 2024 1 commit
  6. 12 Jan, 2024 1 commit
  7. 15 Dec, 2023 1 commit
  8. 07 Dec, 2023 1 commit
    • Jasper van Riet's avatar
      Introduce `exitDuration` to Tooltip for mouse pointer devices (#138321) · 3c422dd7
      Jasper van Riet authored
      This PR introduces a new property `exitDuration` to Tooltip, the counterpart to `waitDuration`. The need for this is shown by #136586. This changes the behaviour of `showDuration` on mouse pointer devices. This is because the use cases for the current behaviour on touch screen devices vs mouse pointer devices is fundamentally different.
      
      <details>
      <summary>Demo: tooltip with showDuration set</summary>
      
      Tooltip disappears after 100 ms when moving away the mouse. Tooltip will not disappear when hovered.
      
      https://github.com/flutter/flutter/assets/5138348/81d36dc9-78e0-4723-a84b-2552843ee181
      
      </details>
      
      Currently, when `showDuration` is set, this adjusts the time it takes for the tooltip to hide _after_ a mouse pointer has left the tooltip. This is not the same use case as its effect on touch screen devices, where it dictates how long the tooltip stays on screen after a long press. That is needed because the tooltip takes up screen space and there is not an intuitive way to hide it, whereas when using a mouse users expect to simply have to hover somewhere else. Having the tooltip stay around will look broken.
      
      Thus, this PR splits the two use cases. `showDuration` no longer affects mouse pointer devices at all*. There is a precedent for such mouse pointer-only behaviour in `waitDuration`. Instead, I have split up the two use cases and created the new property `exitDuration`, which will still allow for tweaking the time it takes for the tooltip to hide after the user has moved their mouse pointer somewhere else.
      
      *Note: Should `showDuration` affect [this line](https://github.com/flutter/flutter/blob/e33d4b86270e3c012ba13d68d6e90f2eabc4912b/packages/flutter/lib/src/material/tooltip.dart#L610)?
      
      Fixes #136586.
      
      Note: I noticed that when I made the change, no tests were broken. Hopefully, the tests added here help that in the future. I also noticed that in the _existing_ tests, the `waitDuration` tests contain assertions that implicate that it is the role of `waitDuration` to change this behaviour, but that's not currently (nor in the new behaviour) true, so I have fixed those tests.
      3c422dd7
  9. 06 Dec, 2023 1 commit
  10. 10 Nov, 2023 1 commit
  11. 09 Nov, 2023 1 commit
  12. 23 Oct, 2023 2 commits
  13. 11 Oct, 2023 1 commit
  14. 10 Oct, 2023 1 commit
  15. 05 Sep, 2023 1 commit
  16. 14 Aug, 2023 1 commit
  17. 09 Aug, 2023 1 commit
  18. 08 Aug, 2023 1 commit
  19. 07 Aug, 2023 1 commit
  20. 22 Jul, 2023 1 commit
  21. 13 Jul, 2023 1 commit
  22. 21 Jun, 2023 1 commit
  23. 16 Jun, 2023 1 commit
  24. 13 Jun, 2023 1 commit
    • Qun Cheng's avatar
      Update unit tests in material library for Material 3 (#128725) · a5f8b64e
      Qun Cheng authored
      Updates most of the unit tests in the packages/flutter/test/material folder so that they'll pass if ThemeData.useMaterial3 defaults to true.
      
      All of the tests have wired useMaterial3 to false and will need to be updated with a M3 version.
      
      related to #127064
      a5f8b64e
  25. 10 Jun, 2023 1 commit
  26. 26 May, 2023 1 commit
  27. 25 May, 2023 1 commit
  28. 18 May, 2023 1 commit
  29. 04 May, 2023 1 commit
  30. 03 Feb, 2023 1 commit
  31. 02 Feb, 2023 2 commits
  32. 01 Feb, 2023 2 commits
  33. 20 Jan, 2023 1 commit
  34. 23 Dec, 2022 1 commit
  35. 20 Dec, 2022 2 commits
  36. 17 Aug, 2022 1 commit