Skip to content
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: editor state update node #405

Merged
merged 6 commits into from
Aug 29, 2023

Conversation

zoli
Copy link
Contributor

@zoli zoli commented Aug 22, 2023

Use update node when the purpose is only adding new attribute to
node. format node causes extra unnessesary delete operation.

This should get merged after #404.

zoli added 4 commits August 21, 2023 19:11
Introduced default text direction property on editor style. which
accepts rtl|ltr|auto for controlling default fallback direction.
Before this we had something controlled by Directionality but it
had two problems:
1. It didn't accept auto text direction. We had to introduce our
own Directionality component.
2. Directionality also affects layout direction, for example
setting Directionality to RTL will cause the handlers and other
things move to right side of the screen. While this is good but
there are cases which we don't want to change whole layout direction
but only the text default direction to for example auto.
The code was throwing excenption on changing current node text
direction to auto when the previous node had text direction attribute
with null value.
Also changed to only use direct previous node text direction and
direct parent for inheriting text direction when the current node
text direction is auto and undeterminable (e.g. empty text).
Use update node when the purpose is only adding new attribute to
node. format node causes extra unnessesary delete operation.
@codecov
Copy link

codecov bot commented Aug 22, 2023

Codecov Report

Merging #405 (ff471a8) into main (9105812) will decrease coverage by 0.07%.
The diff coverage is 42.85%.

@@            Coverage Diff             @@
##             main     #405      +/-   ##
==========================================
- Coverage   80.58%   80.51%   -0.07%     
==========================================
  Files         255      255              
  Lines       10448    10465      +17     
==========================================
+ Hits         8419     8426       +7     
- Misses       2029     2039      +10     
Files Changed Coverage Δ
lib/src/editor/command/text_commands.dart 86.88% <0.00%> (-7.76%) ⬇️
...ar/desktop/items/text_direction_toolbar_items.dart 0.00% <0.00%> (ø)
lib/src/render/selection/selectable.dart 50.00% <0.00%> (ø)
...component/base_component/text_direction_mixin.dart 100.00% <100.00%> (ø)

zoli added 2 commits August 28, 2023 16:57
…-state-update-node

* fix/previous-node-text-direction-null:
  feat: default text direction property (AppFlowy-IO#402)
  fix: fixed the cursor not moving to next line after inserting divider (AppFlowy-IO#371)
  chore: update theme colors for editor
  feat: refactor floating toolbar positioning logic
  fix: update resizable image width calculation with minimum width constraint
  chore: comment suggesting use of deprecated method (AppFlowy-IO#417)
  fix: replace matches on the same node (AppFlowy-IO#418)
  fix: rect of the divider block is incorrect (AppFlowy-IO#415)
  chore: bump version 1.2.4 (AppFlowy-IO#414)
  feat: migrate copy paste command from AppFlowy (AppFlowy-IO#413)
  feat: added support for custom parser for markdown to document (AppFlowy-IO#403)
  feat: improve CJK IME support
  feat: add support for context menu items to the editor
  fix: refactor _onSelectionChange method to update _showPlaceholder state more efficiently
  fix: typo (AppFlowy-IO#408)
  Fix selected nodes (AppFlowy-IO#407)
  fix: miss the nested node when copying (AppFlowy-IO#406)
@LucasXu0 LucasXu0 merged commit cda17c7 into AppFlowy-IO:main Aug 29, 2023
@zoli zoli deleted the feat/editor-state-update-node branch August 29, 2023 08:03
q200892907 added a commit to q200892907/appflowy-editor that referenced this pull request Sep 5, 2023
* main:
  feat: simplify auto scroll behavior in ScrollServiceWidget (AppFlowy-IO#437)
  chore: bump version 1.3.0 (AppFlowy-IO#435)
  fix: better column resize performance (AppFlowy-IO#434)
  fix: table padding and selection (AppFlowy-IO#432)
  fix: table block bugs (AppFlowy-IO#431)
  fix: refactor text alignment handling in block components
  Revert "fix: remove flutter overlay (AppFlowy-IO#358)" (AppFlowy-IO#427)
  feat: support alignment for block component (AppFlowy-IO#425)
  fix: remove flutter overlay (AppFlowy-IO#358)
  feat: toggle highlight using ctrl/cmd + shift + h (AppFlowy-IO#333)
  feat: table plugin (AppFlowy-IO#62)
  feat: editor state update node (AppFlowy-IO#405)
  fix: exception on prev node text direction null (AppFlowy-IO#404)
  fix: html encoder not adding multiple text decorations (AppFlowy-IO#424)
  feat: default text direction property (AppFlowy-IO#402)
  fix: fixed the cursor not moving to next line after inserting divider (AppFlowy-IO#371)
  chore: update theme colors for editor
  feat: refactor floating toolbar positioning logic
  fix: update resizable image width calculation with minimum width constraint
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants