Skip to content

Commit

Permalink
fixup! TF-1418 increase height of signature field in identity_creator…
Browse files Browse the repository at this point in the history
…_view
  • Loading branch information
sherlockvn committed Feb 7, 2023
1 parent 289fd2b commit b0da6b8
Show file tree
Hide file tree
Showing 3 changed files with 56 additions and 50 deletions.
10 changes: 8 additions & 2 deletions lib/features/composer/presentation/composer_view_web.dart
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,10 @@ class ComposerView extends GetWidget<ComposerController>
Expanded(child: Column(
children: [
_buildAttachmentsWidget(context),
ToolbarRichTextWebBuilder(richTextWebController: controller.richTextWebController),
Padding(
padding: const EdgeInsets.only(left: 20, top: 8, bottom: 8),
child: ToolbarRichTextWebBuilder(richTextWebController: controller.richTextWebController),
),
buildInlineLoadingView(controller),
_buildEditorForm(context)
]
Expand Down Expand Up @@ -360,7 +363,10 @@ class ComposerView extends GetWidget<ComposerController>
child: Column(
children: [
_buildAttachmentsWidget(context),
ToolbarRichTextWebBuilder(richTextWebController: controller.richTextWebController),
Padding(
padding: const EdgeInsets.only(left: 20, top: 8, bottom: 8),
child: ToolbarRichTextWebBuilder(richTextWebController: controller.richTextWebController),
),
buildInlineLoadingView(controller),
_buildEditorForm(context)
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,7 @@ class ToolbarRichTextWebBuilder extends StatelessWidget with RichTextButtonMixin
final codeViewEnabled = richTextWebController.codeViewEnabled;
final opacity = codeViewEnabled ? 0.5 : 1.0;

return Container(
padding: const EdgeInsets.only(left: 20, top: 8, bottom: 8),
return Align(
alignment: Alignment.centerLeft,
child: Wrap(
crossAxisAlignment: WrapCrossAlignment.center,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ class IdentityCreatorView extends GetWidget<IdentityCreatorController> {
decoration: const BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.all(Radius.circular(16))),
width: max(_responsiveUtils.getSizeScreenWidth(context) * 0.4, 600),
width: max(_responsiveUtils.getSizeScreenWidth(context) * 0.4, 650),
height: _responsiveUtils.getSizeScreenHeight(context) * 0.75,
child: ClipRRect(
borderRadius: const BorderRadius.all(Radius.circular(16)),
Expand Down Expand Up @@ -251,7 +251,6 @@ class IdentityCreatorView extends GetWidget<IdentityCreatorController> {
border: Border.all(color: AppColor.colorInputBorderCreateMailbox),
color: Colors.white,
),
padding: const EdgeInsets.symmetric(vertical: 16, horizontal: 16),
child: Stack(
children: [
if (controller.signatureType.value == SignatureType.plainText)
Expand Down Expand Up @@ -429,57 +428,59 @@ class IdentityCreatorView extends GetWidget<IdentityCreatorController> {
child: Column(
children: [
if(BuildUtils.isWeb)
ToolbarRichTextWebBuilder(richTextWebController: controller.richTextWebController),
htmlEditor,
Padding(
padding: const EdgeInsets.only(top: 22, bottom: 8.0, left: 24, right: 12),
child: ToolbarRichTextWebBuilder(richTextWebController: controller.richTextWebController),
),
Expanded(
child: Padding(
padding: const EdgeInsets.only(left: 14.0, right: 2.0),
child: htmlEditor,
),
),
],
),
);
}

Widget _buildHtmlEditorWeb(BuildContext context, String initContent) {
log('IdentityCreatorView::_buildHtmlEditorWeb(): initContent: $initContent');
return Expanded(
child: Padding(
padding: EdgeInsets.symmetric(
horizontal: _responsiveUtils.isMobile(context) ? 8 : 10),
child: html_editor_browser.HtmlEditor(
key: const Key('identity_create_editor_web'),
controller: controller.richTextWebController.editorController,
htmlEditorOptions: const HtmlEditorOptions(
hint: '',
darkMode: false,
customBodyCssStyle: bodyCssStyleForEditor),
blockQuotedContent: initContent,
htmlToolbarOptions: const HtmlToolbarOptions(
toolbarType: ToolbarType.hide,
defaultToolbarButtons: []),
otherOptions: const OtherOptions(height: 550),
callbacks: Callbacks(onBeforeCommand: (currentHtml) {
log('IdentityCreatorView::_buildHtmlEditorWeb(): onBeforeCommand : $currentHtml');
controller.updateContentHtmlEditor(currentHtml);
}, onChangeContent: (changed) {
log('IdentityCreatorView::_buildHtmlEditorWeb(): onChangeContent : $changed');
controller.updateContentHtmlEditor(changed);
}, onInit: () {
log('IdentityCreatorView::_buildHtmlEditorWeb(): onInit');
controller.updateContentHtmlEditor(initContent);
controller.richTextWebController.setFullScreenEditor();
controller.richTextWebController.setEnableCodeView();
}, onFocus: () {
log('IdentityCreatorView::_buildHtmlEditorWeb(): onFocus');
FocusManager.instance.primaryFocus?.unfocus();
Future.delayed(const Duration(milliseconds: 500), () {
controller.richTextWebController.editorController.setFocus();
});
controller.richTextWebController.closeAllMenuPopup();
}, onChangeSelection: (settings) {
controller.richTextWebController.onEditorSettingsChange(settings);
}, onChangeCodeview: (contentChanged) {
log('IdentityCreatorView::_buildHtmlEditorWeb(): onChangeCodeView : $contentChanged');
controller.updateContentHtmlEditor(contentChanged);
}),
)
)
return html_editor_browser.HtmlEditor(
key: const Key('identity_create_editor_web'),
controller: controller.richTextWebController.editorController,
htmlEditorOptions: const HtmlEditorOptions(
hint: '',
darkMode: false,
customBodyCssStyle: bodyCssStyleForEditor),
blockQuotedContent: initContent,
htmlToolbarOptions: const HtmlToolbarOptions(
toolbarType: ToolbarType.hide,
defaultToolbarButtons: []),
otherOptions: const OtherOptions(height: 550),
callbacks: Callbacks(onBeforeCommand: (currentHtml) {
log('IdentityCreatorView::_buildHtmlEditorWeb(): onBeforeCommand : $currentHtml');
controller.updateContentHtmlEditor(currentHtml);
}, onChangeContent: (changed) {
log('IdentityCreatorView::_buildHtmlEditorWeb(): onChangeContent : $changed');
controller.updateContentHtmlEditor(changed);
}, onInit: () {
log('IdentityCreatorView::_buildHtmlEditorWeb(): onInit');
controller.updateContentHtmlEditor(initContent);
controller.richTextWebController.setFullScreenEditor();
controller.richTextWebController.setEnableCodeView();
}, onFocus: () {
log('IdentityCreatorView::_buildHtmlEditorWeb(): onFocus');
FocusManager.instance.primaryFocus?.unfocus();
Future.delayed(const Duration(milliseconds: 500), () {
controller.richTextWebController.editorController.setFocus();
});
controller.richTextWebController.closeAllMenuPopup();
}, onChangeSelection: (settings) {
controller.richTextWebController.onEditorSettingsChange(settings);
}, onChangeCodeview: (contentChanged) {
log('IdentityCreatorView::_buildHtmlEditorWeb(): onChangeCodeView : $contentChanged');
controller.updateContentHtmlEditor(contentChanged);
}),
);
}

Expand Down

0 comments on commit b0da6b8

Please sign in to comment.