Commit graph

79 commits

Author SHA1 Message Date
Hans Muller 580c844c2f
Added GalleryApp testMode (#17640) 2018-05-16 11:42:39 -07:00
Hans Muller eee986b076
Gallery cosmetic updates (#17310) 2018-05-07 09:25:50 -07:00
Todd Volkert 65079ad5f2
Add Flutter-repo-specific golden comparator (#17205)
In order to avoid checking binaries into flutter/flutter,
this comparator can be used to retrieve golden files from
a sibling flutter/goldens repository.

https://github.com/flutter/flutter/issues/16859
2018-05-03 07:39:41 -07:00
xster 709b0cb285
Accessibility fixes for new gallery (#16973) 2018-04-30 17:19:00 -07:00
Hans Muller 5c2259d505
Cross fade gallery UI front layer (#17064) 2018-04-30 08:23:11 -07:00
Hans Muller bf3bd7667f
New Gallery UI reprise (#17031) 2018-04-27 08:11:20 -07:00
Hans Muller 38d5d46127 Revert "New Flutter Gallery UI" (#16984)
* Revert "New Flutter Gallery UI (#16936)"

This reverts commit 7038597b02.
2018-04-25 18:41:07 -07:00
Hans Muller 7038597b02
New Flutter Gallery UI (#16936)
A new front-end for the Flutter Gallery example.
2018-04-25 14:15:34 -07:00
Hans Muller cdb82fce92
Put the backdrop demo controls on the right (#16902) 2018-04-23 17:19:39 -07:00
Hans Muller a0099a9016
Make gallery tests more robust (#15957) 2018-03-27 13:39:30 -07:00
xster feadfd2e40
Cupertino pull to refresh part 1: sliver and a simple indicator widget builder (#15324)
* Gallery scaffolding

* Started RenderSliver

* demo and initial hookup

* Cleaned up demo more and scaffolding basic sliver->widget communication structure.

* works

* states and default indicator building works

* start adding docs

* added an alignment setting optimized the sliver relayout mechanism

* tested a default bottom aligned sized indicator

* Added a bunch of tests

* more fixes and more tests

* Finished the tests

* Add docs

* Add more doc diffing wrt material pull to refresh

* Mention nav bar synergy

* add more asserts

* review 1

* Fix mockito 2 / dart 2 / strong typed tests

* review

* Remove the vscode config

* review
2018-03-21 17:27:58 -07:00
xster 33fea5c19a
Remove the 'demo' wording from gallery (#15640) 2018-03-19 17:03:56 -07:00
Hans Muller c599662903
Added a Backdrop demo to the Gallery (#15579) 2018-03-15 17:52:09 -07:00
Hans Muller b6cca3923a
Updated the gallery text fields demo (#15362) 2018-03-14 14:42:45 -07:00
Danny Tuppeny ae9fdefa4f
Fix example code just showing endless spinner when deployed from Windows (#14878)
* If example code is not found, render a message instead of an endless spinner
* Trim codeTags to avoid lookup issues with windows carriage returns
* Trim \r on Windows off the end of code blocks so they're consistently \n
* Add a test to ensure sample code parses if built on Windows
* Add a comment about why we trimRight()

Fixes #14820.
2018-02-28 20:39:48 +00:00
Alexandre Ardhuin c02b6a8bcf
some whitespace cleanup (#14443) 2018-02-02 23:27:29 +01:00
Ian Hickson c12d120bbf
Provide a way to override global InheritedWidgets (#14348)
For example, so that the gallery can override the media query globally.
2018-02-01 23:12:52 -08:00
Alexandre Ardhuin 841d5d7bd5
prefer_const_declarations on local variables (#14358) 2018-02-01 07:51:26 +01:00
xster 82ddabd32a
Fastlane instructives for tool publishing the Gallery (#14347)
* first round fastlane working on Android

* clean up and start ios

* Partial iOS

* Got a fastfile that works on iOS

* Finalize Android push instructions

* Finalize instructions for iOS

* Extra cleanup and optipng

* Disable readme autogen and add a default readme
2018-01-31 11:21:37 -08:00
xster 9db8966f94
Make drawer demo header not scroll away (#13337)
* Make drawer demo header not scroll

* Add test for gallery drawer demo and fix user accounts drawer header overflow
2017-12-05 11:58:03 -08:00
amirh 4f240a4dda
Fix 'Animated images' demo name in Gallery's test. (#13240)
In https://github.com/flutter/flutter/pull/13141 I updated the demo name
from 'Animated Images' to 'Animated images' before submitted, but did
not update the name in the smoketest and transitions_perf test.
2017-11-28 22:00:17 -08:00
amirh 47b5c37f1a
Add Images demo to the gallery app. (#13141) 2017-11-28 18:17:11 -08:00
xster 89405002bc
Add an iOS style demo to the gallery (#12651)
* Built first tab

* Small additions

* started tab 3

* Need color arithmetics

* tab 2 built

* finalize

* lint and tests

* review

* Reapply docs after rebase

* use color.computeLuminance

* linter

* nit
2017-11-03 08:50:29 -07:00
Alexandre Ardhuin 1fce14a31c enable lint prefer_single_quotes (#12665) 2017-10-22 18:11:36 +02:00
Greg Spencer e697e5523f Add large text switching to Gallery app. (#12443)
This lets us preview widgets in the gallery using small, normal, large, and HUGE text.

Added selections to the main drawer for these options. Defaults to "normal", obviously.
2017-10-13 21:44:24 -07:00
Todd Volkert 11de1a516f Fix capitalization in gallery RegExp (#12035) 2017-09-11 12:56:38 -07:00
Alexandre Ardhuin 8a88e2efca Bump Dart SDK to 1.25.0-dev.9.0 (#11509)
* Bump Dart SDK to 1.25.0-dev.9.0

* add link to sdk bug
2017-08-09 14:45:55 +02:00
Michael Goderbauer b551f53471 Don't trigger an assert when markNeedsSemanticsUpdate is called multiple times in edge cases (#11544)
* Don't trigger assert if a render object ceases to be a semantic boundary

This bug was exposed by https://github.com/flutter/flutter/pull/11309, which caused the following assertion to trigger when scrolling in the Animation demo:

```
The following assertion was thrown during _updateSemantics():
'package:flutter/src/rendering/object.dart': Failed assertion: line 2626 pos 16: 'fragment is
_InterestingSemanticsFragment': is not true.
```

A minimal reproduction of the bug can be found in `semantics_10_test.dart`, which has been added as a regression test for the bug by this PR.

Looking at that test, here is a description of the faulty behaviour:
1. During the second `pumpWidget` call `RenderExcludeSemantics` marks itself as needing a semantics update (due to excluding going from `false` -> `true`).
2. This causes the nearest ancestor with semantics information (here: `RenderSemanticsAnnotations` representing the "container" Semantics widget) to be added to the `_nodesNeedingSemantics` list.
3. `RenderSliverList` (implementation behind ListView) marks itself as needing a semantics update (due to its changing children).
4. This causes the `RenderSemanticsGestureHandler` to be added to the `_nodesNeedingSemantics` list.
5. Next, canDrag is updated from `true` -> `false`. This means, `RenderSemanticsGestureHandler` is no longer a semantics boundary, it marks itself as needing a semantics update.
6. The nearest ancestor with semantics (`RenderSemanticsAnnotations`, the "container") is added to the `_nodesNeedingSemantics` list (this is a no-op because it is already in the list).
7. During `flushSemantics`, the `_nodesNeedingSemantics` list is walked. The first entry (`RenderSemanticsAnnotations`) updates the semantics tree to only contain the container widget and drop everything else (= no children of the ExcludeSemantics widget are walked).
8. The second entry (`RenderSemanticsGestureHandler`) is updated. It does not add any semantics of its own and is no longer a semantics boundary. Therefore, it wants to merge its descendent semantics into its parents. Here is where the assert throws because the algorithm assumes that every entry in the `_nodesNeedingSemantics` list will produce and own an `_InterestingSemanticsFragment` (passing your semantics on to your parents is not interesting).

The problem here seems to be step 4 in combination with step 5. In step 4 we rely on the fact that `RenderSemanticsGestureHandler` is an (explicit or implicit) semantics boundary and that it will be able to absorb the semantics change of `RenderSliverList`. This is true
at this time. However, in step 4 `RenderSemanticsGestureHandler` decides to no longer be an (explicit or implicit) semantics boundary and our assumption from step 5 becomes incorrect. We did nothing to correct this assumption.

This PR removes a node, that could potentially cease to be a (explicit or implicit) semantics boundary from the `_nodesNeedingSemantics` list to fix that problem. Please node that this does not mean that the node's semantics will not be updated: The node's closest ances
tor with semantics is added to that list during the `markNeedsSemanticsUpdate` call. During `flushSemantics` we will walk from this node to update the semantics of it's children (if changed), which will include the node in question.

* tiny fix

* simplify test

* analyzer fixes

* review comments
2017-08-08 14:17:20 -07:00
Yegor 18d9b20ffb add Android instrumentation test (#11063)
* add Android instrumentation test

* add devicelab test

* add to manifest.yaml

* rename _smoke_test.dart to _smoketest.dart to prevent flutter test from picking it up

* volatile fields; style fixes

* use ConditionVariable; fix sh script
2017-07-10 17:20:49 -07:00
Ian Hickson 11fa80bb78 MediaQuery.of shouldn't give a default return value (#9596) 2017-04-27 15:02:59 -07:00
Alexandre Ardhuin 9541848272 make @immutable const classes (#9532)
* make @immutable const

* fix build
2017-04-21 23:09:42 +02:00
Ian Hickson bf017b79b3 Move Point to Offset (#9277)
* Manually fix every use of Point.x and Point.y

Some of these were moved to dx/dy, but not all.

* Manually convert uses of the old gradient API

* Remove old reference to Point.

* Mechanical changes

I applied the following at the root of the Flutter repository:

git ls-files -z | xargs -0 sed -i 's/\bPoint[.]origin\b/Offset.zero/g'
git ls-files -z | xargs -0 sed -i 's/\bPoint[.]lerp\b/Offset.lerp/g'
git ls-files -z | xargs -0 sed -i 's/\bnew Point\b/new Offset/g'
git ls-files -z | xargs -0 sed -i 's/\bconst Point\b/const Offset/g'
git ls-files -z | xargs -0 sed -i 's/\bstatic Point /static Offset /g'
git ls-files -z | xargs -0 sed -i 's/\bfinal Point /final Offset /g'
git ls-files -z | xargs -0 sed -i 's/^\( *\)Point /\1Offset /g'
git ls-files -z | xargs -0 sed -i 's/ui[.]Point\b/ui.Offset/g'
git ls-files -z | xargs -0 sed -i 's/(Point\b/(Offset/g'
git ls-files -z | xargs -0 sed -i 's/\([[{,]\) Point\b/\1 Offset/g'
git ls-files -z | xargs -0 sed -i 's/@required Point\b/@required Offset/g'
git ls-files -z | xargs -0 sed -i 's/<Point>/<Offset>/g'
git ls-files -z | xargs -0 sed -i 's/[.]toOffset()//g'
git ls-files -z | xargs -0 sed -i 's/[.]toPoint()//g'
git ls-files -z | xargs -0 sed -i 's/\bshow Point, /show /g'
git ls-files -z | xargs -0 sed -i 's/\bshow Point;/show Offset;/g'

* Mechanical changes - dartdocs

I applied the following at the root of the Flutter repository:

git ls-files -z | xargs -0 sed -i 's/\ba \[Point\]/an [Offset]/g'
git ls-files -z | xargs -0 sed -i 's/\[Point\]/[Offset]/g'

* Further improvements and a test

* Fix minor errors from rebasing...

* Roll engine
2017-04-12 15:06:12 -07:00
Ian Hickson 2a54524337 Fix tests to use Ahem, and helpful changes around that (#9332)
* Fix tests to use Ahem, and helpful changes around that

- Fix fonts that had metric-specific behaviours.

- LiveTestWidgetsFlutterBinding.allowAllFrames has been renamed
  to LiveTestWidgetsFlutterBinding.framePolicy.

- LiveTestWidgetsFlutterBinding now defaults to using a frame policy
  that pumps slightly more frames, to animate the pointer crosshairs.

- Added "flutter run --use-test-fonts" to enable Ahem on devices.

- Changed how idle() works to be more effective in live mode.

- Display the test name in live mode (unless ahem fonts are enabled).

- Added a toString to TextSelectionPoint.

- Style nit fixes.

* Roll engine to get Ahem changes.

* Update tests for dartdoc changes.

* Fix flutter_tools tests
2017-04-12 13:33:02 -07:00
Alexandre Ardhuin 189028a958 Separate the 'if' expression from its statement (#9177) 2017-04-04 21:45:50 +02:00
Phil Quitslund ab6df3af40 Bump to Dart SDK 1.23.0-dev.10 (#9051)
* Bump to Dart SDK 1.23.0-dev.10

* allows us to understand flutter usage via telemetry
* brings in `@immutable`

Fixes: #9042

* completer fix

* Update to platform 1.1.1.
2017-03-28 14:53:03 -07:00
Hans Muller 606f56221b Eliminated DrawerItem, use ListTile instead (#8992) 2017-03-24 15:34:43 -07:00
Ian Hickson 8eac6cd0da Test API improvements: pumpAndSettle, autogenerate pointer IDs (#8751) 2017-03-13 16:27:15 -07:00
Chris Bracken 96eea437b2 Declare locals final where not reassigned (gallery) (#8571) 2017-03-03 17:51:21 -08:00
Alexandre Ardhuin e9a775bf38 prefer const constructors (#8316) 2017-02-21 14:54:29 -08:00
Adam Barth e0b12ca17e Two becomes one (#8253)
Rename all the "2" classes related to scrolling to remove the "2". Now that the
old scrolling code is gone, we don't need to use the suffix.
2017-02-17 14:06:15 -08:00
Ian Hickson 0962dd6a94 More better toStrings and more vigorous smoke testing of gallery (#8237)
* More better toStrings and more vigorous smoke testing of gallery

* Update scroll_controller.dart

* Update sliver.dart
2017-02-17 12:56:25 -08:00
Ian Hickson 6303a32d63 Pesto crash (#8238) 2017-02-16 20:44:33 -08:00
Ian Hickson 83a4cf269f Port AppBar to Scrollable2 (#7996)
Move the back button and drawer opening logic into the app bar.

Move the tap-status-bar-to-scroll-to-top logic to using
ScrollControllers. Provide a PrimaryScrollController and a `primary`
flag on scroll views.

Make it possible to track when a route becomes or stops being poppable.
2017-02-08 18:16:19 -08:00
Ian Hickson be7be2b8b6 Test service extensions (#7849)
...and fix bugs that the tests uncovered.

WRITE TEST FIND BUG
2017-02-03 13:55:07 -08:00
Ian Hickson 63aa1397a3 Increase the strictness of our requiring explicit types (#7585)
...now that we have generic methods, their types need to be specified too.
2017-01-23 01:04:31 -08:00
Hans Muller 0ce9917fb2 Support for vetoing an attempt to pop the current route (#7488) 2017-01-18 11:04:18 -08:00
Collin Jackson f0c7f5a942 Support for overriding Gallery feedback menu item behavior (#7091) 2016-11-29 17:47:39 -08:00
Adam Barth 8ca4caa440 Rename Flexible to Expanded and improve docs (#6978)
This patch replaces uses of Flexible with Expanded where we're using
FlexFit.tight. We still need to think of a better name for the
FlexFit.loose variant.

Also, improve the docs for Row, Column, Flex, and RenderFlex to be more
problem-oriented and to give a complete account of the layout algorithn.

Fixes #6960
Fixes #5169
2016-11-21 23:16:43 -08:00
Jason Simmons ca5e1f3f23 In the semantics tree, do not detach a child if it has already been assigned a new parent (#6773)
Fixes https://github.com/flutter/flutter/issues/6690

Also add a version of the Gallery smoke test that enables semantics
2016-11-10 12:55:56 -08:00
Matt Perry 76844e25da Fix Bruschetta typo. (#6568) 2016-10-27 17:18:12 -04:00