From d9cd85e3ef78472a0711bc2c964e028f37b8a28d Mon Sep 17 00:00:00 2001 From: Hans Muller Date: Wed, 12 Apr 2017 14:41:03 -0700 Subject: [PATCH] Remove the pesto gallery demo (#9341) --- .../flutter_gallery/lib/gallery/item.dart | 562 +++++++++--------- .../test_driver/transitions_perf_test.dart | 1 - 2 files changed, 288 insertions(+), 275 deletions(-) diff --git a/examples/flutter_gallery/lib/gallery/item.dart b/examples/flutter_gallery/lib/gallery/item.dart index 505141bb45e..2296831325b 100644 --- a/examples/flutter_gallery/lib/gallery/item.dart +++ b/examples/flutter_gallery/lib/gallery/item.dart @@ -49,277 +49,291 @@ class GalleryItem extends StatelessWidget { } } -// When editing this list, make sure you keep it in sync with -// the list in ../../test_driver/transitions_perf_test.dart -final List kAllGalleryItems = [ - // Demos - new GalleryItem( - title: 'Pesto', - subtitle: 'Simple recipe browser', - category: 'Demos', - routeName: PestoDemo.routeName, - buildRoute: (BuildContext context) => new PestoDemo(), - ), - new GalleryItem( - title: 'Shrine', - subtitle:'Basic shopping app', - category: 'Demos', - routeName: ShrineDemo.routeName, - buildRoute: (BuildContext context) => new ShrineDemo(), - ), - new GalleryItem( - title: 'Contact profile', - subtitle: 'Address book entry with a flexible appbar', - category: 'Demos', - routeName: ContactsDemo.routeName, - buildRoute: (BuildContext context) => new ContactsDemo(), - ), - new GalleryItem( - title: 'Animation', - subtitle: 'Section organizer', - category: 'Demos', - routeName: AnimationDemo.routeName, - buildRoute: (BuildContext context) => new AnimationDemo(), - ), - // Material Components - new GalleryItem( - title: 'Bottom navigation', - subtitle: 'Bottom navigation with cross-fading views', - category: 'Material Components', - routeName: BottomNavigationDemo.routeName, - buildRoute: (BuildContext context) => new BottomNavigationDemo(), - ), - new GalleryItem( - title: 'Buttons', - subtitle: 'All kinds: flat, raised, dropdown, icon, etc', - category: 'Material Components', - routeName: ButtonsDemo.routeName, - buildRoute: (BuildContext context) => new ButtonsDemo(), - ), - new GalleryItem( - title: 'Cards', - subtitle: 'Material with rounded corners and a drop shadow', - category: 'Material Components', - routeName: CardsDemo.routeName, - buildRoute: (BuildContext context) => new CardsDemo(), - ), - new GalleryItem( - title: 'Chips', - subtitle: 'Label with an optional delete button and avatar', - category: 'Material Components', - routeName: ChipDemo.routeName, - buildRoute: (BuildContext context) => new ChipDemo(), - ), - new GalleryItem( - title: 'Date and time pickers', - subtitle: 'Date and time selection widgets', - category: 'Material Components', - routeName: DateAndTimePickerDemo.routeName, - buildRoute: (BuildContext context) => new DateAndTimePickerDemo(), - ), - new GalleryItem( - title: 'Dialog', - subtitle: 'All kinds: simple, alert, fullscreen, etc', - category: 'Material Components', - routeName: DialogDemo.routeName, - buildRoute: (BuildContext context) => new DialogDemo(), - ), - new GalleryItem( - title: 'Drawer', - subtitle: 'Navigation drawer with a standard header', - category: 'Material Components', - routeName: DrawerDemo.routeName, - buildRoute: (BuildContext context) => new DrawerDemo(), - ), - new GalleryItem( - title: 'Expand/collapse list control', - subtitle: 'List with one level of sublists', - category: 'Material Components', - routeName: TwoLevelListDemo.routeName, - buildRoute: (BuildContext context) => new TwoLevelListDemo(), - ), - new GalleryItem( - title: 'Expansion panels', - subtitle: 'List of expanding panels', - category: 'Material Components', - routeName: ExpasionPanelsDemo.routeName, - buildRoute: (BuildContext context) => new ExpasionPanelsDemo(), - ), - new GalleryItem( - title: 'Floating action button', - subtitle: 'Action buttons with transitions', - category: 'Material Components', - routeName: TabsFabDemo.routeName, - buildRoute: (BuildContext context) => new TabsFabDemo(), - ), - new GalleryItem( - title: 'Grid', - subtitle: 'Row and column layout', - category: 'Material Components', - routeName: GridListDemo.routeName, - buildRoute: (BuildContext context) => new GridListDemo(), - ), - new GalleryItem( - title: 'Icons', - subtitle: 'Enabled and disabled icons with varying opacity', - category: 'Material Components', - routeName: IconsDemo.routeName, - buildRoute: (BuildContext context) => new IconsDemo(), - ), - new GalleryItem( - title: 'Leave-behind list items', - subtitle: 'List items with hidden actions', - category: 'Material Components', - routeName: LeaveBehindDemo.routeName, - buildRoute: (BuildContext context) => new LeaveBehindDemo(), - ), - new GalleryItem( - title: 'List', - subtitle: 'Layout variations for scrollable lists', - category: 'Material Components', - routeName: ListDemo.routeName, - buildRoute: (BuildContext context) => new ListDemo(), - ), - new GalleryItem( - title: 'Menus', - subtitle: 'Menu buttons and simple menus', - category: 'Material Components', - routeName: MenuDemo.routeName, - buildRoute: (BuildContext context) => new MenuDemo(), - ), - new GalleryItem( - title: 'Modal bottom sheet', - subtitle: 'Modal sheet that slides up from the bottom', - category: 'Material Components', - routeName: ModalBottomSheetDemo.routeName, - buildRoute: (BuildContext context) => new ModalBottomSheetDemo(), - ), - new GalleryItem( - title: 'Page selector', - subtitle: 'PageView with indicator', - category: 'Material Components', - routeName: PageSelectorDemo.routeName, - buildRoute: (BuildContext context) => new PageSelectorDemo(), - ), - new GalleryItem( - title: 'Persistent bottom sheet', - subtitle: 'Sheet that slides up from the bottom', - category: 'Material Components', - routeName: PersistentBottomSheetDemo.routeName, - buildRoute: (BuildContext context) => new PersistentBottomSheetDemo(), - ), - new GalleryItem( - title: 'Progress indicators', - subtitle: 'All kinds: linear, circular, indeterminate, etc', - category: 'Material Components', - routeName: ProgressIndicatorDemo.routeName, - buildRoute: (BuildContext context) => new ProgressIndicatorDemo(), - ), - new GalleryItem( - title: 'Pull to refresh', - subtitle: 'Refresh indicators', - category: 'Material Components', - routeName: OverscrollDemo.routeName, - buildRoute: (BuildContext context) => new OverscrollDemo(), - ), - new GalleryItem( - title: 'Scrollable tabs', - subtitle: 'Tab bar that scrolls', - category: 'Material Components', - routeName: ScrollableTabsDemo.routeName, - buildRoute: (BuildContext context) => new ScrollableTabsDemo(), - ), - new GalleryItem( - title: 'Selection controls', - subtitle: 'Checkboxes, radio buttons, and switches', - category: 'Material Components', - routeName: SelectionControlsDemo.routeName, - buildRoute: (BuildContext context) => new SelectionControlsDemo(), - ), - new GalleryItem( - title: 'Sliders', - subtitle: 'Widgets that select a value by dragging the slider thumb', - category: 'Material Components', - routeName: SliderDemo.routeName, - buildRoute: (BuildContext context) => new SliderDemo(), - ), - new GalleryItem( - title: 'Snackbar', - subtitle: 'Temporary message that appears at the bottom', - category: 'Material Components', - routeName: SnackBarDemo.routeName, - buildRoute: (BuildContext context) => new SnackBarDemo(), - ), - new GalleryItem( - title: 'Tabs', - subtitle: 'Tabs with independently scrollable views', - category: 'Material Components', - routeName: TabsDemo.routeName, - buildRoute: (BuildContext context) => new TabsDemo(), - ), - new GalleryItem( - title: 'Text fields', - subtitle: 'Single line of editable text and numbers', - category: 'Material Components', - routeName: TextFormFieldDemo.routeName, - buildRoute: (BuildContext context) => new TextFormFieldDemo(), - ), - new GalleryItem( - title: 'Tooltips', - subtitle: 'Short message displayed after a long-press', - category: 'Material Components', - routeName: TooltipDemo.routeName, - buildRoute: (BuildContext context) => new TooltipDemo(), - ), - // Cupertino Components - new GalleryItem( - title: 'Activity Indicator', - subtitle: 'Cupertino styled activity indicator', - category: 'Cupertino Components', - routeName: CupertinoProgressIndicatorDemo.routeName, - buildRoute: (BuildContext context) => new CupertinoProgressIndicatorDemo(), - ), - new GalleryItem( - title: 'Buttons', - subtitle: 'Cupertino styled buttons', - category: 'Cupertino Components', - routeName: CupertinoButtonsDemo.routeName, - buildRoute: (BuildContext context) => new CupertinoButtonsDemo(), - ), - new GalleryItem( - title: 'Dialogs', - subtitle: 'Cupertino styled dialogs', - category: 'Cupertino Components', - routeName: CupertinoDialogDemo.routeName, - buildRoute: (BuildContext context) => new CupertinoDialogDemo(), - ), - new GalleryItem( - title: 'Sliders', - subtitle: 'Cupertino styled sliders', - category: 'Cupertino Components', - routeName: CupertinoSliderDemo.routeName, - buildRoute: (BuildContext context) => new CupertinoSliderDemo(), - ), - new GalleryItem( - title: 'Switches', - subtitle: 'Cupertino styled switches', - category: 'Cupertino Components', - routeName: CupertinoSwitchDemo.routeName, - buildRoute: (BuildContext context) => new CupertinoSwitchDemo(), - ), - // Styles - new GalleryItem( - title: 'Colors', - subtitle: 'All of the predefined colors', - category: 'Style', - routeName: ColorsDemo.routeName, - buildRoute: (BuildContext context) => new ColorsDemo(), - ), - new GalleryItem( - title: 'Typography', - subtitle: 'All of the predefined text styles', - category: 'Style', - routeName: TypographyDemo.routeName, - buildRoute: (BuildContext context) => new TypographyDemo(), - ) -]; +List _buildGalleryItems() { + // When editing this list, make sure you keep it in sync with + // the list in ../../test_driver/transitions_perf_test.dart + final List galleryItems = [ + // Demos + new GalleryItem( + title: 'Shrine', + subtitle:'Basic shopping app', + category: 'Demos', + routeName: ShrineDemo.routeName, + buildRoute: (BuildContext context) => new ShrineDemo(), + ), + new GalleryItem( + title: 'Contact profile', + subtitle: 'Address book entry with a flexible appbar', + category: 'Demos', + routeName: ContactsDemo.routeName, + buildRoute: (BuildContext context) => new ContactsDemo(), + ), + new GalleryItem( + title: 'Animation', + subtitle: 'Section organizer', + category: 'Demos', + routeName: AnimationDemo.routeName, + buildRoute: (BuildContext context) => new AnimationDemo(), + ), + // Material Components + new GalleryItem( + title: 'Bottom navigation', + subtitle: 'Bottom navigation with cross-fading views', + category: 'Material Components', + routeName: BottomNavigationDemo.routeName, + buildRoute: (BuildContext context) => new BottomNavigationDemo(), + ), + new GalleryItem( + title: 'Buttons', + subtitle: 'All kinds: flat, raised, dropdown, icon, etc', + category: 'Material Components', + routeName: ButtonsDemo.routeName, + buildRoute: (BuildContext context) => new ButtonsDemo(), + ), + new GalleryItem( + title: 'Cards', + subtitle: 'Material with rounded corners and a drop shadow', + category: 'Material Components', + routeName: CardsDemo.routeName, + buildRoute: (BuildContext context) => new CardsDemo(), + ), + new GalleryItem( + title: 'Chips', + subtitle: 'Label with an optional delete button and avatar', + category: 'Material Components', + routeName: ChipDemo.routeName, + buildRoute: (BuildContext context) => new ChipDemo(), + ), + new GalleryItem( + title: 'Date and time pickers', + subtitle: 'Date and time selection widgets', + category: 'Material Components', + routeName: DateAndTimePickerDemo.routeName, + buildRoute: (BuildContext context) => new DateAndTimePickerDemo(), + ), + new GalleryItem( + title: 'Dialog', + subtitle: 'All kinds: simple, alert, fullscreen, etc', + category: 'Material Components', + routeName: DialogDemo.routeName, + buildRoute: (BuildContext context) => new DialogDemo(), + ), + new GalleryItem( + title: 'Drawer', + subtitle: 'Navigation drawer with a standard header', + category: 'Material Components', + routeName: DrawerDemo.routeName, + buildRoute: (BuildContext context) => new DrawerDemo(), + ), + new GalleryItem( + title: 'Expand/collapse list control', + subtitle: 'List with one level of sublists', + category: 'Material Components', + routeName: TwoLevelListDemo.routeName, + buildRoute: (BuildContext context) => new TwoLevelListDemo(), + ), + new GalleryItem( + title: 'Expansion panels', + subtitle: 'List of expanding panels', + category: 'Material Components', + routeName: ExpasionPanelsDemo.routeName, + buildRoute: (BuildContext context) => new ExpasionPanelsDemo(), + ), + new GalleryItem( + title: 'Floating action button', + subtitle: 'Action buttons with transitions', + category: 'Material Components', + routeName: TabsFabDemo.routeName, + buildRoute: (BuildContext context) => new TabsFabDemo(), + ), + new GalleryItem( + title: 'Grid', + subtitle: 'Row and column layout', + category: 'Material Components', + routeName: GridListDemo.routeName, + buildRoute: (BuildContext context) => new GridListDemo(), + ), + new GalleryItem( + title: 'Icons', + subtitle: 'Enabled and disabled icons with varying opacity', + category: 'Material Components', + routeName: IconsDemo.routeName, + buildRoute: (BuildContext context) => new IconsDemo(), + ), + new GalleryItem( + title: 'Leave-behind list items', + subtitle: 'List items with hidden actions', + category: 'Material Components', + routeName: LeaveBehindDemo.routeName, + buildRoute: (BuildContext context) => new LeaveBehindDemo(), + ), + new GalleryItem( + title: 'List', + subtitle: 'Layout variations for scrollable lists', + category: 'Material Components', + routeName: ListDemo.routeName, + buildRoute: (BuildContext context) => new ListDemo(), + ), + new GalleryItem( + title: 'Menus', + subtitle: 'Menu buttons and simple menus', + category: 'Material Components', + routeName: MenuDemo.routeName, + buildRoute: (BuildContext context) => new MenuDemo(), + ), + new GalleryItem( + title: 'Modal bottom sheet', + subtitle: 'Modal sheet that slides up from the bottom', + category: 'Material Components', + routeName: ModalBottomSheetDemo.routeName, + buildRoute: (BuildContext context) => new ModalBottomSheetDemo(), + ), + new GalleryItem( + title: 'Page selector', + subtitle: 'PageView with indicator', + category: 'Material Components', + routeName: PageSelectorDemo.routeName, + buildRoute: (BuildContext context) => new PageSelectorDemo(), + ), + new GalleryItem( + title: 'Persistent bottom sheet', + subtitle: 'Sheet that slides up from the bottom', + category: 'Material Components', + routeName: PersistentBottomSheetDemo.routeName, + buildRoute: (BuildContext context) => new PersistentBottomSheetDemo(), + ), + new GalleryItem( + title: 'Progress indicators', + subtitle: 'All kinds: linear, circular, indeterminate, etc', + category: 'Material Components', + routeName: ProgressIndicatorDemo.routeName, + buildRoute: (BuildContext context) => new ProgressIndicatorDemo(), + ), + new GalleryItem( + title: 'Pull to refresh', + subtitle: 'Refresh indicators', + category: 'Material Components', + routeName: OverscrollDemo.routeName, + buildRoute: (BuildContext context) => new OverscrollDemo(), + ), + new GalleryItem( + title: 'Scrollable tabs', + subtitle: 'Tab bar that scrolls', + category: 'Material Components', + routeName: ScrollableTabsDemo.routeName, + buildRoute: (BuildContext context) => new ScrollableTabsDemo(), + ), + new GalleryItem( + title: 'Selection controls', + subtitle: 'Checkboxes, radio buttons, and switches', + category: 'Material Components', + routeName: SelectionControlsDemo.routeName, + buildRoute: (BuildContext context) => new SelectionControlsDemo(), + ), + new GalleryItem( + title: 'Sliders', + subtitle: 'Widgets that select a value by dragging the slider thumb', + category: 'Material Components', + routeName: SliderDemo.routeName, + buildRoute: (BuildContext context) => new SliderDemo(), + ), + new GalleryItem( + title: 'Snackbar', + subtitle: 'Temporary message that appears at the bottom', + category: 'Material Components', + routeName: SnackBarDemo.routeName, + buildRoute: (BuildContext context) => new SnackBarDemo(), + ), + new GalleryItem( + title: 'Tabs', + subtitle: 'Tabs with independently scrollable views', + category: 'Material Components', + routeName: TabsDemo.routeName, + buildRoute: (BuildContext context) => new TabsDemo(), + ), + new GalleryItem( + title: 'Text fields', + subtitle: 'Single line of editable text and numbers', + category: 'Material Components', + routeName: TextFormFieldDemo.routeName, + buildRoute: (BuildContext context) => new TextFormFieldDemo(), + ), + new GalleryItem( + title: 'Tooltips', + subtitle: 'Short message displayed after a long-press', + category: 'Material Components', + routeName: TooltipDemo.routeName, + buildRoute: (BuildContext context) => new TooltipDemo(), + ), + // Cupertino Components + new GalleryItem( + title: 'Activity Indicator', + subtitle: 'Cupertino styled activity indicator', + category: 'Cupertino Components', + routeName: CupertinoProgressIndicatorDemo.routeName, + buildRoute: (BuildContext context) => new CupertinoProgressIndicatorDemo(), + ), + new GalleryItem( + title: 'Buttons', + subtitle: 'Cupertino styled buttons', + category: 'Cupertino Components', + routeName: CupertinoButtonsDemo.routeName, + buildRoute: (BuildContext context) => new CupertinoButtonsDemo(), + ), + new GalleryItem( + title: 'Dialogs', + subtitle: 'Cupertino styled dialogs', + category: 'Cupertino Components', + routeName: CupertinoDialogDemo.routeName, + buildRoute: (BuildContext context) => new CupertinoDialogDemo(), + ), + new GalleryItem( + title: 'Sliders', + subtitle: 'Cupertino styled sliders', + category: 'Cupertino Components', + routeName: CupertinoSliderDemo.routeName, + buildRoute: (BuildContext context) => new CupertinoSliderDemo(), + ), + new GalleryItem( + title: 'Switches', + subtitle: 'Cupertino styled switches', + category: 'Cupertino Components', + routeName: CupertinoSwitchDemo.routeName, + buildRoute: (BuildContext context) => new CupertinoSwitchDemo(), + ), + // Styles + new GalleryItem( + title: 'Colors', + subtitle: 'All of the predefined colors', + category: 'Style', + routeName: ColorsDemo.routeName, + buildRoute: (BuildContext context) => new ColorsDemo(), + ), + new GalleryItem( + title: 'Typography', + subtitle: 'All of the predefined text styles', + category: 'Style', + routeName: TypographyDemo.routeName, + buildRoute: (BuildContext context) => new TypographyDemo(), + ) + ]; + + // Keep Pesto around for its regression test value. It is not included + // in (release builds) the performance tests. + assert(() { + galleryItems.insert(0, + new GalleryItem( + title: 'Pesto', + subtitle: 'Simple recipe browser', + category: 'Demos', + routeName: PestoDemo.routeName, + buildRoute: (BuildContext context) => new PestoDemo(), + ), + ); + return true; + }); + + return galleryItems; +} + +final List kAllGalleryItems = _buildGalleryItems(); diff --git a/examples/flutter_gallery/test_driver/transitions_perf_test.dart b/examples/flutter_gallery/test_driver/transitions_perf_test.dart index 79b5252d1d8..827ee700557 100644 --- a/examples/flutter_gallery/test_driver/transitions_perf_test.dart +++ b/examples/flutter_gallery/test_driver/transitions_perf_test.dart @@ -33,7 +33,6 @@ class Demo { // kAllGalleryItems.map((GalleryItem item) => item.title).toList(); const List demos = const [ // Demos - const Demo('Pesto', profiled: true), const Demo('Shrine', profiled: true), const Demo('Contact profile', profiled: true), const Demo('Animation', profiled: true),