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

Add formulas back to Wildcard #53

Open
geoffreylitt opened this issue Nov 16, 2020 · 0 comments
Open

Add formulas back to Wildcard #53

geoffreylitt opened this issue Nov 16, 2020 · 0 comments
Assignees

Comments

@geoffreylitt
Copy link
Owner

Previous versions of Wildcard before the big rewrite (2ef9898) had formula evaluation built in. It hasn't been added in the new version yet.

In the old implementation, the core formula evaluation part was fine, but the integration with the UI was quite messy. The system started as a typical spreadsheet where you can edit a formula in any cell. But we quickly moved to a different model where a formula applies to a whole column at once. This was implemented with a hack: when the user would enter a formula into a cell, we would detect the formula and then propagate a copy of that formula to every cell in the column. Now that we've stabilized on the column-based model we should move the implementation to follow.

Rough Implementation strategy

  • store the formula on the column. persist in the localstorage user table so that formulas stick around; this is critical for allowing users to customize once and then use the customization many times.
  • perf strategy: when a row updates, re-eval all formulas in the row, but memoize formula evaluations within the evaluator (by input arg value). maybe don't bother even tracking dependencies yet. and don't persist memoization across page reloads. we can tweak this further if it gets slow, but it's not a priority yet.
  • store the results of formula evaluation in the redux table state, and join together in getfinalTable.
@geoffreylitt geoffreylitt self-assigned this Nov 16, 2020
@geoffreylitt geoffreylitt moved this from To do to Done in Fall 2020 Semester Apr 13, 2021
@geoffreylitt geoffreylitt moved this from Done to In progress in Fall 2020 Semester Apr 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Fall 2020 Semester
  
In progress
Development

No branches or pull requests

1 participant