-
Notifications
You must be signed in to change notification settings - Fork 18
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
[Part 1] Build linux version #1730
base: main
Are you sure you want to change the base?
Conversation
Stuck with SSO login for now. I'm trying to update flutter_web_auth_2 (some alpha versions are available) to see if it resolve something but I did not found any solution in its documentation. Capture.video.du.25-04-2024.10.19.14.webm |
|
8201383
to
4d93694
Compare
This PR has been deployed to https://linagora.github.io/twake-on-matrix/1730 |
shortcuts |
5e783c0
to
b7cec7a
Compare
lib/pages/settings_dashboard/settings_profile/settings_profile.dart
Outdated
Show resolved
Hide resolved
) | ||
.copyWith(letterSpacing: -0.15), | ||
Widget _buildInputBar(BuildContext context) { | ||
return Shortcuts( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does it work on Web platform?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Capture.video.du.14-05-2024.11.40.35.webm
@@ -54,39 +52,33 @@ class ChatInputRowWeb extends StatelessWidget { | |||
Expanded( | |||
child: inputBar, | |||
), | |||
KeyBoardShortcuts( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why remove it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because Shortcuts are now in _buildInputBar
which is a child widget of ChatInputRowWeb
. This allow to use shortcuts whenever the input bar is used. Also this widget did not work. My thought is that it used the wrong focus scope when put inside chat_input_row_web.dart
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here the related lines:
twake-on-matrix/lib/pages/chat/chat_input_row.dart
Lines 74 to 156 in 91419cf
ChatInputRowMobile _buildMobileInputRow(BuildContext context) { | |
return ChatInputRowMobile( | |
inputBar: Column( | |
children: [ | |
ReplyDisplay(controller), | |
_buildInputBar(context), | |
], | |
), | |
emojiPickerNotifier: controller.showEmojiPickerNotifier, | |
onEmojiAction: controller.onEmojiAction, | |
onKeyboardAction: controller.onKeyboardAction, | |
); | |
} | |
ChatInputRowWeb _buildWebInputRow(BuildContext context) { | |
return ChatInputRowWeb( | |
inputBar: Column( | |
children: [ | |
ReplyDisplay(controller), | |
_buildInputBar(context), | |
], | |
), | |
emojiPickerNotifier: controller.showEmojiPickerNotifier, | |
onTapMoreBtn: () => controller.onSendFileClick(context), | |
onEmojiAction: controller.onEmojiAction, | |
onKeyboardAction: controller.onKeyboardAction, | |
); | |
} | |
Widget _buildInputBar(BuildContext context) { | |
return Shortcuts( | |
shortcuts: <LogicalKeySet, Intent>{ | |
LogicalKeySet( | |
LogicalKeyboardKey.controlLeft, | |
LogicalKeyboardKey.keyA, | |
): const SelectAllIntent(), | |
LogicalKeySet( | |
LogicalKeyboardKey.altLeft, | |
LogicalKeyboardKey.keyE, | |
): const OnEmojiActionIntent(), | |
}, | |
child: Actions( | |
actions: <Type, Action<Intent>>{ | |
SelectAllIntent: CallbackAction<SelectAllIntent>( | |
onInvoke: (_) => controller.selectAll(), | |
), | |
OnEmojiActionIntent: CallbackAction<OnEmojiActionIntent>( | |
onInvoke: (_) => controller.onEmojiAction(), | |
), | |
}, | |
child: InputBar( | |
typeAheadKey: controller.chatComposerTypeAheadKey, | |
rawKeyboardFocusNode: controller.rawKeyboardListenerFocusNode, | |
room: controller.room!, | |
minLines: 1, | |
maxLines: 8, | |
autofocus: !PlatformInfos.isMobile, | |
keyboardType: TextInputType.multiline, | |
textInputAction: null, | |
onSubmitted: (_) => controller.onInputBarSubmitted(), | |
suggestionsController: controller.suggestionsController, | |
typeAheadFocusNode: controller.inputFocus, | |
controller: controller.sendController, | |
focusSuggestionController: controller.focusSuggestionController, | |
suggestionScrollController: controller.suggestionScrollController, | |
showEmojiPickerNotifier: controller.showEmojiPickerNotifier, | |
decoration: InputDecoration( | |
hintText: L10n.of(context)!.chatMessage, | |
hintMaxLines: 1, | |
hintStyle: Theme.of(context) | |
.textTheme | |
.bodyLarge | |
?.merge( | |
Theme.of(context).inputDecorationTheme.hintStyle, | |
) | |
.copyWith(letterSpacing: -0.15), | |
), | |
onChanged: controller.onInputBarChanged, | |
), | |
), | |
); | |
} | |
} |
final String initialDirectory = | ||
(await getApplicationDocumentsDirectory()).path; | ||
final List<XFile> xFiles = | ||
await openFiles(initialDirectory: initialDirectory); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IMO: I saw you still using it in another place (lib/pages/settings_dashboard/settings_profile/settings_profile.dart). Can you separate this func so it can be reused?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IMO:
- If
(await getApplicationDocumentsDirectory()).path
orawait openFiles(initialDirectory: initialDirectory)
has error, how to handle error? - Should try catch for this case, WDYT?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IMO: I saw you still using it in another place (lib/pages/settings_dashboard/settings_profile/settings_profile.dart). Can you separate this func so it can be reused?
Actually on lib/pages/settings_dashboard/settings_profile/settings_profile.dart
the method used is openFile
without the s
at the end of the word file. This method force user to open only one file.
But openFiles
used here allow user to select multiple files
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IMO:
- If
(await getApplicationDocumentsDirectory()).path
orawait openFiles(initialDirectory: initialDirectory)
has error, how to handle error?- Should try catch for this case, WDYT?
done
final fileStoreDirectory = await StorageDirectoryManager.instance | ||
.getFileStoreDirectory(isTemporary: isTemporary); | ||
if (isTemporary) { | ||
return '$fileStoreDirectory/$eventId/decrypted-$fileName'; | ||
} | ||
return '$fileStoreDirectory/${AppConfig.applicationName}/decrypted-$fileName'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just make another method
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Still confused
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See #1730 (comment)
Hi @Te-Z ,
|
Hi @hoangdat
Capture.video.du.15-05-2024.15.16.44.webm
Capture.video.du.15-05-2024.15.30.44.webm
Capture.video.du.15-05-2024.15.37.04.webm
Capture.video.du.15-05-2024.15.54.24.webm
Capture.video.du.15-05-2024.15.58.50.webm
Capture.video.du.15-05-2024.15.51.51.webm
|
Ticket: #1699
To do:
Fixed:
Capture.video.du.06-05-2024.15.52.00.webm