Skip to content

Conversation

@AntoLC
Copy link
Collaborator

@AntoLC AntoLC commented Dec 6, 2024

Purpose

The PR #472 is quite big, we split what we can to make the review as easy as possible.

Proposal

  • 🔊(changelog) add missing logs
  • 🚚(collaboration) change the websocket url name
  • ♻️(frontend) stop to use provider with version
  • 🩺(CI) wait for services to be ready

Comment on lines 198 to 208
useEffect(() => {
setHeadings(editor);

editor?.onEditorContentChange(() => {
setHeadings(editor);
});

return () => {
resetHeadings();
};
}, [editor, resetHeadings, setHeadings]);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We already use it twice in exactly the same way, why not create a hook?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch ^^

Some logs were missing or not at the good place.
This commit replaces them correctly.
We will have 2 urls targeting the server, better
to improve the naming to avoid confusion.
Version are not editable, we don't need to activate
the collaboration provider for them.
Simplify the code by removing the provider
from the version.
We add a check to be sure all the services are
ready before starting the e2e tests.
@AntoLC AntoLC force-pushed the refacto/misc_refacto branch from 05aded1 to 31ee9ce Compare December 6, 2024 13:28
- We create the useHeadings hook to manage the
headings of the document and staty DRY.
- We use the headings store in IconOpenPanelEditor
and TableContent, to avoid prop drilling.
- We add a debounce on the onEditorContentChange
to improve a bit the performance.
@AntoLC AntoLC force-pushed the refacto/misc_refacto branch from 31ee9ce to 8508fcd Compare December 6, 2024 13:48
@AntoLC AntoLC merged commit a9def8c into main Dec 6, 2024
15 of 16 checks passed
@AntoLC AntoLC deleted the refacto/misc_refacto branch December 6, 2024 14:23
@AntoLC AntoLC mentioned this pull request Dec 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants