Fix Scribe on responsive mobile

- Button was not added in MobileResponsiveAppBar
- Mobile behavior related scripts were not correctly added for web composer
- Mobile behavior related scripts return value was not properly handled for web composer
- In responsive web, bottomsheet modal clicks were intercepted by iframe behind
This commit is contained in:
Théo Poizat
2026-02-10 08:27:30 +01:00
committed by Dat H. Pham
parent 46a12745a5
commit 03a03b9088
6 changed files with 99 additions and 54 deletions
@@ -2,6 +2,7 @@ import 'package:core/presentation/extensions/color_extension.dart';
import 'package:core/presentation/resources/image_paths.dart';
import 'package:core/presentation/views/button/tmail_button_widget.dart';
import 'package:flutter/material.dart';
import 'package:pointer_interceptor/pointer_interceptor.dart';
import 'package:scribe/scribe.dart';
class AiScribeMobileActionsBottomSheet extends StatefulWidget {
@@ -196,39 +197,41 @@ class _AiScribeMobileActionsBottomSheetState
final hasContent = widget.content?.isNotEmpty ?? false;
return Container(
height: double.infinity,
decoration: const BoxDecoration(
color: AIScribeColors.background,
),
child: SafeArea(
child: Column(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.stretch,
children: [
Expanded(
child: Column(
mainAxisSize: MainAxisSize.min,
crossAxisAlignment: CrossAxisAlignment.stretch,
children: [
_buildHeader(context, localizations),
_buildTextCard(context),
if(hasContent)
Flexible(
child: ValueListenableBuilder<AiScribeCategoryContextMenuAction?>(
valueListenable: _selectedCategory,
builder: (context, selectedCategory, _) {
return selectedCategory == null
? _buildMenuListView(menuActions)
: _buildSubmenuListView();
},
return PointerInterceptor(
child: Container(
height: double.infinity,
decoration: const BoxDecoration(
color: AIScribeColors.background,
),
child: SafeArea(
child: Column(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.stretch,
children: [
Expanded(
child: Column(
mainAxisSize: MainAxisSize.min,
crossAxisAlignment: CrossAxisAlignment.stretch,
children: [
_buildHeader(context, localizations),
_buildTextCard(context),
if(hasContent)
Flexible(
child: ValueListenableBuilder<AiScribeCategoryContextMenuAction?>(
valueListenable: _selectedCategory,
builder: (context, selectedCategory, _) {
return selectedCategory == null
? _buildMenuListView(menuActions)
: _buildSubmenuListView();
},
),
),
),
],
],
),
),
),
_buildBottomBar(context),
],
_buildBottomBar(context),
],
),
),
),
);
@@ -1,5 +1,6 @@
import 'package:core/presentation/resources/image_paths.dart';
import 'package:flutter/material.dart';
import 'package:pointer_interceptor/pointer_interceptor.dart';
import 'package:scribe/scribe.dart';
class AiScribeMobileSuggestionBottomSheet extends StatefulWidget {
@@ -41,27 +42,29 @@ class _AiScribeMobileSuggestionBottomSheetState
Widget build(BuildContext context) {
final localizations = ScribeLocalizations.of(context);
return Container(
height: double.infinity,
decoration: const BoxDecoration(
color: AIScribeColors.background,
),
child: SafeArea(
child: Column(
mainAxisSize: MainAxisSize.min,
crossAxisAlignment: CrossAxisAlignment.stretch,
children: [
Padding(
padding: AIScribeSizes.suggestionHeaderPadding,
child: AiScribeSuggestionHeader(
title: aiAction.getLabel(localizations),
imagePaths: imagePaths,
return PointerInterceptor(
child: Container(
height: double.infinity,
decoration: const BoxDecoration(
color: AIScribeColors.background,
),
child: SafeArea(
child: Column(
mainAxisSize: MainAxisSize.min,
crossAxisAlignment: CrossAxisAlignment.stretch,
children: [
Padding(
padding: AIScribeSizes.suggestionHeaderPadding,
child: AiScribeSuggestionHeader(
title: aiAction.getLabel(localizations),
imagePaths: imagePaths,
),
),
),
Flexible(
child: buildStateContent(context),
),
],
Flexible(
child: buildStateContent(context),
),
],
),
),
),
);