Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
229b75b
[BEAM-12967]: Created Examples Component
miamihotline Oct 13, 2021
9d5b229
[BEAM-12967]: Wrapped CategoryBubble and ExpansionPanelItem in MouseR…
miamihotline Oct 15, 2021
5a49ae1
[BEAM-13064]: Implemented Search field and Filter by type components …
miamihotline Oct 15, 2021
3276761
Merge remote-tracking branch 'origin/master' into BEAM-12967
miamihotline Oct 15, 2021
5445526
[BEAM-13064]: Fixed names to clarify code, refactored Category model …
miamihotline Oct 15, 2021
279c4ef
[BEAM-13064]: Increased test coverage of Example Dropdown module
miamihotline Oct 15, 2021
3c577d9
[BEAM-12967] Added generated files
miamihotline Oct 19, 2021
8d04eff
Merge branch 'apache:master' into BEAM-12967
miamihotline Oct 19, 2021
f249c69
[BEAM-12967]: Added license to generated files
miamihotline Oct 19, 2021
573222d
Merge remote-tracking branch 'origin/BEAM-12967' into BEAM-13064
miamihotline Oct 19, 2021
86ccec9
[BEAM-13064]: Fixed sorting functionality, updated tests & mocks
miamihotline Oct 19, 2021
2960e8e
[BEAM-13064]: Refactored code
miamihotline Oct 21, 2021
36fce7e
Merge remote-tracking branch 'origin/master' into BEAM-12967
miamihotline Oct 22, 2021
2c0d3fb
[BEAM-12967]: Deleted duplicate files
miamihotline Oct 22, 2021
b6cbf17
Merge remote-tracking branch 'origin/BEAM-12967' into BEAM-13064
miamihotline Oct 22, 2021
bb7880f
Merge remote-tracking branch 'origin/master' into BEAM-12967
miamihotline Oct 26, 2021
44e5964
Merge remote-tracking branch 'origin/BEAM-12967' into BEAM-13064
miamihotline Oct 26, 2021
d28f13c
Merge remote-tracking branch 'origin/master' into BEAM-13064
miamihotline Nov 8, 2021
7888359
[BEAM-13064] Fixes after merge
miamihotline Nov 8, 2021
b73f5f7
[Playground][BEAM-12941][Bugfix] Fix workflows for playground applica…
snkalinin Nov 16, 2021
d449275
Revert "[Playground][BEAM-12941][Bugfix] Fix workflows for playground…
ilya-kozyrev Nov 16, 2021
69d0191
Merge branch 'apache:master' into master
ilya-kozyrev Nov 16, 2021
1bf7f6f
Merge branch 'apache:master' into master
Nov 16, 2021
72bad55
Merge branch 'apache:master' into master
ilya-kozyrev Nov 16, 2021
1d6783e
Merge branch 'apache:master' into master
Nov 16, 2021
3a81f54
Merge branch 'apache:master' into master
ilya-kozyrev Nov 16, 2021
d9cce13
Merge branch 'apache:master' into master
Nov 17, 2021
124b58b
Merge remote-tracking branch 'origin/master' into BEAM-13064
miamihotline Nov 18, 2021
4e8ec3f
[BEAM-13064] Fixed analyze issues
miamihotline Nov 18, 2021
d445d02
[BEAM-13064] Fixed example selector state test
miamihotline Nov 18, 2021
c24b695
Merge branch 'apache:master' into master
Nov 19, 2021
13552bc
Merge remote-tracking branch 'origin/master' into BEAM-13064
miamihotline Nov 19, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -18,34 +18,36 @@

import 'package:flutter/material.dart';
import 'package:playground/modules/examples/components/examples_components.dart';
import 'package:playground/pages/playground/states/example_selector_state.dart';
import 'package:provider/provider.dart';

