-
Notifications
You must be signed in to change notification settings - Fork 279
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
feat: add browser for synthesizer #640
Conversation
Codecov Report
@@ Coverage Diff @@
## main #640 +/- ##
=======================================
Coverage 66.57% 66.57%
=======================================
Files 44 44
Lines 7103 7103
Branches 1337 1336 -1
=======================================
Hits 4729 4729
Misses 2365 2365
Partials 9 9
Continue to review full report at Codecov.
|
…esizer setting; start and end default values for Linelike
… synthesizer-browser
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great job! I just went through the code and dropped some comments below. I'll play around with the UI a bit later :D.
~Seems like the CI is failing for some reason. Can you try running yarn build
locally and see what errors you are getting? I'm guessing something is off with react-scripts
?~
Fixed now!
mutationCount: newValue as [number, number], | ||
}, | ||
}); | ||
console.log(this.state.setting?.mutationCount); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider using consola
and controlling the log level?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💯
Description
First version of a web-app for the synthesizer using React and Material-UI
Since this web app has its own dependencies, it has been separated into a new package
synthesizer-ui
. Notably, It adds a@material-ui/core
dependency.The general purpose of the web-app is to provide a user-interface which problem authors or Penrose users can interact with to generate multiple diagrams, view mutated programs, and export diagrams that they like. This is a first pass, so it covers some core functionalities with opportunities to extend as necessary. The core things that it does:
Implementation strategy and design decisions
Different sections are divided into various components. Material-UI was chosen because it provides built-in components like sliders--which were necessary for the implementation of some of the settings--which were not to be found in CSS libraries like bootstrap, tailwind, or styled-components.
Examples with steps to reproduce them
yarn
to build dependency treeyarn start
and visitlocalhost:4000
Checklist
yarn test
yarn docs
and there were no errors when generating the HTML siteOpen questions
Midpoint : Linelike -> Point
, they should be able to add only this statement to their configuration without needing to also addLinelike
. This behavior has also been observed for Edit mutations.public/files/euclidean.txt
file so that defaultLinelike
types are rendered withColors.none
(making them invisible). Then, for each of the predicates/constructors for Linelike types, Ioverride
theLinelike
color toColors.black
. This means that anytime the Synthesizer addsLinelike <x>
without further use, it does not render. However, ifLinelike <x>
is used in any subsequent statements, it will render appropriately.ReplaceStmtName
edit mutation, the new statement will not recycle the arguments from the old statement. Instead, it creates new arguments. i.e.:examples/euclidean.sty
andexamples/geometry.dsl
inpublic/files
, and we need to adjust the implementation so that the source files can be linked directly without copy/paste. Currently React complains about relative imports from beyond the project root.