A webapp for testing and sharing javascript expressions made with vue3 components.
Demos:
- qualifier - describe a number
- beware raw negation - an example of why you need to consider null values when writing expressions
- fizzbuzz - a classic programming challenge
The main purpose of this tool is to show an evaluation table of all combinations of sample variable values including null (which is easy to forget testing and can be counter intuitive).
- must provide a visual tree view of an expression ✓
- must map operators to more generally understood symbols ✓
- must distinguish variables / constants / operators ✓
- must allow an expression to be created with template elements to assist the user ✓
- must be able to support a configurable range of javascript expression elements and gracefully handle not supporting a given expression
- must facilitate editing an expression with a minimised number of actions
- should recommend simplifications, e.g.
a AND a
can be replaced witha
- visual view
- centre all text along a given line
- handle broken line vertical spacing
- remove extra space at top of a clause box
- visual editor
- send focus to next available input once a template is chosen or a slot filled
- inline binary expressions with simple clauses
- edit literal and identifier clauses in place
- allow delete to remove clauses from AND/OR expressions with more than two clauses
This work relies on the following libraries: