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

Use context for tags #430

Closed jonathonherbert closed 1 year ago

jonathonherbert commented 1 year ago

What does this change?

Moves tags to Context, reducing the amount of prop drilling necessary to supply tags to the rules table, tag table, and single/multiple edit forms.

Necessary to move to a parameterless route component <RuleForm /> for rule editing.

How to test

Running locally or in CODE, examine the four components above. Do tags appear correctly in the rules table, single/batch edit forms, and tag table?

samanthagottlieb commented 1 year ago

I've been testing this locally and noticed that when I make non-tag related changes to a live rule that has more than one tag, then click to either 'Publish' or 'Discard unpublished changes', the diff modal shows the changes I've made, and additionally shows a tag diff, reordering the tags (even when I haven't touched them). E.g.:

Screenshot 2023-09-20 at 16 23 53 Screenshot 2023-09-20 at 16 25 22

I checked out main and the same is happening, so at least we know it's not as a result of this PR, but thought I'd point out anyway - I'll create a ticket to fix.

samanthagottlieb commented 1 year ago

I checked out main and the same is happening, so at least we know it's not as a result of this PR, but thought I'd point out anyway - I'll create a ticket to fix.

Small follow up to this - I couldn't recreate the issue when the Source of the tag is 'Style guide and names' or 'Names' - only when the Source is 'Check this' (I haven't tested all Sources).

Card is here.

jonathonherbert commented 1 year ago

Thanks for spotting the issue, @samanthagottlieb!