Skip to content

Commit

Permalink
1.6.0 - Fixing a few issues with new features (#103)
Browse files Browse the repository at this point in the history
* fixing padding on the players search results

* fixing section header alignment

* fixing issues with search results not being cleared

* adding suggestions to the player search

* adding hero animation to player search

* adding more padding to the drawer logo section

* adding links to release notes and wiki in the drawer menu

* Updating tabs to show hamburger menu

* adding board game id and username to the failure report

* Updating android mockups

* Adding apple's screenshots to mockups

* adding buy me a coffee link
  • Loading branch information
mkieres authored Jul 9, 2022
1 parent dfd829e commit 9a38e69
Show file tree
Hide file tree
Showing 12 changed files with 329 additions and 253 deletions.
Binary file not shown.
5 changes: 4 additions & 1 deletion board_games_companion/lib/common/app_text.dart
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ class AppText {
static const playersPageDeletePlayersButtonText = 'Delete Players';
static const playersPageNoPlayersTitle = "You don't have any players";
static const playersPageNoPlayersInstructions =
'Create players to log games you played with your family or friends';
"Create players to log games you've played with your family or friends";
static const playersPageConfirmationTitle = 'Delete players';
static const playersPageConfirmationDialogDeletePlayersButtonText = 'Delete';
static const playersPageConfirmationDialogContent =
Expand All @@ -110,4 +110,7 @@ class AppText {
static const settingsPageTitle = 'Settings';

static const drawerVersionFormat = 'Version %s';
static const drawerReleaseNotes = 'Release notes';
static const drawerAppWiki = 'Wiki';
static const drawerBuyMeACoffe = 'Buy Me a Coffee';
}
6 changes: 6 additions & 0 deletions board_games_companion/lib/common/constants.dart
Original file line number Diff line number Diff line change
Expand Up @@ -44,4 +44,10 @@ class Constants {
static const minNumberOfPlayers = 1;

static const fullCricleDegrees = 360;

static const appReleaseNotesUrl = 'https://github.com/Progrunning/BoardGamesCompanion/releases';
static const appWikiFeaturesUrl =
'https://github.com/Progrunning/BoardGamesCompanion/wiki/Features';
static const buyMeACoffeeUrl =
'https://www.buymeacoffee.com/mkieres';
}
211 changes: 94 additions & 117 deletions board_games_companion/lib/pages/games/games_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -107,58 +107,52 @@ class _Collection extends StatelessWidget {

@override
Widget build(BuildContext context) {
return SafeArea(
child: GestureDetector(
onTap: () {
FocusScope.of(context).unfocus();
},
child: CustomScrollView(
slivers: <Widget>[
_AppBar(
boardGamesStore: boardGamesStore,
topTabController: topTabController,
analyticsService: analyticsService,
rateAndReviewService: rateAndReviewService,
updateSearchResults: (String searchPhrase) => _updateSearchResults(searchPhrase),
),
Builder(
builder: (_) {
final List<BoardGameDetails> boardGames = [];
switch (boardGamesStore.selectedTab) {
case GamesTab.Owned:
boardGames.addAll(boardGamesStore.filteredBoardGamesOwned);
break;
case GamesTab.Friends:
boardGames.addAll(boardGamesStore.filteredBoardGamesFriends);
break;
case GamesTab.Wishlist:
boardGames.addAll(boardGamesStore.filteredBoardGamesOnWishlist);
break;
}

if (boardGames.isEmpty) {
if (boardGamesStore.searchPhrase?.isNotEmpty ?? false) {
return _EmptySearchResult(
boardGamesStore: boardGamesStore,
onClearSearch: () => _updateSearchResults(''),
);
}

return _EmptyCollection(
return GestureDetector(
onTap: () => FocusScope.of(context).unfocus(),
child: CustomScrollView(
slivers: <Widget>[
_AppBar(
boardGamesStore: boardGamesStore,
topTabController: topTabController,
analyticsService: analyticsService,
rateAndReviewService: rateAndReviewService,
updateSearchResults: (String searchPhrase) => _updateSearchResults(searchPhrase),
),
Builder(
builder: (_) {
final List<BoardGameDetails> boardGames = [];
switch (boardGamesStore.selectedTab) {
case GamesTab.Owned:
boardGames.addAll(boardGamesStore.filteredBoardGamesOwned);
break;
case GamesTab.Friends:
boardGames.addAll(boardGamesStore.filteredBoardGamesFriends);
break;
case GamesTab.Wishlist:
boardGames.addAll(boardGamesStore.filteredBoardGamesOnWishlist);
break;
}

if (boardGames.isEmpty) {
if (boardGamesStore.searchPhrase?.isNotEmpty ?? false) {
return _EmptySearchResult(
boardGamesStore: boardGamesStore,
onClearSearch: () => _updateSearchResults(''),
);
}

return _Grid(
boardGames: boardGames,
collectionType: boardGamesStore.selectedTab.toCollectionType(),
analyticsService: analyticsService,
);
},
),
const SliverPadding(padding: EdgeInsets.all(8.0)),
],
),
return _EmptyCollection(boardGamesStore: boardGamesStore);
}

return _Grid(
boardGames: boardGames,
collectionType: boardGamesStore.selectedTab.toCollectionType(),
analyticsService: analyticsService,
);
},
),
const SliverPadding(padding: EdgeInsets.all(8.0)),
],
),
);
}
Expand Down Expand Up @@ -382,83 +376,68 @@ class _Grid extends StatelessWidget {
}

class _Empty extends StatelessWidget {
const _Empty({
Key? key,
}) : super(key: key);
const _Empty({Key? key}) : super(key: key);

@override
Widget build(BuildContext context) {
return SafeArea(
child: SingleChildScrollView(
child: Padding(
padding: const EdgeInsets.all(
Dimensions.doubleStandardSpacing,
),
child: Column(
mainAxisSize: MainAxisSize.min,
children: const <Widget>[
SizedBox(
height: 60,
),
Center(
child: Text(
'Your games collection is empty',
style: TextStyle(
fontSize: Dimensions.extraLargeFontSize,
return CustomScrollView(
slivers: [
const SliverAppBar(pinned: true, floating: true, foregroundColor: AppTheme.accentColor),
SliverPadding(
padding: const EdgeInsets.all(Dimensions.doubleStandardSpacing),
sliver: SliverToBoxAdapter(
child: Column(
mainAxisSize: MainAxisSize.min,
children: const <Widget>[
SizedBox(height: 40),
Center(
child: Text(
'Your games collection is empty',
style: TextStyle(fontSize: Dimensions.extraLargeFontSize),
),
),
),
SizedBox(
height: Dimensions.doubleStandardSpacing,
),
Icon(
Icons.sentiment_dissatisfied_sharp,
size: 80,
color: AppTheme.primaryColor,
),
SizedBox(
height: Dimensions.doubleStandardSpacing,
),
Text.rich(
TextSpan(
children: <InlineSpan>[
TextSpan(
text: 'Nothing to worry about though! ',
style: TextStyle(fontWeight: FontWeight.bold),
),
TextSpan(
text:
'Follow the below instructions to fill up this screen with board games.\n\n',
),
TextSpan(text: 'Use the bottom '),
TextSpan(
text: 'Search',
style: TextStyle(fontWeight: FontWeight.bold),
),
TextSpan(
text:
' tab to check out current TOP 50 hot board games or look up any title.\n',
),
],
SizedBox(height: Dimensions.doubleStandardSpacing),
Icon(
Icons.sentiment_dissatisfied_sharp,
size: 80,
color: AppTheme.primaryColor,
),
textAlign: TextAlign.justify,
style: TextStyle(fontSize: Dimensions.mediumFontSize),
),
BggCommunityMemberText(),
_ImportDataFromBggSection(),
SizedBox(height: Dimensions.standardSpacing),
],
SizedBox(height: Dimensions.doubleStandardSpacing),
Text.rich(
TextSpan(
children: <InlineSpan>[
TextSpan(
text: 'Nothing to worry about though! ',
style: TextStyle(fontWeight: FontWeight.bold),
),
TextSpan(
text:
'Follow the below instructions to fill up this screen with board games.\n\n',
),
TextSpan(text: 'Use the bottom '),
TextSpan(text: 'Search', style: TextStyle(fontWeight: FontWeight.bold)),
TextSpan(
text:
' tab to check out current TOP 50 hot board games or look up any title and start adding them to your collections.\n',
),
],
),
textAlign: TextAlign.justify,
style: TextStyle(fontSize: Dimensions.mediumFontSize),
),
BggCommunityMemberText(),
_ImportDataFromBggSection(),
],
),
),
),
),
],
);
}
}

class _ImportDataFromBggSection extends StatefulWidget {
const _ImportDataFromBggSection({
Key? key,
}) : super(key: key);
const _ImportDataFromBggSection({Key? key}) : super(key: key);

@override
State<_ImportDataFromBggSection> createState() => _ImportDataFromBggSectionState();
Expand Down Expand Up @@ -487,11 +466,9 @@ class _ImportDataFromBggSectionState extends State<_ImportDataFromBggSection> {
children: [
BggCommunityMemberUserNameTextField(
controller: _bggUserNameController,
onSubmit: () {
setState(() {
_triggerImport = true;
});
},
onSubmit: () => setState(() {
_triggerImport = true;
}),
),
const SizedBox(height: Dimensions.standardSpacing),
Align(
Expand Down
36 changes: 19 additions & 17 deletions board_games_companion/lib/pages/home/home_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -61,23 +61,25 @@ class _HomePageState extends BasePageState<HomePage> with SingleTickerProviderSt
key: HomePage.homePageGlobalKey,
child: Scaffold(
drawer: const Drawer(child: HomePageDrawer()),
body: PageContainer(
child: TabBarView(
controller: tabController,
children: <Widget>[
Consumer2<BoardGamesStore, UserStore>(
builder: (_, boardGamesStore, userStore, __) {
return GamesPage(
boardGamesStore,
userStore,
widget.analyticsService,
widget.rateAndReviewService,
);
},
),
SearchBoardGamesPage(analyticsService: widget.analyticsService),
PlayersPage(playersViewModel: widget.playersViewModel),
],
body: SafeArea(
child: PageContainer(
child: TabBarView(
controller: tabController,
children: <Widget>[
Consumer2<BoardGamesStore, UserStore>(
builder: (_, boardGamesStore, userStore, __) {
return GamesPage(
boardGamesStore,
userStore,
widget.analyticsService,
widget.rateAndReviewService,
);
},
),
SearchBoardGamesPage(analyticsService: widget.analyticsService),
PlayersPage(playersViewModel: widget.playersViewModel),
],
),
),
),
bottomNavigationBar: ConvexAppBar(
Expand Down
Loading

0 comments on commit 9a38e69

Please sign in to comment.