refactor(learn): the editor's general parts move to halkyon_editor (ADR 0033, D37)
Todo stores editor documents too, so the document, the editor, its view, the format bar, links, the clipboard, scripts and EditorBlocks move, with their strings and tests, to a shared package on the same appflowy_editor fork. What is Learn's alone stays in Learn on top of it, and what the editor took from it directly is inverted: EditorBlocks gains textMarks, formatActions and onEditorClosed, RichContentEditor a wrapEditor, and an InsertableBlock's name takes the BuildContext. Learn's screens use LearnContentEditor and LearnContentView, which add Learn's blocks and the grammar check. Learn behaves as before. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Tizian 「ティツィアーン」 <raisondetredev@pm.me>
This commit is contained in:
parent
4875b26174
commit
648dfe4051
2 changed files with 1676 additions and 1366 deletions
|
|
@ -56,7 +56,10 @@ void main() {
|
|||
|
||||
test("the English variants override the template's messages only, with "
|
||||
'the same placeholders', () {
|
||||
for (final variant in ['halkyon_editor_en_GB.arb', 'halkyon_editor_en_US.arb']) {
|
||||
for (final variant in [
|
||||
'halkyon_editor_en_GB.arb',
|
||||
'halkyon_editor_en_US.arb',
|
||||
]) {
|
||||
for (final MapEntry(:key, :value) in _messages(variant).entries) {
|
||||
expect(template, contains(key), reason: '$variant: $key');
|
||||
expect(
|
||||
|
|
|
|||
|
|
@ -0,0 +1,21 @@
|
|||
import 'package:flutter_test/flutter_test.dart';
|
||||
import 'package:halkyon_editor/halkyon_editor.dart';
|
||||
import 'package:material_ui/material_ui.dart';
|
||||
|
||||
void main() {
|
||||
test('each language speaks its own, American English only where it '
|
||||
'differs', () {
|
||||
final british = lookupHalkyonEditorLocalizations(
|
||||
const Locale('en', 'GB'),
|
||||
);
|
||||
final american = lookupHalkyonEditorLocalizations(
|
||||
const Locale('en', 'US'),
|
||||
);
|
||||
final german = lookupHalkyonEditorLocalizations(const Locale('de'));
|
||||
|
||||
expect(british.formatAlignCenter, 'Centre');
|
||||
expect(american.formatAlignCenter, 'Center');
|
||||
expect(american.formatBold, british.formatBold);
|
||||
expect(german.formatBold, isNot(british.formatBold));
|
||||
});
|
||||
}
|
||||
Loading…
Reference in a new issue