nasa-gcn / gcn.nasa.gov

General Coordinates Network (GCN) web site
https://gcn.nasa.gov
Other
179 stars 43 forks source link

adds synonyms moderation front end #2538

Open Courey opened 1 month ago

Courey commented 1 month ago

Description

This is the front end for the moderation portion of synonyms (not the circular index grouped by synonyms, but the ability to create, put, delete the synonyms themselves). It is behind both a feature flag and a moderator check. The majority of the code is behind a feature flag and moderation gate, but I did create a component for pagination to reduce redundancy so I could reuse it for this work. In order to do that I had to update the circulars index page as well. That portion is NOT behind a feature flag.

Related Issue(s)

Resolves #2116

Testing

This is the moderation index with pagination. Links for each group are to the detail page

Screenshot 2024-08-13 at 4 34 31 PM

This is the detail page for a synonym group. The button to save is disabled because no additional eventIds have been added. It is enabled when a new eventId is added.

Screenshot 2024-08-14 at 10 04 06 AM

This is the error shown if you enter an eventId that doesn't exist.

Screenshot 2024-08-14 at 2 50 48 PM

This is the create view with no eventIds added.

Screenshot 2024-08-14 at 10 05 12 AM

This is the same view with eventIds added.

Screenshot 2024-08-14 at 10 05 44 AM

This is the error shown when you try to create a synonym group with an invalid eventId

Screenshot 2024-08-14 at 2 37 14 PM
jracusin commented 1 month ago

When you delete synonyms, does it double check you meant to delete them? If not, it would be good to do so.

Courey commented 1 month ago

When you delete synonyms, does it double check you meant to delete them? If not, it would be good to do so.

It does not currently, but that is definitely something I can add in!

Courey commented 1 month ago

Here are updated images to show the additional request for a modal making sure you want to delete a synonym group. I also updated the trashcan icon next to each eventId so that it says remove instead of just uses an icon.

Screenshot 2024-08-16 at 11 41 34 AM Screenshot 2024-08-16 at 11 41 56 AM Screenshot 2024-08-16 at 11 44 38 AM Screenshot 2024-08-16 at 11 44 56 AM
codecov[bot] commented 1 month ago

Codecov Report

Attention: Patch coverage is 11.93182% with 155 lines in your changes missing coverage. Please review.

Project coverage is 6.23%. Comparing base (54ea8ce) to head (8a67744).

Files with missing lines Patch % Lines
app/routes/synonyms.new.tsx 0.00% 57 Missing :warning:
app/routes/synonyms.$synonymId.tsx 0.00% 45 Missing :warning:
app/routes/synonyms._index.tsx 0.00% 30 Missing :warning:
app/routes/synonyms/synonyms.server.ts 63.63% 12 Missing :warning:
...omponents/pagination/PaginationSelectionFooter.tsx 0.00% 8 Missing :warning:
app/routes/circulars._archive._index/route.tsx 0.00% 2 Missing :warning:
app/components/pagination/GCNPagination.tsx 0.00% 1 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #2538 +/- ## ======================================== + Coverage 6.08% 6.23% +0.15% ======================================== Files 164 167 +3 Lines 4077 4216 +139 Branches 450 466 +16 ======================================== + Hits 248 263 +15 - Misses 3827 3951 +124 Partials 2 2 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

Courey commented 1 week ago

With nothing on the page yet

Screenshot 2024-09-13 at 1 09 56 PM

when you type 3 or more characters

Screenshot 2024-09-13 at 1 10 33 PM

When you hover over one of the options

Screenshot 2024-09-13 at 1 10 43 PM