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

[REFACTOR] current-state event: Change note format #15

Open
wowawiwa opened this issue May 11, 2020 · 2 comments
Open

[REFACTOR] current-state event: Change note format #15

wowawiwa opened this issue May 11, 2020 · 2 comments
Assignees
Labels

Comments

@wowawiwa
Copy link
Collaborator

Currently, the current-state event includes the key notes: {[clientId: string]: Note[]};
Suggestion: notes: Note[]

The mapping from clientID isn't needed, as the author is inside the note already and we don't operate by clientID anyway in the frontend.

@abustany
Copy link
Owner

In that case the backend could send all notes in a flat list yes, since as you say the author ID is anyway embedded in the notes. The current shape actually just mirrors the datastructure used internally by the backend (ie. I didn't put more thought into it), but changing it is no problem at all!

@wowawiwa wowawiwa changed the title current-state Event structure current-state event: Change note format May 18, 2020
@wowawiwa
Copy link
Collaborator Author

Or we can have all normalized.

@wowawiwa wowawiwa reopened this May 18, 2020
@wowawiwa wowawiwa changed the title current-state event: Change note format [REFACTOR] current-state event: Change note format May 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants