Commit graph appflowy-editor/test/editor
Author SHA1 Message Date
Lucas
41335c54ae
chore: merge flutter 3_27_4 into main branch (#1228)
* chore: merge flutter/3_27_4 to main branch

* chore: code format

* fix: unit tests
2026-07-27 15:37:27 +08:00
Nathan
829d4edf2e fix: detach shrink-wrapped editor listeners on dispose 2026-07-19 14:25:09 +08:00
Lucas
6fbe7ba442
fix: selection race condition (#1194)
* fix: guard debounced desktop selection update

Avoid dereferencing a cleared selection from the delayed
macOS metrics callback and add a regression test that
covers the stale-timer path.

* chore: clean up analyzer warnings

Remove redundant default arguments in tests and apply the
missing trailing comma required by the current lint rules.
2026-03-31 17:33:40 +08:00
Lucas
99e7e1efa2
fix: long press auto-scroll speed on mobile (#1191)
* fix: long press auto-scroll speed on mobile

When long pressing and dragging on mobile, auto-scroll was too fast
because cursor drag mode used Duration.zero (instant) instead of
animated scrolling, and the proxy rect was a large centered square
triggering in both directions.

- Add AxisDirection.down handling in auto_scroller for directional
  proxy rects extending downward from cursor position
- Add cursor drag mode case in scroll_service_widget with direction
  detection based on cursor movement relative to last selection
- Include cursor mode in isDragOperation for animated scroll duration
- Pass dragMode in Android long press selectionExtraInfo so scroll
  service can detect cursor drag on Android

* fix: correct auto-scroller test for downward scroll rect
2026-03-24 16:01:47 +08:00
Lucas
9bb1ca1fc5
fix: left handle scroll direction on iOS/Android (#1185)
* fix: correct auto-scroll direction for left selection handle drag on iOS

When dragging the left selection handle upward, the proxy rect used for
auto-scroll detection was built with offset & Size(1, edgeOffset), which
extends 220px downward from the selection start. This caused the bottom
of the rect to exceed the viewport bottom, triggering a downward scroll
(showing content below) — the opposite of the intended direction.

Fix by using Rect.fromLTWH(offset.dx, offset.dy - edgeOffset, 1, edgeOffset)
so the proxy rect extends upward, only triggering scroll-up when the
handle approaches the top edge of the viewport.

* chore: update iOS minimum deployment target to 13.0

* test: add auto_scroller proxy rect direction tests

Adds regression tests for the left selection handle auto-scroll bug
where the proxy rect incorrectly extended downward, triggering scroll
in the wrong direction. Verifies the rect extends upward from the
handle offset when direction is AxisDirection.up.

* fix: remove unused import in auto_scroller_test

* chore: code review
2026-03-18 11:45:25 +08:00
Lucas
f882d958d9
feat: integrate awesome_lints and upgrade to Flutter 3.38 (#1173)
* chore: update Flutter SDK to version 3.38.5

Upgrade Flutter from 3.32.4 to 3.38.5 to meet awesome_lints
requirement for Dart SDK 3.10.0+. Update CI workflow to use
the new Flutter version and add custom_lint verification step.

* chore: integrate awesome_lints with custom lint rules

Add awesome_lints and custom_lint dependencies, configure
analysis_options.yaml to enable newline lint rules: newline_before_case,
newline_before_constructor, newline_before_method, and newline_before_return.

* style: apply newline formatting per awesome_lints rules

Add blank lines before case clauses, return statements, method
declarations, and constructors throughout the codebase to comply
with awesome_lints newline rules.

* fix: replace deprecated translate with leftTranslateByDouble

Update Matrix4.translate() calls to use the new leftTranslateByDouble()
API to resolve deprecation warnings in Flutter SDK 3.38.5.

* chore: improve code readability with blank line formatting
2025-12-23 15:12:57 +08:00
Morn
8db5bdff8f
fix: interceptor not working with continuous deleting (#1057) 2025-03-12 13:36:59 +08:00
Lucas
9f6a29968e
fix: enter after emoji will create a softbreak on mobile (#1010)
* fix: enter after emoji will create a softbreak

* test: enter after emoji will create a softbreak
2024-12-31 15:10:41 +08:00
Morn
b52ce3bb91
fix: error format of TextEditingDeltaInsertion (#1004) 2024-12-30 15:27:34 +08:00
Morn
4edd0e00e8
fix: sougou IME issue on Windows (#1000) 2024-12-24 15:47:45 +08:00
Lucas
ca04a675c0
fix: shift+enter should wrap the line in list (#990)
* fix: shift+enter should wrap the line in list

* fix: unit test

* fix: select all command
2024-12-13 19:41:57 +08:00
Lucas
b888202b9b
fix: backquote key will cause crash when using French IME (#892) 2024-09-13 19:23:39 +08:00
Lucas.Xu
72512df842
chore: hide Log and PlatformExtension (#886) 2024-09-11 17:51:53 +08:00
Juliano Penna
6a983808c8
feat: use format of wrapping node when pasting plain text (#692)
* fix: paste plain text follows destination formatting

* test: paste plain text

---------

Co-authored-by: Lucas.Xu <lucas.xu@appflowy.io>
2024-07-04 11:53:43 +08:00
Steve
0d8f755c80
feat: add contentInsertionConfiguration to editor and text input service (#691)
* Add contentInsertionConfiguration to editor and text input service

* add unit tests

* feat(editor): add contentInsertionConfiguration
2024-01-30 09:59:26 +08:00
Juliano Penna
7fe3ff7801
chore: localize more items (#680)
* fix: localize tooltips from toolbar items

* fix: Localize shortcut descriptions

* refactor: reorder able menu entries

* fix: update translation if locale changes

* feat: translate all pt-BR

* docs: explain how to change locales

* ci: fix failing unit test
2024-01-25 23:43:02 +08:00
q200892907
b7c381e495
feat: optimize Enter operation (#673)
* outdentCommand is called when the node path is greater than 1

* feat:add test

* feat:update test
2024-01-15 15:29:51 +08:00
Lucas.Xu
4345105ebe
feat: optimize editing experience on mobile (#592)
* feat: optimize mobile editing

* feat: refactot the mobile toolbar

* feat: don't reattch text input if the selection doesn't change

* chore: update mobile toolbar layout
2023-11-15 16:03:17 +08:00
Mayur Mahajan
4b1a3d5307
fix: check if header exists for footer (#559)
* fix: check if header exists for footer

* test: add tests and refactor if statement

---------

Co-authored-by: Mathias Mogensen <mathiasrieckm@gmail.com>
2023-11-02 14:11:37 +01:00
Lucas.Xu
c9adbb1714 fix: command shortcuts on the web platform should also respect the operating system 2023-09-24 11:15:07 +08:00
Sun Jiao
1944ab7a29
chore: update l10n (#463) 2023-09-15 10:13:49 +02:00
Lucas.Xu
12be12751d
feat: refactor color conversion method to handle RGB and hex formatsRefactor method to handle RGB and hex formats, improving color conversion (#450) 2023-09-12 11:54:05 +08:00
Lucas.Xu
19f999f422
feat: optimize the performance (#442) 2023-09-11 15:03:14 +08:00
APPFLOWY\tsuiy
790d3fda53 feat: improve CJK IME support 2023-08-25 14:56:28 +08:00
Lucas.Xu
378ff75a97 fix: test error 2023-08-17 13:49:51 +08:00
Mathias Mogensen
2dabbebb43 test: improve coverage of link mobile toolbar item 2023-08-17 13:13:45 +08:00
Mathias Mogensen
52486cc6a3 test: improve coverage 2023-08-17 13:13:45 +08:00
Mathias Mogensen
0bad8d67d1 test: improve coverage for editor_style 2023-08-17 13:13:45 +08:00
Mathias Mogensen
027bcdff71 test: improve coverage for auto scroller 2023-08-17 13:13:45 +08:00
Mathias Mogensen
afa06095b0 test: improve coverage for renderer/ 2023-08-17 13:13:45 +08:00
Mathias Mogensen
b79aded8bb test: improve coverage for delta input 2023-08-17 13:13:45 +08:00
Mathias Mogensen
9eb60cc6aa test: improve coverage of editor/block_component/ 2023-08-17 13:13:45 +08:00