You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
These different places are appropriate for different scenarios, though they are all fine. Still, I think there is some technical debt here which we can unify to make things work in a clearer way.
If this parameter is hard-coded for this graph type and will not be altered by the user or instructor, this is best to set in the graph constructor (i.e. in the graphs directory). For this sort of parameter, it doesn't even need to be saved to the database since it will never be changed, so it can exist purely as code in the specific graph file itself.
As a last resort, we can set parameters in JXGBoard. This component is useful for setting parameters which need to update based on other params. But the complex logic in this component is messy and I think there is some cleanup we can do here.
The text was updated successfully, but these errors were encountered:
Default parameters for a new graph are set a number of ways throughout the various graph types:
These different places are appropriate for different scenarios, though they are all fine. Still, I think there is some technical debt here which we can unify to make things work in a clearer way.
If this parameter is hard-coded for this graph type and will not be altered by the user or instructor, this is best to set in the graph constructor (i.e. in the
graphs
directory). For this sort of parameter, it doesn't even need to be saved to the database since it will never be changed, so it can exist purely as code in the specific graph file itself.If we provide a default for this parameter which is optionally overridden by the instructor in the graph creation process, we set the default in Editor.jsx. https://github.com/ccnmtl/econplayground/blob/master/media/js/src/Editor.jsx#L113
As a last resort, we can set parameters in JXGBoard. This component is useful for setting parameters which need to update based on other params. But the complex logic in this component is messy and I think there is some cleanup we can do here.
The text was updated successfully, but these errors were encountered: