Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate v0.11.3-patch4-dev to master branch #2911

Merged
merged 80 commits into from
Jun 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
80 commits
Select commit Hold shift + click to select a range
dc855a2
TF-2644 Display warning dialog when pick file exceeded maximum size i…
dab246 Feb 29, 2024
b5442a1
TF-2644 Display warning dialog when drag & drop file exceeded maximum…
dab246 Feb 29, 2024
e126b98
TF-2644 Display warning dialog when share file exceeded maximum size …
dab246 Feb 29, 2024
ed8b47e
TF-2644 Display warning dialog when drag from other email exceeded ma…
dab246 Feb 29, 2024
9d003ec
TF-2644 Display tooltip message when attachments exceeded maximum siz…
dab246 Feb 29, 2024
2f7dd89
TF-2644 Handle total size exceeded maximum size when drag & drop mult…
dab246 Mar 1, 2024
be35b16
TF-2644 Remove wrong text in intl_vi.arb
hoangdat Mar 19, 2024
568309b
TF-2667 Use `Username` replace `UserProfile`
dab246 Mar 5, 2024
1902231
TF-2667 Create ApplicationVersionWidget to display app version
dab246 Mar 6, 2024
873272e
TF-2667 Move the creation of mailbox request id to the data layer
dab246 Mar 5, 2024
8dbcbf5
TF-2667 Show sending message dialog when click send button
dab246 Mar 5, 2024
ff677ea
TF-2667 Replace `isSendEmailLoading` to `ButtonState`
dab246 Mar 5, 2024
bda34ec
TF-2667 Show confirm dialog when send email failed
dab246 Mar 5, 2024
3b3d300
TF-2667 Show confirm dialog when click close composer
dab246 Mar 5, 2024
8351b26
TF-2667 Show saving message dialog when preform save action
dab246 Mar 5, 2024
67954f0
TF-2667 Refresh thread & mailbox view when saving message success
dab246 Mar 5, 2024
ddb924e
TF-2667 Handle save message to cache when reload page
dab246 Mar 5, 2024
3a9d5ba
TF-2667 Add cancel button in progress send message dialog
dab246 Mar 12, 2024
21f3fcf
TF-2667 Add cancel button in progress saving message to drafts dialog
dab246 Mar 12, 2024
2a26967
TF-2667 Validate email in recipient form before send email
dab246 Mar 18, 2024
92edb7a
TF-2667 Remove log unnecessary
dab246 Mar 18, 2024
b4a29fe
TF-2667 Clean `WARNING/INFO` when run dart analyze
dab246 Mar 19, 2024
299883c
TF-2667 Write unit test for `Domain` & `MailAddress` class
dab246 Mar 21, 2024
0fa8a98
TF-2667 Fix crash when click on From me in search filter
dab246 Mar 21, 2024
6d890bb
TF-2667 Remove composer cache after close composer view
dab246 Mar 21, 2024
9d10ffb
TF-2667 Handle error better when perform save as drafts
dab246 Mar 21, 2024
1d9fcc3
TF-2667 Fix width size inline image in email view after send email
dab246 Mar 21, 2024
8f19d48
TF-2667 Remove function not used
dab246 Mar 21, 2024
fe79469
TF-2667 Prevent close sending/saving dialog when click system back on…
dab246 Mar 22, 2024
0b77f74
TF-2667 Store email to sending queue when sending with no connection …
dab246 Mar 22, 2024
30038fe
TF-2684 Add long press action for TMailButtonWidget
dab246 Mar 12, 2024
f246465
TF-2684 Use scrollbar theme replace customize scrollbar
dab246 Mar 12, 2024
38ca8cf
TF-2684 Enable selectable in blue bar
dab246 Mar 12, 2024
ec83287
TF-2684 Add button `Mail to attendees` to open composer with `to: all…
dab246 Mar 12, 2024
efb70f8
TF-2684 Fix difficult to select text in blue bar on responsive tablet
dab246 Mar 26, 2024
ae72369
TF-2717 Replace `from cc bcc` buttons in `to` by `arrow down` button …
dab246 Mar 18, 2024
67b4738
TF-2717 Allow show full signature in composer on mobile
dab246 Mar 19, 2024
9d89b4a
TF-2717 Display attachment bar below subject field on mobile
dab246 Mar 19, 2024
3101b89
TF-2717 Display attachment bar below subject field on landscape mobile
dab246 Mar 25, 2024
aed02ce
TF-2717 Display attachment bar below subject field on tablet
dab246 Mar 19, 2024
661502d
TF-2717 Write widgets test for RecipientComposerWidget
dab246 Mar 25, 2024
31e5934
TF-2717 Write widgets test for case email address too long in recipie…
dab246 Mar 25, 2024
9ef4de2
TF-2717 Write widget test for multiple recipients when focus and unfocus
dab246 Mar 26, 2024
2246986
TF-2717 Write widget test for text overflow of label tag
dab246 Mar 26, 2024
c2c3314
TF-2717 Write widget test for change language
dab246 Mar 26, 2024
b9c4492
TF-2717 Use `cnb_supported` branch for rich_text_composer dependency
dab246 Apr 1, 2024
df72101
TF-2717 Get identity when open app, if not get identity, get whenever…
dab246 Apr 1, 2024
62bf78e
TF-2717 Get identity again when back to dashboard from settings
dab246 Apr 1, 2024
1d33b31
TF-2717 Disable delete in keyboard shortcut on mobile
dab246 Apr 1, 2024
772db69
TF-2717 Auto hide text input recipient when unfocus
dab246 Apr 3, 2024
0f853fb
TF-2717 Use `defaultTargetPlatform` to easily write tests for widget
dab246 Apr 3, 2024
fe78890
TF-2717 Write widget test for case recipient has expanded button
dab246 Apr 3, 2024
3242418
TF-2717 Show text input field when click tag recipient item
dab246 Apr 3, 2024
b34411c
Update `html_editor_enhanced` dependency
dab246 Apr 16, 2024
59dc51f
Set default button padding in confirm dialog
dab246 Apr 19, 2024
d08f41c
Disable outside dismissible confirm dialog in composer
dab246 Apr 19, 2024
a79d96a
TF-2671 Fix scroll jumping when typing on composer
tddang-linagora Mar 26, 2024
c24a21a
TF-2215 Remove LocaleInterceptor
dab246 Jan 15, 2024
acc8201
TF-2215 Add `Accept-Language` and `Content-Language` when sent email
dab246 Jan 15, 2024
da3bf99
Fix identity fetching again when open composer
dab246 Apr 23, 2024
a59470e
Release the variable on memory when the controller is closed
dab246 Apr 23, 2024
dfbd71a
Nettoyer -> Vider
chibenwa Apr 26, 2024
fa40a82
TF-2122 Fix highlight and font search result incorrect
dab246 Apr 12, 2024
92d0f30
Only create and use the correct rich text controller for each platform
dab246 Apr 23, 2024
914d903
Fix overflow height delete identity dialog on mobile
dab246 Apr 23, 2024
5df55a0
Avoid fetching again identity lists in SingleEmailController
dab246 Apr 23, 2024
a8f566d
Fix part of the content is lost when replying or forwarding emails
dab246 Apr 24, 2024
56ab1f2
Fix tThe editor background appears gray when the waning dialog appears
dab246 Apr 24, 2024
44a1ddd
Remove functions that are not called on some platforms
dab246 Apr 24, 2024
86952a4
Fix composer controller not deleted from GetX when click `Discard Cha…
dab246 Apr 24, 2024
4ea80ee
Remove duplicated KeyboardVisibilityBuilder
dab246 Apr 24, 2024
edc5c72
Use `MediaQuery.sizeOf` to avoid rebuilding multiple times widget
dab246 Apr 24, 2024
2c509ee
Remove import unnecessary
dab246 Apr 25, 2024
24d643d
Fix difficulty scrolling email content on Android
dab246 Apr 26, 2024
cd799b9
Avoid close composer when cancel sending or saving draft
dab246 Apr 26, 2024
6e3ab42
Fix can not show saving dialog anymore when click on back system button
dab246 May 1, 2024
1b5e979
Fix mail is stuck in loading in composer.
dab246 May 21, 2024
d7a62b3
Fix size `Discard Changes` button in dialog composer
dab246 May 24, 2024
82235fe
Update `rich-text-composer` dependency
dab246 May 28, 2024
f873aa6
Migrate `v0.11.3-patch4-dev` to `master` branch
dab246 Jun 5, 2024
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
28 changes: 26 additions & 2 deletions contact/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -304,6 +304,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "1.1.0"
fk_user_agent:
dependency: transitive
description:
name: fk_user_agent
sha256: fd6c94e120786985a292d12f61422a581f4e851148d5940af38b819357b8ad0d
url: "https://pub.dev"
source: hosted
version: "2.1.0"
flex_color_picker:
dependency: transitive
description:
Expand Down Expand Up @@ -563,8 +571,8 @@ packages:
dependency: "direct main"
description:
path: "."
ref: master
resolved-ref: "21d15bc1a6a75e048ee1e3cd751dd0815492ce20"
ref: migrate_cnb_to_master_5Jun
resolved-ref: "49305a382ca77211a0668fd9fe196a3c057cdc8e"
url: "https://github.com/linagora/jmap-dart-client.git"
source: git
version: "0.0.1"
Expand Down Expand Up @@ -671,6 +679,22 @@ packages:
url: "https://pub.dev"
source: hosted
version: "2.1.0"
package_info_plus:
dependency: transitive
description:
name: package_info_plus
sha256: "7e76fad405b3e4016cd39d08f455a4eb5199723cf594cd1b8916d47140d93017"
url: "https://pub.dev"
source: hosted
version: "4.2.0"
package_info_plus_platform_interface:
dependency: transitive
description:
name: package_info_plus_platform_interface
sha256: "9bc8ba46813a4cc42c66ab781470711781940780fd8beddd0c3da62506d3a6c6"
url: "https://pub.dev"
source: hosted
version: "2.0.1"
path:
dependency: transitive
description:
Expand Down
4 changes: 3 additions & 1 deletion contact/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,12 @@ dependencies:
path: ../model

### Dependencies from git ###
# TODO: We will change it when the PR in upstream repository will be merged
# https://github.com/linagora/jmap-dart-client/pull/87
jmap_dart_client:
git:
url: https://github.com/linagora/jmap-dart-client.git
ref: master
ref: migrate_cnb_to_master_5Jun

### Dependencies from pub.dev ###
equatable: 2.0.5
Expand Down
3 changes: 3 additions & 0 deletions core/lib/core.dart
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,9 @@ export 'utils/file_utils.dart';
export 'utils/option_param_mixin.dart';
export 'utils/print_utils.dart';
export 'utils/broadcast_channel/broadcast_channel.dart';
export 'utils/list_utils.dart';
export 'utils/mail/domain.dart';
export 'utils/mail/mail_address.dart';

// Views
export 'presentation/views/text/slogan_builder.dart';
Expand Down
1 change: 1 addition & 0 deletions core/lib/data/constants/constant.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ class Constant {
static const acceptHeaderDefault = 'application/json';
static const contentTypeHeaderDefault = 'application/json';
static const pdfMimeType = 'application/pdf';
static const base64Charset = 'base64';
static const textHtmlMimeType = 'text/html';
static const octetStreamMimeType = 'application/octet-stream';
static const pdfExtension = '.pdf';
Expand Down
14 changes: 10 additions & 4 deletions core/lib/data/network/download/download_client.dart
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,8 @@ class DownloadClient {
'bytesData': bytesData,
'mimeType': 'image/$fileExtension',
'cid': cid,
'fileName': fileName
'fileName': fileName,
'maxWidth': maxWidth
});

return base64Uri;
Expand All @@ -77,7 +78,8 @@ class DownloadClient {
'bytesData': bytesDataCompressed,
'mimeType': 'image/$fileExtension',
'cid': cid,
'fileName': fileName
'fileName': fileName,
'maxWidth': maxWidth
});

return base64Uri;
Expand All @@ -86,7 +88,8 @@ class DownloadClient {
'bytesData': bytesData,
'mimeType': 'image/$fileExtension',
'cid': cid,
'fileName': fileName
'fileName': fileName,
'maxWidth': maxWidth
});

return base64Uri;
Expand All @@ -103,11 +106,14 @@ class DownloadClient {
var mimeType = entryParam['mimeType'];
final cid = entryParam['cid'];
var fileName = entryParam['fileName'];
var maxWidth = entryParam['maxWidth'] != null
? '${entryParam['maxWidth']}px'
: '100%';
final base64Data = base64Encode(bytesData);
if (fileName.contains('.')) {
fileName = fileName.split('.').first;
}
final base64Uri = '<img src="${HtmlUtils.convertBase64ToImageResourceData(base64Data: base64Data, mimeType: mimeType)}" alt="$fileName" id="cid:$cid" style="max-width: 100%;" />';
final base64Uri = '<img src="${HtmlUtils.convertBase64ToImageResourceData(base64Data: base64Data, mimeType: mimeType)}" alt="$fileName" id="cid:$cid" style="max-width: $maxWidth;" />';
return base64Uri;
}
}
13 changes: 13 additions & 0 deletions core/lib/domain/exceptions/address_exception.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import 'package:equatable/equatable.dart';

class AddressException with EquatableMixin implements Exception {
final String message;

AddressException(this.message);

@override
String toString() => message;

@override
List<Object> get props => [message];
}
3 changes: 2 additions & 1 deletion core/lib/presentation/action/action_callback_define.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@
import 'package:flutter/material.dart';

typedef OnTapActionCallback = void Function();
typedef OnTapActionAtPositionCallback = void Function(RelativeRect position);
typedef OnTapActionAtPositionCallback = void Function(RelativeRect position);
typedef OnLongPressActionCallback = void Function();
1 change: 0 additions & 1 deletion core/lib/presentation/extensions/color_extension.dart
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,6 @@ extension AppColor on Color {
static const colorBackgroundQuotasWarning = Color(0xFFFFC107);
static const colorQuotaWarning = Color(0xFFF05C44);
static const colorQuotaError = Color(0xffE64646);
static const colorThumbScrollBar = Color(0xFFAEB7C2);
static const colorCreateNewIdentityButton = Color(0xFFEBEDF0);
static const colorSpamReportBannerBackground = Color(0xFFBFDEFF);
static const colorSpamReportBannerStrokeBorder = Color(0x1F000000);
Expand Down
8 changes: 0 additions & 8 deletions core/lib/presentation/extensions/string_extension.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import 'package:core/utils/app_logger.dart';
import 'package:flutter/material.dart';

extension StringExtension on String {

Expand Down Expand Up @@ -39,11 +38,4 @@ extension StringExtension on String {
return '';
}
}

String get overflow {
return characters
.replaceAll(Characters(''), Characters('\u{200B}'))
.replaceAll(Characters('-'), Characters('\u{2011}'))
.toString();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ class TransformConfiguration {
if (PlatformInfo.isWeb)
const RemoveTooltipLinkTransformer(),
const SignatureTransformer(),
const RemoveLazyLoadingForBackgroundImageTransformer(),
const RemoveCollapsedSignatureButtonTransformer(),
]);

Expand Down
20 changes: 10 additions & 10 deletions core/lib/presentation/utils/responsive_utils.dart
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,15 @@ class ResponsiveUtils {
static const double desktopVerticalMargin = 120.0;
static const double desktopHorizontalMargin = 200.0;

bool isScreenWithShortestSide(BuildContext context) => context.mediaQueryShortestSide < minTabletWidth;
bool isScreenWithShortestSide(BuildContext context) => getSizeScreenShortestSide(context) < minTabletWidth;

double getSizeScreenWidth(BuildContext context) => context.width;
double getSizeScreenWidth(BuildContext context) => MediaQuery.sizeOf(context).width;

double getSizeScreenHeight(BuildContext context) => context.height;
double getSizeScreenHeight(BuildContext context) => MediaQuery.sizeOf(context).height;

double getSizeScreenShortestSide(BuildContext context) => context.mediaQueryShortestSide;
double getSizeScreenShortestSide(BuildContext context) => MediaQuery.sizeOf(context).shortestSide;

double getDeviceWidth(BuildContext context) => context.width;
double getDeviceWidth(BuildContext context) => MediaQuery.sizeOf(context).width;

bool isMobile(BuildContext context) => getDeviceWidth(context) < minTabletWidth;

Expand All @@ -46,21 +46,21 @@ class ResponsiveUtils {
bool isLandscapeMobile(BuildContext context) => isScreenWithShortestSide(context) && isLandscape(context);

bool isLandscapeTablet(BuildContext context) {
return context.mediaQueryShortestSide >= minTabletWidth &&
context.mediaQueryShortestSide < minDesktopWidth &&
return getSizeScreenShortestSide(context) >= minTabletWidth &&
getSizeScreenShortestSide(context) < minDesktopWidth &&
isLandscape(context);
}

bool isPortraitMobile(BuildContext context) => isScreenWithShortestSide(context) && isPortrait(context);

bool isPortraitTablet(BuildContext context) {
return context.mediaQueryShortestSide >= minTabletWidth &&
context.mediaQueryShortestSide < minDesktopWidth &&
return getSizeScreenShortestSide(context) >= minTabletWidth &&
getSizeScreenShortestSide(context) < minDesktopWidth &&
isPortrait(context);
}

bool isHeightShortest(BuildContext context) {
return MediaQuery.of(context).size.shortestSide < heightShortest;
return getSizeScreenShortestSide(context) < heightShortest;
}

double getMaxWidthToast(BuildContext context) {
Expand Down
6 changes: 3 additions & 3 deletions core/lib/presentation/utils/theme_utils.dart
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ class ThemeUtils {
dividerTheme: _dividerTheme,
visualDensity: VisualDensity.adaptivePlatformDensity,
scrollbarTheme: ScrollbarThemeData(
thickness: MaterialStateProperty.all(2.0),
radius: const Radius.circular(5.0),
thumbColor: MaterialStateProperty.all(AppColor.colorThumbScrollBar)),
thickness: MaterialStateProperty.all(8.0),
radius: const Radius.circular(8.0),
thumbColor: MaterialStateProperty.all(AppColor.thumbScrollbarColor)),
);
}

Expand Down
7 changes: 7 additions & 0 deletions core/lib/presentation/views/button/tmail_button_widget.dart
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ class TMailButtonWidget extends StatelessWidget {

final OnTapActionCallback? onTapActionCallback;
final OnTapActionAtPositionCallback? onTapActionAtPositionCallback;
final OnLongPressActionCallback? onLongPressActionCallback;

final double borderRadius;
final double? width;
Expand Down Expand Up @@ -44,6 +45,7 @@ class TMailButtonWidget extends StatelessWidget {
required this.text,
this.onTapActionCallback,
this.onTapActionAtPositionCallback,
this.onLongPressActionCallback,
this.borderRadius = 20,
this.width,
this.maxWidth = double.infinity,
Expand Down Expand Up @@ -77,6 +79,7 @@ class TMailButtonWidget extends StatelessWidget {
final Key? key,
OnTapActionCallback? onTapActionCallback,
OnTapActionAtPositionCallback? onTapActionAtPositionCallback,
OnLongPressActionCallback? onLongPressActionCallback,
double borderRadius = 20,
double? width,
double maxWidth = double.infinity,
Expand All @@ -99,6 +102,7 @@ class TMailButtonWidget extends StatelessWidget {
text: '',
onTapActionCallback: onTapActionCallback,
onTapActionAtPositionCallback: onTapActionAtPositionCallback,
onLongPressActionCallback: onLongPressActionCallback,
borderRadius: borderRadius,
width: width,
maxWidth : maxWidth,
Expand All @@ -124,6 +128,7 @@ class TMailButtonWidget extends StatelessWidget {
final Key? key,
OnTapActionCallback? onTapActionCallback,
OnTapActionAtPositionCallback? onTapActionAtPositionCallback,
OnLongPressActionCallback? onLongPressActionCallback,
double borderRadius = 20,
double? width,
double maxWidth = double.infinity,
Expand All @@ -145,6 +150,7 @@ class TMailButtonWidget extends StatelessWidget {
text: text,
onTapActionCallback: onTapActionCallback,
onTapActionAtPositionCallback: onTapActionAtPositionCallback,
onLongPressActionCallback: onLongPressActionCallback,
borderRadius: borderRadius,
width: width,
maxWidth : maxWidth,
Expand Down Expand Up @@ -335,6 +341,7 @@ class TMailButtonWidget extends StatelessWidget {
return TMailContainerWidget(
onTapActionCallback: onTapActionCallback,
onTapActionAtPositionCallback: onTapActionAtPositionCallback,
onLongPressActionCallback: onLongPressActionCallback,
borderRadius: borderRadius,
width: width,
maxWidth: maxWidth,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ class TMailContainerWidget extends StatelessWidget {

final OnTapActionCallback? onTapActionCallback;
final OnTapActionAtPositionCallback? onTapActionAtPositionCallback;
final OnLongPressActionCallback? onLongPressActionCallback;

final Widget child;
final double borderRadius;
Expand All @@ -26,6 +27,7 @@ class TMailContainerWidget extends StatelessWidget {
required this.child,
this.onTapActionCallback,
this.onTapActionAtPositionCallback,
this.onLongPressActionCallback,
this.borderRadius = 20,
this.width,
this.maxWidth = double.infinity,
Expand Down Expand Up @@ -58,6 +60,7 @@ class TMailContainerWidget extends StatelessWidget {
onTapActionAtPositionCallback!.call(position);
}
},
onLongPress: onLongPressActionCallback,
borderRadius: BorderRadius.all(Radius.circular(borderRadius)),
child: tooltipMessage != null
? Tooltip(
Expand Down
Loading
Loading