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

Make spellchecker work for multi line quotes #4518

Merged
Changes from 1 commit
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
8592cc3
drop intermediate exports
tomaskikutis May 2, 2024
a89a7e7
v1
tomaskikutis May 7, 2024
1624796
move code to reload spellchecker warnings after action is performed
tomaskikutis May 7, 2024
87157f7
move spellcheck call componentDidUpdate
tomaskikutis May 7, 2024
c5d755f
enable accepting spellchecker suggestions inside table cell
tomaskikutis May 8, 2024
6e2620e
improve interface of getDecorators
tomaskikutis May 8, 2024
7f224c8
disable spellchecking for tables
tomaskikutis May 8, 2024
39b0ad4
when spellchecking action is performed - update UI without delay
tomaskikutis May 8, 2024
6ad6a66
drop spellchecker initialization in authoring-react
tomaskikutis May 8, 2024
b8ecc43
remove unused import
tomaskikutis May 8, 2024
1ba6944
fix unit tests
tomaskikutis May 9, 2024
1c3e597
replace removed unit tests with e2e tests
tomaskikutis May 9, 2024
1896dd4
fix component getting stuck in permanent loading state
tomaskikutis May 10, 2024
7055860
fix unit test
tomaskikutis May 12, 2024
b0d91ab
port broken e2e tests to playwright
tomaskikutis May 14, 2024
dbb6d20
fix record name
tomaskikutis May 14, 2024
65019be
fix lint
tomaskikutis May 14, 2024
1016a06
fix unit test
tomaskikutis May 14, 2024
f5ee8bd
make e2e test more stable
tomaskikutis May 14, 2024
e89226f
Merge branch 'develop' into make-spellchecker-work-for-multi-line-quotes
tomaskikutis May 14, 2024
8a6a715
make e2e tests more stable
tomaskikutis May 14, 2024
6706c6c
see if 100ms delay is enough
tomaskikutis May 14, 2024
5cc938e
Revert "see if 100ms delay is enough"
tomaskikutis May 14, 2024
23b5634
Merge branch 'develop' into make-spellchecker-work-for-multi-line-quotes
tomaskikutis May 15, 2024
cd80fc4
try lowering the delay again
tomaskikutis May 15, 2024
2f12177
fix unit test
tomaskikutis May 15, 2024
9167c28
fix unit test
tomaskikutis May 15, 2024
34d07a1
disable preference tests
tomaskikutis May 15, 2024
e42d312
use spec reported to be able to see which test throws
tomaskikutis May 15, 2024
dbd0987
Revert "disable preference tests"
tomaskikutis May 15, 2024
3434459
fix unit tests v10
tomaskikutis May 15, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
move spellcheck call componentDidUpdate
  • Loading branch information
tomaskikutis committed May 7, 2024
commit 87157f796ce6c836d5eb30a39a62f457b3fbdf01
16 changes: 6 additions & 10 deletions scripts/core/editor3/components/tables/TableCell.tsx
Original file line number Diff line number Diff line change
@@ -184,12 +184,6 @@ export class TableCell extends React.Component<IProps, IState> {
if (selection.getHasFocus()) {
this.props.onChange(editorState);
}

const contentChanged = editorState.getCurrentContent() !== this.state.editorState.getCurrentContent();

if (contentChanged) {
this.spellcheck();
}
},
);
}
@@ -266,11 +260,13 @@ export class TableCell extends React.Component<IProps, IState> {
}
}

componentDidUpdate(prevProps: Readonly<IProps>): void {
if (
componentDidUpdate(prevProps: IProps, prevState: IState): void {
const contentChanged = this.state.editorState.getCurrentContent() !== prevState.editorState.getCurrentContent();
const spellcheckerConfigChanged =
this.props.spellchecking.enabled !== prevProps.spellchecking.enabled
|| this.props.spellchecking.language !== prevProps.spellchecking.language
) {
|| this.props.spellchecking.language !== prevProps.spellchecking.language;

if (contentChanged || spellcheckerConfigChanged) {
this.spellcheck();
}
}