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

Template graph scaffolding #3019

Merged
merged 1 commit into from
Feb 26, 2024
Merged

Template graph scaffolding #3019

merged 1 commit into from
Feb 26, 2024

Conversation

nikolas
Copy link
Member

@nikolas nikolas commented Feb 22, 2024

This is still in progress, but just laying out a few more things as I want to keep the ball rolling here. I have the expression inside the new template graph class - next step is just to render it in the jsxgraph view.

@Evan-CTL
Copy link
Contributor

I'm going to hold off on merging what's here. Merging into production wouldn't add any tangible difference and there are some warnings being thrown that I'm worried might trigger an issue.
Screenshot 2024-02-22 at 4 18 24 PM
Keep in mind that the expression still isn't saved anywhere.

@nikolas nikolas self-assigned this Feb 24, 2024
@nikolas nikolas force-pushed the template-graph branch 7 times, most recently from 718a12f to 96bc7f6 Compare February 25, 2024 02:51
@nikolas nikolas removed their assignment Feb 25, 2024
This is still in progress, but just laying out a few more things as I
want to keep the ball rolling here. I have the expression inside the new
template graph class - next step is just to render it in the jsxgraph
view.
@nikolas
Copy link
Member Author

nikolas commented Feb 25, 2024

Alright, so this is ready for another review.

Current state is pretty basic function display with the x variable, but it's a good starting point we can build off of:
Screenshot_2024-02-24_21-53-03

Still TODO:

  • Expression should only be re-parsed onblur rather than onchange... or whatever 3demos does.
  • More user-friendly front-end validation. Again, using 3demos as reference here.
  • Expression isn't saved to the back-end yet. I really just wanted to focus on the front-end functionality here as that's what's novel, but obviously we will be adding a new expression column to the Graph model, at least.

Random notes:
Just importing mathjs in econpractice was causing a pretty strange bug with the decimal.js dependency of math.js. See: josdejong/mathjs#3165

I am currently working around this by including my custom fork of decimal.js: nikolas/decimal.js@76c195d

mathjs proved to be difficult to make a custom build of, but this solution is satisfactory.

@Evan-CTL Evan-CTL merged commit fa3f733 into master Feb 26, 2024
3 checks passed
@ndittren ndittren deleted the template-graph branch July 9, 2024 17:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants