[mob][photos] Increase "Add name" hitpoint
This commit is contained in:
parent
3ab2535193
commit
abff589c21
|
@ -80,79 +80,76 @@ class _SearchSectionState extends State<SearchSection> {
|
||||||
debugPrint("Building section for ${widget.sectionType.name}");
|
debugPrint("Building section for ${widget.sectionType.name}");
|
||||||
final shouldShowMore = _examples.length >= widget.limit - 1;
|
final shouldShowMore = _examples.length >= widget.limit - 1;
|
||||||
final textTheme = getEnteTextTheme(context);
|
final textTheme = getEnteTextTheme(context);
|
||||||
return Padding(
|
return _examples.isNotEmpty
|
||||||
padding: const EdgeInsets.symmetric(vertical: 8),
|
? GestureDetector(
|
||||||
child: _examples.isNotEmpty
|
behavior: HitTestBehavior.opaque,
|
||||||
? GestureDetector(
|
onTap: () {
|
||||||
behavior: HitTestBehavior.opaque,
|
if (shouldShowMore) {
|
||||||
onTap: () {
|
routeToPage(
|
||||||
if (shouldShowMore) {
|
context,
|
||||||
routeToPage(
|
SearchSectionAllPage(
|
||||||
context,
|
sectionType: widget.sectionType,
|
||||||
SearchSectionAllPage(
|
),
|
||||||
sectionType: widget.sectionType,
|
);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
child: Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
Row(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
|
children: [
|
||||||
|
Padding(
|
||||||
|
padding: const EdgeInsets.all(12),
|
||||||
|
child: Text(
|
||||||
|
widget.sectionType.sectionTitle(context),
|
||||||
|
style: textTheme.largeBold,
|
||||||
|
),
|
||||||
),
|
),
|
||||||
);
|
shouldShowMore
|
||||||
}
|
? Padding(
|
||||||
},
|
padding: const EdgeInsets.all(12),
|
||||||
child: Column(
|
child: Icon(
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
Icons.chevron_right_outlined,
|
||||||
children: [
|
color: getEnteColorScheme(context).strokeMuted,
|
||||||
Row(
|
),
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
)
|
||||||
children: [
|
: const SizedBox.shrink(),
|
||||||
Padding(
|
],
|
||||||
padding: const EdgeInsets.all(12),
|
),
|
||||||
child: Text(
|
const SizedBox(height: 2),
|
||||||
|
SearchExampleRow(_examples, widget.sectionType),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
)
|
||||||
|
: Padding(
|
||||||
|
padding: const EdgeInsets.only(left: 16, right: 8),
|
||||||
|
child: Row(
|
||||||
|
children: [
|
||||||
|
Expanded(
|
||||||
|
child: Padding(
|
||||||
|
padding: const EdgeInsets.symmetric(vertical: 12),
|
||||||
|
child: Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
Text(
|
||||||
widget.sectionType.sectionTitle(context),
|
widget.sectionType.sectionTitle(context),
|
||||||
style: textTheme.largeBold,
|
style: textTheme.largeBold,
|
||||||
),
|
),
|
||||||
),
|
const SizedBox(height: 24),
|
||||||
shouldShowMore
|
Text(
|
||||||
? Padding(
|
widget.sectionType.getEmptyStateText(context),
|
||||||
padding: const EdgeInsets.all(12),
|
style: textTheme.smallMuted,
|
||||||
child: Icon(
|
),
|
||||||
Icons.chevron_right_outlined,
|
],
|
||||||
color: getEnteColorScheme(context).strokeMuted,
|
|
||||||
),
|
|
||||||
)
|
|
||||||
: const SizedBox.shrink(),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
const SizedBox(height: 2),
|
|
||||||
SearchExampleRow(_examples, widget.sectionType),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
)
|
|
||||||
: Padding(
|
|
||||||
padding: const EdgeInsets.only(left: 16, right: 8),
|
|
||||||
child: Row(
|
|
||||||
children: [
|
|
||||||
Expanded(
|
|
||||||
child: Padding(
|
|
||||||
padding: const EdgeInsets.symmetric(vertical: 12),
|
|
||||||
child: Column(
|
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
|
||||||
children: [
|
|
||||||
Text(
|
|
||||||
widget.sectionType.sectionTitle(context),
|
|
||||||
style: textTheme.largeBold,
|
|
||||||
),
|
|
||||||
const SizedBox(height: 24),
|
|
||||||
Text(
|
|
||||||
widget.sectionType.getEmptyStateText(context),
|
|
||||||
style: textTheme.smallMuted,
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
const SizedBox(width: 8),
|
),
|
||||||
SearchSectionEmptyCTAIcon(widget.sectionType),
|
const SizedBox(width: 8),
|
||||||
],
|
SearchSectionEmptyCTAIcon(widget.sectionType),
|
||||||
),
|
],
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -231,7 +228,7 @@ class SearchExample extends StatelessWidget {
|
||||||
child: SizedBox(
|
child: SizedBox(
|
||||||
width: width,
|
width: width,
|
||||||
child: Padding(
|
child: Padding(
|
||||||
padding: const EdgeInsets.symmetric(horizontal: 6, vertical: 10),
|
padding: const EdgeInsets.only(left: 6, right: 6, top: 8),
|
||||||
child: Column(
|
child: Column(
|
||||||
mainAxisSize: MainAxisSize.min,
|
mainAxisSize: MainAxisSize.min,
|
||||||
children: [
|
children: [
|
||||||
|
@ -260,11 +257,9 @@ class SearchExample extends StatelessWidget {
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
const SizedBox(
|
|
||||||
height: 10,
|
|
||||||
),
|
|
||||||
isCluster
|
isCluster
|
||||||
? GestureDetector(
|
? GestureDetector(
|
||||||
|
behavior: HitTestBehavior.translucent,
|
||||||
onTap: () async {
|
onTap: () async {
|
||||||
final result = await showAssignPersonAction(
|
final result = await showAssignPersonAction(
|
||||||
context,
|
context,
|
||||||
|
@ -276,20 +271,26 @@ class SearchExample extends StatelessWidget {
|
||||||
routeToPage(context, PeoplePage(person: result));
|
routeToPage(context, PeoplePage(person: result));
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
child: Padding(
|
||||||
|
padding: const EdgeInsets.only(top: 10, bottom: 16),
|
||||||
|
child: Text(
|
||||||
|
"Add name",
|
||||||
|
maxLines: 1,
|
||||||
|
textAlign: TextAlign.center,
|
||||||
|
overflow: TextOverflow.ellipsis,
|
||||||
|
style: getEnteTextTheme(context).mini,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
)
|
||||||
|
: Padding(
|
||||||
|
padding: const EdgeInsets.only(top: 10, bottom: 16),
|
||||||
child: Text(
|
child: Text(
|
||||||
"Add name",
|
searchResult.name(),
|
||||||
maxLines: 1,
|
maxLines: 2,
|
||||||
textAlign: TextAlign.center,
|
textAlign: TextAlign.center,
|
||||||
overflow: TextOverflow.ellipsis,
|
overflow: TextOverflow.ellipsis,
|
||||||
style: getEnteTextTheme(context).mini,
|
style: getEnteTextTheme(context).mini,
|
||||||
),
|
),
|
||||||
)
|
|
||||||
: Text(
|
|
||||||
searchResult.name(),
|
|
||||||
maxLines: 2,
|
|
||||||
textAlign: TextAlign.center,
|
|
||||||
overflow: TextOverflow.ellipsis,
|
|
||||||
style: getEnteTextTheme(context).mini,
|
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
|
Loading…
Reference in a new issue