class ExampleList extends StatelessWidget {
final List items;
final ScrollController controller;

const ExampleList({
Key? key,
required this.items,
required this.controller,
}) : super(key: key);

@override
Widget build(BuildContext context) {
return Expanded(
child: Container(
color: Theme.of(context).backgroundColor,
child: Scrollbar(
isAlwaysShown: true,
showTrackOnHover: true,
controller: controller,
child: ListView.builder(
itemCount: items.length,
itemBuilder: (context, index) => CategoryExpansionPanel(
categoryName: items[index].name,
examples: items[index].examples,
),
return Consumer<ExampleSelectorState>(
builder: (context, state, child) => Expanded(
child: Container(
color: Theme.of(context).backgroundColor,
child: Scrollbar(
isAlwaysShown: true,
showTrackOnHover: true,
controller: controller,
shrinkWrap: true,
child: ListView.builder(
itemCount: state.categories.length,
itemBuilder: (context, index) => CategoryExpansionPanel(
categoryName: state.categories[index].name,
examples: state.categories[index].examples,
),
controller: controller,
shrinkWrap: true,
),
),
),
),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,48 +19,55 @@
import 'package:flutter/material.dart';
import 'package:playground/config/theme.dart';
import 'package:playground/constants/sizes.dart';
import 'package:playground/pages/playground/states/example_dropdown_state.dart';
import 'package:playground/modules/examples/models/example_model.dart';
import 'package:playground/pages/playground/states/example_selector_state.dart';
import 'package:provider/provider.dart';

class CategoryBubble extends StatelessWidget {
final String name;
final ExampleType type;

const CategoryBubble({Key? key, required this.name}) : super(key: key);
const CategoryBubble({Key? key, required this.type}) : super(key: key);

@override
Widget build(BuildContext context) {
return Padding(
padding: const EdgeInsets.only(right: kMdSpacing),
child: Consumer<ExampleDropdownState>(
builder: (context, state, child) => MouseRegion(
cursor: SystemMouseCursors.click,
child: GestureDetector(
onTap: () {
if (name != state.selectedCategory) {
state.setSelectedCategory(name);
}
},
child: Container(
height: kContainerHeight,
padding: const EdgeInsets.symmetric(horizontal: kXlSpacing),
decoration: BoxDecoration(
color: name == state.selectedCategory
? ThemeColors.of(context).primary
: ThemeColors.of(context).lightGreyColor,
borderRadius: BorderRadius.circular(kXlBorderRadius),
),
child: Center(
child: Text(
name,
style: TextStyle(
color: name == state.selectedCategory
? ThemeColors.of(context).primaryBackgroundTextColor
: ThemeColors.of(context).lightGreyBackgroundTextColor,
return MouseRegion(
cursor: SystemMouseCursors.click,
child: Padding(
padding: const EdgeInsets.only(right: kMdSpacing),
child: Consumer<ExampleSelectorState>(
builder: (context, state, child) {
final isSelected = type == state.selectedFilterType;

return GestureDetector(
onTap: () {
if (!isSelected) {
state.setSelectedFilterType(type);
state.sortCategories();
}
},
child: Container(
height: kContainerHeight,
padding: const EdgeInsets.symmetric(horizontal: kXlSpacing),
decoration: BoxDecoration(
color: isSelected
? ThemeColors.of(context).primary
: ThemeColors.of(context).lightGreyColor,
borderRadius: BorderRadius.circular(kXlBorderRadius),
),
child: Center(
child: Text(
type.name,
style: TextStyle(
color: isSelected
? ThemeColors.of(context).primaryBackgroundTextColor
: ThemeColors.of(context)
.lightGreyBackgroundTextColor,
),
),
),
),
),
),
);
},
),
),
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
import 'package:flutter/material.dart';
import 'package:playground/constants/sizes.dart';
import 'package:playground/modules/examples/components/examples_components.dart';
import 'package:playground/modules/examples/models/example_model.dart';

class TypeFilter extends StatelessWidget {
const TypeFilter({Key? key}) : super(key: key);
Expand All @@ -32,10 +33,10 @@ class TypeFilter extends StatelessWidget {
),
child: Row(
children: const <CategoryBubble>[
CategoryBubble(name: 'All'),
CategoryBubble(name: 'Examples'),
CategoryBubble(name: 'Katas'),
CategoryBubble(name: 'Unit tests'),
CategoryBubble(type: ExampleType.all),
CategoryBubble(type: ExampleType.example),
CategoryBubble(type: ExampleType.kata),
CategoryBubble(type: ExampleType.test),
],
),
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@
import 'package:flutter/material.dart';
import 'package:playground/config/theme.dart';
import 'package:playground/constants/sizes.dart';
import 'package:playground/pages/playground/states/example_selector_state.dart';
import 'package:provider/provider.dart';

const double kContainerWidth = 376.0;
const int kMinLines = 1;
Expand All @@ -37,45 +39,53 @@ class SearchField extends StatelessWidget {
borderRadius: BorderRadius.circular(kMdBorderRadius),
);

return Container(
margin: const EdgeInsets.only(
top: kLgSpacing,
right: kLgSpacing,
left: kLgSpacing,
),
width: kContainerWidth,
height: kContainerHeight,
color: Theme.of(context).backgroundColor,
child: ClipRRect(
borderRadius: BorderRadius.circular(kMdBorderRadius),
child: TextFormField(
controller: controller,
decoration: InputDecoration(
suffixIcon: Padding(
padding: const EdgeInsetsDirectional.only(
start: kZeroSpacing,
end: kZeroSpacing,
),
child: Icon(
Icons.search,
color: ThemeColors.of(context).lightGreyColor,
size: kIconSizeMd,
return Consumer<ExampleSelectorState>(
builder: (context, state, child) => Container(
margin: const EdgeInsets.only(
top: kLgSpacing,
right: kLgSpacing,
left: kLgSpacing,
),
width: kContainerWidth,
height: kContainerHeight,
color: Theme.of(context).backgroundColor,
child: ClipRRect(
borderRadius: BorderRadius.circular(kMdBorderRadius),
child: TextFormField(
controller: controller,
decoration: InputDecoration(
suffixIcon: Padding(
padding: const EdgeInsetsDirectional.only(
start: kZeroSpacing,
end: kZeroSpacing,
),
child: Icon(
Icons.search,
color: ThemeColors.of(context).lightGreyColor,
size: kIconSizeMd,
),
),
focusedBorder: border,
enabledBorder: border,
filled: false,
isDense: true,
hintText: kHintText,
contentPadding: const EdgeInsets.only(left: kLgSpacing),
),
focusedBorder: border,
enabledBorder: border,
filled: false,
isDense: true,
hintText: kHintText,
contentPadding: const EdgeInsets.only(left: kLgSpacing),
cursorColor: ThemeColors.of(context).lightGreyColor,
cursorWidth: kCursorSize,
textAlignVertical: TextAlignVertical.center,
onFieldSubmitted: (String filterText) {
state.setFilterText(filterText);
state.sortCategories();
},
onChanged: (String filterText) {
state.setFilterText(filterText);
state.sortCategories();
},
maxLines: kMinLines,
minLines: kMaxLines,
),
cursorColor: ThemeColors.of(context).lightGreyColor,
cursorWidth: kCursorSize,
textAlignVertical: TextAlignVertical.center,
onFieldSubmitted: (String txt) {},
onChanged: (String txt) {},
maxLines: kMinLines,
minLines: kMaxLines,
),
),
);
Expand Down
Loading