guardian / typerighter

Even if you’re the right typer, couldn’t hurt to use Typerighter!
Apache License 2.0
276 stars 12 forks source link

Add create rule form (first pass) #318

Closed rhystmills closed 1 year ago

rhystmills commented 1 year ago

Co-authored-by @Fweddi

What does this change?

This PR adds a 'create rule' form. Currently the form is very permissive, and only the 'rule' is required.

image

The DB model for categories and and tags are subject to change (tags also currently aren't save to the database, PR-pending). In this PR, categories are a hardcoded list, in the future we'd want to use an endpoint, drawing from existing tags. We'd also want tags to be drawn from the database in the future, with users able to add their own tags.

The position of the form in this PR is subject to change - we've tried to cover the core functionality of the form (managing form data and submitting to the backend) as the UI will be finalised later.

How to test

With Composer credentials, run typerighter locally using ./script/start. Can you add a new rule via the form as intended?

Accessibility

rhystmills commented 1 year ago

I believe I've sorted that tag problem, thanks for the review!