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
Shortcut exit link 2393 #124
Shortcut exit link 2393 #124
Conversation
Support the mobile platforms (iOS and Android) and make the editor more extensible.
onKey: (key) { | ||
if (key is! RawKeyDownEvent) return; | ||
if (key.logicalKey == LogicalKeyboardKey.escape) { | ||
widget.onDismiss(); | ||
} | ||
}, |
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.
Sort child
last (below this)
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.
done
@@ -21,6 +21,7 @@ void main() async { | |||
onSubmitted: (text) { | |||
submittedText = text; | |||
}, | |||
onDismiss: () {} |
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.
Can you add a test case for this?
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.
done
onDismiss: () { | ||
_dismissOverlay(); | ||
}, |
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.
onDismiss: () { | |
_dismissOverlay(); | |
}, | |
onDismiss: _dismissOverlay, |
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.
done
return RawKeyboardListener( | ||
focusNode: FocusNode(), | ||
onKey: (key) { | ||
if (key is! RawKeyDownEvent) return; |
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.
if (key is! RawKeyDownEvent) return; | |
if (key is! RawKeyDownEvent) { | |
return; | |
} |
IIRC, Effective Dart says to use curly braces.
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.
done
controller: _textEditingController, | ||
onSubmitted: widget.onSubmitted, | ||
decoration: InputDecoration( | ||
hintText: 'URL', |
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.
Please use a translatable string for this hint text.
See locale_keys.g.dart
... you can add a key, value pair of your choice to en.json
and run a task (control+shift+p, then type task: generate...) to generate the LocaleKeys
, then you can use it here like so:
hintText: LocaleKeys.url_label.tr();
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.
Currently, within appflowy-editor, I don't understand how the language management works, and there is a lack of documentation. It's okay to add it to the main project, but I don't understand how to pass it to appflowy-editor.
Can we do it in a separate pull request so that we can manage all the labels?
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.
Let's add internationalization before this pull request lands. You can DM me on discord (a-wallen#0603) if you need help. I'm happy to hop on a call to show you how this is done.
cc @LucasXu0, we might want to add better documentation for internationalization per this comment.
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.
Sure. The translation for the editor is different from the main project. Here's the guide link: https://github.com/AppFlowy-IO/appflowy-editor/blob/main/documentation/translation.md
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.
Thanks @LucasXu0 , done!
), | ||
border: const OutlineInputBorder( | ||
borderRadius: BorderRadius.all(Radius.circular(12.0)), | ||
borderSide: BorderSide(color: Color(0xFFBDBDBD)), |
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.
Please reference a grey color from the app theme. See color_scheme.dart
. The shaders from color_scheme
should be approximate.
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.
done :)
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.
Good work so far. Please address my comments at your convenience :)
Hey, @vincenzoursano. Thanks for contributing. Would you mind changing the merge branch to the |
ffba9da
to
18339b8
Compare
Hi @LucasXu0, I changed the merge branch. Do we need to do anything else? |
Status? |
LGTM @annieappflowy, but cc @LucasXu0 because there are no CI workflows running tests. |
6daa812
to
ce9ac43
Compare
Sorry, I fixed the commit message that was blocking the CI. |
e27b829
to
ce9ac43
Compare
Codecov Report
@@ Coverage Diff @@
## main #124 +/- ##
==========================================
+ Coverage 62.61% 62.64% +0.03%
==========================================
Files 246 246
Lines 10857 10869 +12
==========================================
+ Hits 6798 6809 +11
- Misses 4059 4060 +1
|
AppFlowy-IO/AppFlowy#2393
@annieappflowy