Skip to content

Commit

Permalink
feat: remove the reference of the deprecated values (#304)
Browse files Browse the repository at this point in the history
* feat: remove the reference of the deprecated values

* chore: add migration guide
  • Loading branch information
LucasXu0 authored Jul 12, 2023
1 parent f8da435 commit 5f136df
Show file tree
Hide file tree
Showing 40 changed files with 281 additions and 3,459 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,9 @@ Below are some examples of shortcut event customizations:
* [BIUS](https://github.com/AppFlowy-IO/appflowy-editor/tree/main/lib/src/editor/editor_component/service/shortcuts/character_shortcut_events/format_single_character) demonstrates how to make text bold/italic/underline/strikethrough through shortcut keys
* Need more examples? Check out [shortcuts](https://github.com/AppFlowy-IO/appflowy-editor/tree/main/lib/src/editor/editor_component/service/shortcuts)

## Migration Guide
Please refer to the [migration documentation]((https://github.com/AppFlowy-IO/appflowy-editor/blob/main/documentation/migration.md)).

## Glossary
Please refer to the API documentation.

Expand Down
2 changes: 0 additions & 2 deletions analysis_options.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,5 @@ linter:
- use_decorated_box

analyzer:
errors:
deprecated_member_use_from_same_package: ignore
exclude:
- lib/src/l10n/**
9 changes: 9 additions & 0 deletions documentation/migration.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Migration Guide

## From 1.1.0 to 1.2.0

- `AppFlowyEditor.custom` and `AppFlowyEditor.standard` have been removed. Use `AppFlowyEditor.` instead.
- For now, we provide the default values to the `blockComponentBuilders`, `characterShortcutEvents`, and `commandShortcutEvents` if you do not customize them.
- `DefaultSelectable` has been renamed to `DefaultSelectableMixin`
- `FlowyRichText` has been renamed to `AppFlowyRichText`.
- Added new parameter called `context`(BuildContext) into `TextSpanDecoratorForAttribute`.
20 changes: 0 additions & 20 deletions lib/src/commands/attributes_commands.dart

This file was deleted.

82 changes: 0 additions & 82 deletions lib/src/commands/command_extension.dart

This file was deleted.

123 changes: 0 additions & 123 deletions lib/src/commands/text/text_commands.dart

This file was deleted.

7 changes: 4 additions & 3 deletions lib/src/core/document/document.dart
Original file line number Diff line number Diff line change
Expand Up @@ -119,16 +119,17 @@ class Document {
return true;
}

/// Updates the [TextNode] at the given [Path]
/// Updates the [Node] with [Delta] at the given [Path]
bool updateText(Path path, Delta delta) {
if (path.isEmpty) {
return false;
}
final target = nodeAtPath(path);
if (target == null || target is! TextNode) {
final targetDelta = target?.delta;
if (target == null || targetDelta == null) {
return false;
}
target.delta = target.delta.compose(delta);
target.updateAttributes({'delta': (targetDelta.compose(delta)).toJson()});
return true;
}

Expand Down
Loading

0 comments on commit 5f136df

Please sign in to comment.