-
Notifications
You must be signed in to change notification settings - Fork 198
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
feat: support formatting greater hyphen to single arrow #665
feat: support formatting greater hyphen to single arrow #665
Conversation
The CI fails, can you format the files with the dart formatter? We use 80 character line length, if you have upped it in your local environment you might have to change it back to 80 and then format the files. |
I've formatted the code file using dart SDK formatter. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #665 +/- ##
==========================================
+ Coverage 76.47% 76.49% +0.01%
==========================================
Files 295 295
Lines 13046 13074 +28
==========================================
+ Hits 9977 10001 +24
- Misses 3069 3073 +4 ☔ View full report in Codecov by Sentry. |
@@ -97,6 +97,9 @@ final List<CharacterShortcutEvent> standardCharacterShortcutEvents = [ | |||
|
|||
// convert => to arrow | |||
formatGreaterEqual, | |||
|
|||
// convert -> to single arrow (→) | |||
formatGreaterHyphen, |
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, it should not be added to the standard shortcuts as it is not a commonly used shortcut.
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.
@LucasXu0, I thought it was fine to include formatGreaterHyphen
in the standardCharacterShortcutEvents
list since it already includes formatGreaterEqual
. However, if you suggest not adding formatGreaterHyphen there, an alternative approach would be to include it in the characterShortcutEvents
list within the AppFlowyEditorPage
class located in AppFlowy-IO/AppFlowy repo.
If you're okay with that, then I could close the current pull request and submit a new one in AppFlowy repo.
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.
Including it in the editor is fine, you can remove it from the standard shortcuts, then in AppFlowy we can selectively pick it if need be.
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.
@Xazin, sure I'll commit those changes, btw there's currently no test case for formatting greater equal to double arrow = + > to insert ⇒
. If you'd like, I can also write a test case for that scenario.
7765478
to
060548b
Compare
060548b
to
cafbf89
Compare
* main: feat: support formatting greater hyphen to single arrow (AppFlowy-IO#665) feat: backslash to ignore shortcut event (AppFlowy-IO#635) fix: solve the problem that Chinese ime cannot continue deleting after deleting input content (AppFlowy-IO#672) # Conflicts: # lib/src/editor/editor_component/service/ime/non_delta_input_service.dart
This PR is related to feature request made in AppFlowy-IO/AppFlowy repo
[issue]: [FR] - + > then → #4277
Added a feature that enable users to type - + > to insert → in the editor