fix: row property align issue (#5950)

* fix: row property align issue

* fix: generate_freezed.sh path warning

* Revert "fix: generate_freezed.sh path warning"

This reverts commit 7c0a4a3177.

* fix: generate_freezed.sh path warning

* chore: improve chat page mobile UI
This commit is contained in:
Lucas.Xu 2024-08-13 20:01:32 +08:00 committed by GitHub
parent d23977ebb0
commit e2359cf047
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
7 changed files with 37 additions and 18 deletions

View File

@ -48,8 +48,6 @@ PODS:
- fluttertoast (0.0.2): - fluttertoast (0.0.2):
- Flutter - Flutter
- Toast - Toast
- image_gallery_saver (2.0.2):
- Flutter
- image_picker_ios (0.0.1): - image_picker_ios (0.0.1):
- Flutter - Flutter
- integration_test (0.0.1): - integration_test (0.0.1):
@ -95,7 +93,6 @@ DEPENDENCIES:
- flowy_infra_ui (from `.symlinks/plugins/flowy_infra_ui/ios`) - flowy_infra_ui (from `.symlinks/plugins/flowy_infra_ui/ios`)
- Flutter (from `Flutter`) - Flutter (from `Flutter`)
- fluttertoast (from `.symlinks/plugins/fluttertoast/ios`) - fluttertoast (from `.symlinks/plugins/fluttertoast/ios`)
- image_gallery_saver (from `.symlinks/plugins/image_gallery_saver/ios`)
- image_picker_ios (from `.symlinks/plugins/image_picker_ios/ios`) - image_picker_ios (from `.symlinks/plugins/image_picker_ios/ios`)
- integration_test (from `.symlinks/plugins/integration_test/ios`) - integration_test (from `.symlinks/plugins/integration_test/ios`)
- irondash_engine_context (from `.symlinks/plugins/irondash_engine_context/ios`) - irondash_engine_context (from `.symlinks/plugins/irondash_engine_context/ios`)
@ -136,8 +133,6 @@ EXTERNAL SOURCES:
:path: Flutter :path: Flutter
fluttertoast: fluttertoast:
:path: ".symlinks/plugins/fluttertoast/ios" :path: ".symlinks/plugins/fluttertoast/ios"
image_gallery_saver:
:path: ".symlinks/plugins/image_gallery_saver/ios"
image_picker_ios: image_picker_ios:
:path: ".symlinks/plugins/image_picker_ios/ios" :path: ".symlinks/plugins/image_picker_ios/ios"
integration_test: integration_test:
@ -176,7 +171,6 @@ SPEC CHECKSUMS:
flowy_infra_ui: 0455e1fa8c51885aa1437848e361e99419f34ebc flowy_infra_ui: 0455e1fa8c51885aa1437848e361e99419f34ebc
Flutter: e0871f40cf51350855a761d2e70bf5af5b9b5de7 Flutter: e0871f40cf51350855a761d2e70bf5af5b9b5de7
fluttertoast: e9a18c7be5413da53898f660530c56f35edfba9c fluttertoast: e9a18c7be5413da53898f660530c56f35edfba9c
image_gallery_saver: cb43cc43141711190510e92c460eb1655cd343cb
image_picker_ios: 99dfe1854b4fa34d0364e74a78448a0151025425 image_picker_ios: 99dfe1854b4fa34d0364e74a78448a0151025425
integration_test: ce0a3ffa1de96d1a89ca0ac26fca7ea18a749ef4 integration_test: ce0a3ffa1de96d1a89ca0ac26fca7ea18a749ef4
irondash_engine_context: 3458bf979b90d616ffb8ae03a150bafe2e860cc9 irondash_engine_context: 3458bf979b90d616ffb8ae03a150bafe2e860cc9

View File

@ -87,6 +87,7 @@ class _PropertyCellState extends State<_PropertyCell> {
fieldInfo.name, fieldInfo.name,
overflow: TextOverflow.ellipsis, overflow: TextOverflow.ellipsis,
fontSize: 14, fontSize: 14,
figmaLineHeight: 16.0,
color: Theme.of(context).hintColor, color: Theme.of(context).hintColor,
), ),
), ),

View File

@ -12,6 +12,7 @@ import 'package:extended_text_field/extended_text_field.dart';
import 'package:flowy_infra/file_picker/file_picker_service.dart'; import 'package:flowy_infra/file_picker/file_picker_service.dart';
import 'package:flowy_infra/platform_extension.dart'; import 'package:flowy_infra/platform_extension.dart';
import 'package:flowy_infra/theme_extension.dart'; import 'package:flowy_infra/theme_extension.dart';
import 'package:flowy_infra_ui/flowy_infra_ui.dart';
import 'package:flutter/foundation.dart'; import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter/services.dart'; import 'package:flutter/services.dart';
@ -21,8 +22,8 @@ import 'package:flutter_chat_ui/flutter_chat_ui.dart';
import 'chat_at_button.dart'; import 'chat_at_button.dart';
import 'chat_input_attachment.dart'; import 'chat_input_attachment.dart';
import 'chat_send_button.dart';
import 'chat_input_span.dart'; import 'chat_input_span.dart';
import 'chat_send_button.dart';
import 'layout_define.dart'; import 'layout_define.dart';
class ChatInput extends StatefulWidget { class ChatInput extends StatefulWidget {
@ -114,7 +115,7 @@ class _ChatInputState extends State<ChatInput> {
child: Container( child: Container(
decoration: BoxDecoration( decoration: BoxDecoration(
border: Border.all( border: Border.all(
color: _inputFocusNode.hasFocus && !isMobile color: _inputFocusNode.hasFocus
? Theme.of(context).colorScheme.primary.withOpacity(0.6) ? Theme.of(context).colorScheme.primary.withOpacity(0.6)
: Theme.of(context).colorScheme.secondary, : Theme.of(context).colorScheme.secondary,
), ),
@ -161,10 +162,10 @@ class _ChatInputState extends State<ChatInput> {
Expanded(child: _inputTextField(context, textPadding)), Expanded(child: _inputTextField(context, textPadding)),
// mention button // mention button
// TODO(lucas): support mobile
if (PlatformExtension.isDesktop)
_mentionButton(buttonPadding), _mentionButton(buttonPadding),
if (PlatformExtension.isMobile) const HSpace(6.0),
// send button // send button
_sendButton(buttonPadding), _sendButton(buttonPadding),
], ],
@ -245,6 +246,7 @@ class _ChatInputState extends State<ChatInput> {
InputDecoration _buildInputDecoration(BuildContext context) { InputDecoration _buildInputDecoration(BuildContext context) {
return InputDecoration( return InputDecoration(
border: InputBorder.none, border: InputBorder.none,
enabledBorder: InputBorder.none,
hintText: widget.hintText, hintText: widget.hintText,
focusedBorder: InputBorder.none, focusedBorder: InputBorder.none,
hintStyle: TextStyle( hintStyle: TextStyle(

View File

@ -31,6 +31,7 @@ import 'package:appflowy/workspace/presentation/settings/widgets/feature_flags/m
import 'package:appflowy_backend/protobuf/flowy-database2/protobuf.dart'; import 'package:appflowy_backend/protobuf/flowy-database2/protobuf.dart';
import 'package:appflowy_editor/appflowy_editor.dart'; import 'package:appflowy_editor/appflowy_editor.dart';
import 'package:flowy_infra/time/duration.dart'; import 'package:flowy_infra/time/duration.dart';
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:go_router/go_router.dart'; import 'package:go_router/go_router.dart';
import 'package:sheet/route.dart'; import 'package:sheet/route.dart';
@ -558,10 +559,25 @@ GoRoute _mobileCardDetailScreenRoute() {
parentNavigatorKey: AppGlobals.rootNavKey, parentNavigatorKey: AppGlobals.rootNavKey,
path: MobileRowDetailPage.routeName, path: MobileRowDetailPage.routeName,
pageBuilder: (context, state) { pageBuilder: (context, state) {
final args = state.extra as Map<String, dynamic>; var extra = state.extra as Map<String, dynamic>?;
if (kDebugMode && extra == null) {
extra = _dynamicValues;
}
if (extra == null) {
return const MaterialExtendedPage(
child: SizedBox.shrink(),
);
}
final databaseController = final databaseController =
args[MobileRowDetailPage.argDatabaseController]; extra[MobileRowDetailPage.argDatabaseController];
final rowId = args[MobileRowDetailPage.argRowId]!; final rowId = extra[MobileRowDetailPage.argRowId]!;
if (kDebugMode) {
_dynamicValues = extra;
}
return MaterialExtendedPage( return MaterialExtendedPage(
child: MobileRowDetailPage( child: MobileRowDetailPage(
@ -629,3 +645,8 @@ Widget _buildFadeTransition(
Duration _slowDuration = Duration( Duration _slowDuration = Duration(
milliseconds: RouteDurations.slow.inMilliseconds.round(), milliseconds: RouteDurations.slow.inMilliseconds.round(),
); );
// ONLY USE IN DEBUG MODE
// this is a workaround for the issue of GoRouter not supporting extra with complex types
// https://github.com/flutter/flutter/issues/137248
Map<String, dynamic> _dynamicValues = {};

View File

@ -890,10 +890,10 @@ packages:
dependency: "direct main" dependency: "direct main"
description: description:
name: go_router name: go_router
sha256: "170c46e237d6eb0e6e9f0e8b3f56101e14fb64f787016e42edd74c39cf8b176a" sha256: ddc16d34b0d74cb313986918c0f0885a7ba2fc24d8fb8419de75f0015144ccfe
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "13.2.0" version: "14.2.3"
google_fonts: google_fonts:
dependency: "direct main" dependency: "direct main"
description: description:

View File

@ -99,7 +99,7 @@ dependencies:
url_protocol: url_protocol:
hive_flutter: ^1.1.0 hive_flutter: ^1.1.0
super_clipboard: ^0.8.4 super_clipboard: ^0.8.4
go_router: ^13.1.0 go_router: ^14.2.0
string_validator: ^1.0.0 string_validator: ^1.0.0
unsplash_client: ^2.1.1 unsplash_client: ^2.1.1
flutter_emoji_mart: flutter_emoji_mart:

View File

@ -71,10 +71,11 @@ if [ "$exclude_packages" = false ]; then
# Navigate back to the packages directory # Navigate back to the packages directory
cd .. cd ..
done done
cd ..
fi fi
# Navigate to the appflowy_flutter directory and generate files # Navigate to the appflowy_flutter directory and generate files
cd ..
echo "🧊 Start generating freezed files (AppFlowy)." echo "🧊 Start generating freezed files (AppFlowy)."
if [ "$skip_pub_packages_get" = false ]; then if [ "$skip_pub_packages_get" = false ]; then