Skip to content
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

EASI-4530 Grb async presentation links card #2958

Merged

Conversation

adamodd
Copy link
Contributor

@adamodd adamodd commented Jan 22, 2025

EASI-4530

Description

  • New PresentationLinksCard.tsx

Please keep in mind there is another ticket in this feature for more testing in case there are substantial change requests.

How to test this change

  • New PresentationLinksCard.test.tsx

PR Author Checklist

  • I have provided a detailed description of the changes in this PR.
  • I have provided clear instructions on how to test the changes in this PR.
  • I have updated tests or written new tests as appropriate in this PR.

PR Reviewer Guidelines

  • It's best to pull the branch locally and test it, rather than just looking at the code online!
  • When approving a PR, provide a reason why you're approving it
    • e.g. "Approving because I tested it locally and all functionality works as expected"
    • e.g. "Approving because the change is simple and matches the Figma design"
  • Don't be afraid to leave comments or ask questions, especially if you don't understand why something was done! (This is often a great time to suggest code comments or documentation updates)
  • Check that all code is adequately covered by tests - if it isn't feel free to suggest the addition of tests.

@adamodd adamodd requested a review from a team as a code owner January 22, 2025 04:08
@adamodd adamodd requested review from aterstriep and removed request for a team January 22, 2025 04:08
Copy link

EKS Ingress URLs

Copy link
Contributor

@aterstriep aterstriep left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • It looks like the "virus scanning in progress" view from the Figma is missing
  • Action buttons should be hidden for GRB reviewer view
    • I think it's worth adding both this and the virus scanning view to the unit tests
  • I noticed a couple things on the mobile view:
    • You might want to double check with Zoe on this, but the "Remove all presentation links" button is not displayed on mobile
    • The links should all be on separate lines (see screenshot of current state below)
Screenshot 2025-01-27 at 9 38 35 AM

@aterstriep
Copy link
Contributor

You might want to double check with Zoe on this, but the "Remove all presentation links" button is not displayed on mobile

I also asked Zoe about this and she said the "Remove all presentation links" button should display on mobile

@aterstriep aterstriep requested a review from a team as a code owner February 17, 2025 15:55
@aterstriep aterstriep requested review from aterstriep and removed request for a team February 17, 2025 15:55
Copy link
Contributor

@patrickseguraoddball patrickseguraoddball left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm able to submit empty presentation links by setting the recording link, then removing that the link before submission. This is the payload

{
  "input": {
    "systemIntakeID": "9ab475a8-a691-45e9-b55d-648b6e752efa",
    "recordingLink": "",
    "recordingPasscode": "",
    "transcriptLink": ""
  }
}

I seerecordingLink is not required in the schema, but I was under the impression that it was required in the form. Can this be confirmed? Either way, the form is able to be submitted without any input data, and the card is also rendered empty on the admin page

After adding a file, the card is set to Virus scanning in progress. Then I go into the form and remove the file. The card on the admin page is still showing Virus scanning in progress

Screenshot 2025-02-17 at 10 54 04 AM

Additionaly, I cannot submit the form without editing the recording link. For example, I've added a recording link and uploaded a file. When I go to edit the presentation links, and I only want to remove the file, I also need to edit the recording link to be able to submit the form.

I'm also able to submit the form with only a recording passcode, but not recording link
Screenshot 2025-02-17 at 10 57 24 AM

I'm getting an error when trying to add a transcript link.

{
  "errors": [
    {
      "message": "pq: new row for relation \"system_intake_grb_presentation_links\" violates check constraint \"transcript_link_or_doc_null_check\"",
      "path": [
        "setSystemIntakeGRBPresentationLinks"
      ]
    }
  ],
  "data": {
    "setSystemIntakeGRBPresentationLinks": null
  }

Screenshot 2025-02-17 at 10 59 24 AM

@aterstriep
Copy link
Contributor

@patrickseguraoddball There is still some remaining work to be done on the form in EASI-4715. There were additional changes to the schema and backend resolvers after the initial form PR went through, so I need to update the form code to fix the submit mutation issues.

If there are any card states that you want to test locally that aren't possible using the form, you could mock the presentation links prop here (there is existing mock data here).

Most of the issues are with editing the form, so you can also just remove all presentation links to clear the links before submitting new data. I'm also happy to sync on this to run through the different card states.

Copy link
Contributor

@patrickseguraoddball patrickseguraoddball left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LG thanks!

@aterstriep aterstriep merged commit e5485e5 into feature/EASI-4521_grb_presentation_links Feb 17, 2025
14 checks passed
@aterstriep aterstriep deleted the EASI-4530/grb_async branch February 17, 2025 19:21
patrickseguraoddball added a commit that referenced this pull request Feb 24, 2025
* Init feature branch

* [EASI-4527] add presentation links schema (#2951)

* add presentation links schema

* move column declarations

* add presentation links model and stub URL/status resolvers, remove bucket name

* add mutation/query to postman

* [EASI-4529] notification emails (#2947)

* email template

* create template support code

* add to tests

* use acronym

* Update pkg/email/templates/grb_review_presentation_links_updated.gohtml

Co-authored-by: Lee Warrick <32332479+mynar7@users.noreply.github.com>

* remove extra <br>

* updates to system_intake_admin_upload_doc.gohtml

* fix oops

* fix mistaken bold

* spacing

---------

Co-authored-by: Lee Warrick <32332479+mynar7@users.noreply.github.com>

* Easi 4697/delete links mutation (#2953)

* add sql file, sqlqueries file, storage file

* add to schema/resolvers

* err when row not found

* whoops

* add some form of a test

* [EASI-4711] Remove required presentation links fields (#2954)

* remove requirement

* add semicolon

* Easi 4528/query links (#2957)

* working on dataloaders + storage

* app code should be done, working on tests

* remove mock code

* add quick test to be expanded on later

* remove todos

* [EASI-4531] GRB presentation links form (#2972)

* Form component and route

* Basic form fields

* Presentation links mutation

* Update fields type to match mutation

* Form submit

* Transcript fields tabs

* Update allowed file types

* Fix field bugs

* Field validation

* Edit form default values

* FileInput component with defaultFileName prop

* Disable form if no fields changed

* Basic unit tests

* Basic unit tests

* Tab field updates

* Fix routes

* Update props

* Prop typo fix

* Update file field values to base64

* Bug fixes

* Fix TS error

* Update variable name

* FileInput unit test

* Fix disabled submit button on edit

- Submit button was disabled on edit if presentation deck file was previously uploaded, and a different field was updated
- Updated form to set default values for file upload fields

* Fix transcript fields default tab

* Fix mobile view grid layout

* [EASI-4696] create/update links (#2966)

* working on upsert functionality

* wire up resolver to storage method`

* initial tests - will rework the entire testing file to be cohesive

* test upsert

* combine tests and clean up

* confirm err occurs when adding conflicting fields

* add one devdata piece - testing

* add other type of links in devdata

* use links again - oops

* whoops - remove disallowed combination

* return data from sql, fix sql statement

* move to resolvers pkg, add s3 functionality

* fix up resolver, add file handler helper, add test

* nill transcript link when either file has data

* eanup easiencoding pkg

* don't overwrite initial config

* add comment, better naming. handle modifierd by/at

* add test

* update both url schema resolvers

* updates to hardcoded resolvers

* starting on omittable

* fix check

* whoops

* those aren't errors either!

* remove unused

* add omittable to other fields

* experimenting with removing files

* fix comments

* fix comment

* move resolver code to resolver file

* Fix incorrect resolver hooked up on presentation deck which was incorrectly pointed to transcript

* chore: correct migration linting

* EASI-4530 Grb async presentation links card (#2958)

* Async presentation card stub

* Modal to remove presentation links

* Interactions for demo
Icons

* `SystemIntake.grbPresentationLinks` type and display prop values

* `DeleteSystemIntakeGRBPresentationLinks` fe mutation

* PresentationLinksCard component

* PresentationLinksCard unit tests

* Error handle delete modal
Spread more link props

* Render switch over admin context

* ExternalLinkModal in PresentationLinksCard

* Virus scanning

* Hide card form links if not admin

* Fix virus scanning text

* Unit test fix

* GRB reviewer view

* CardHeader padding

* Add transcript link to query and card

* No recording link available text

* Presentation link spacing / util classes

- Updated link spacing in card
- Added util classes for 'gap', 'row-gap', and 'column-gap' css properties

* Refetch intake after delete mutation

* Use <ExternalLinkAndModal> for external links

- Replaced external link modal handling code with <ExternalLinkAndModal> component
- Fixed icon spacing on external link button

* Fix empty card conditional rendering

* Spacing

* Unit tests

* chore: return nil error if status cant be returned for docs. log warning of the error

* chore: correct pointer de-reference in logger

---------

Co-authored-by: Ashley Terstriep <60187543+aterstriep@users.noreply.github.com>
Co-authored-by: Clay Benson <clay.benson@oddball.io>
Co-authored-by: Steven Wade <steven.wade@oddball.io>

* [EASI-4715] Async GRB presentation links form fixes (#3008)

* Clear transcript file if link exists

* Update backend to nil out transcript file data when uploading a link

* Only clear out transcript file data if passing a non-nil value for the link

* Clear default file data

* Field validation updates

* Validation unit tests

* recordingLink input type

---------

Co-authored-by: ClayBenson94 <clay.benson@oddball.io>
Co-authored-by: samoddball <156127704+samoddball@users.noreply.github.com>

* Added cypress test

---------

Co-authored-by: samoddball <156127704+samoddball@users.noreply.github.com>
Co-authored-by: Clay Benson <clay.benson@oddball.io>
Co-authored-by: Lee Warrick <32332479+mynar7@users.noreply.github.com>
Co-authored-by: Ashley Terstriep <60187543+aterstriep@users.noreply.github.com>
Co-authored-by: Steven Wade <99294987+StevenWadeOddball@users.noreply.github.com>
Co-authored-by: Steven Wade <steven.wade@oddball.io>
Co-authored-by: Patrick Segura <patrick.segura@oddball.io>
Co-authored-by: Patrick Segura <95709965+patrickseguraoddball@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants