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(uip-editor): store editor state (POC) #780

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

fshovchko
Copy link
Collaborator

Closes: #617

@fshovchko fshovchko added the enhancement New feature or request label Jun 27, 2024
@fshovchko fshovchko self-assigned this Jun 27, 2024
@ala-n ala-n added this to the UIP 2.0.0 milestone Jul 2, 2024
Copy link
Contributor

@ala-n ala-n left a comment

Choose a reason for hiding this comment

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

There is a mixed responsibility issue in the current implementation:
UIPEditor is not a state-holder and should not interact with storage/modal (the actual state-holder) unless it's directly connected with user interaction.
Consider rework of EditorStore integration considering the following points:

  1. It should observe UIPModel directly or be integrated inside model and core
    1.2) Just in case there is a possibility to observe the actual initiator of change inside the core.
  2. Please be aware, that the initial state depends on setting it up inside the core. The editor store is only one of the sources, there is also an anchor and default snippet used as a source. The new logic should be in sync with them in terms of priority and execution time. The UIP should not be affected by extra update events as well.

@fshovchko fshovchko requested a review from ala-n July 3, 2024 12:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[🚀core]: POC - ability to store last editor state
2 participants