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

Normalize redux data and introduce backlinks. #6

Open
oliverbutler opened this issue May 17, 2021 · 2 comments
Open

Normalize redux data and introduce backlinks. #6

oliverbutler opened this issue May 17, 2021 · 2 comments
Assignees
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@oliverbutler
Copy link
Owner

Look into https://github.com/paularmstrong/normalizr

Currently

Redux stores pages as an array of blocks with no children
To query a pages children we currently just filter all pages, this has some benefits

  • Small number of pages not much slowdown
  • Easy to update records this way

Proposed

Work out how best to store, in a normalized way:

  • Outline of all pages (for sidebar etc)
  • For certain blocks, all of their content/children
  • Database/property content

Ideally - we want no duplication of data.

@oliverbutler oliverbutler added the help wanted Extra attention is needed label May 17, 2021
@oliverbutler
Copy link
Owner Author

Using a normalized tree structure in redux would also enable ordering of children, a current flaw with the existing implementation.

This is a high priority fix.

@oliverbutler oliverbutler self-assigned this May 17, 2021
@oliverbutler oliverbutler added the bug Something isn't working label May 17, 2021
@oliverbutler
Copy link
Owner Author

  • Update SQL to support tree ordering
  • Update redux store
  • Update sidebar (may be able to remove tree-building)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant