Skip to content

Add fetch metadata buttons to submissions form; add new fields#81

Merged
3mcd merged 12 commits into
mainfrom
em/fetch-metadata
Sep 12, 2023
Merged

Add fetch metadata buttons to submissions form; add new fields#81
3mcd merged 12 commits into
mainfrom
em/fetch-metadata

Conversation

@3mcd
Copy link
Copy Markdown
Collaborator

@3mcd 3mcd commented Sep 11, 2023

Issue(s) Resolved

Resolves #56.

This PR adds specced fields to the submissions integration, including fields for Abstract (called Description in core atm), DOI, URL, and Manager's Notes. Auto-fill buttons were also added for Title, URL, and DOI fields.

Also added/changed are:

  • several new shadcn/ui components and icons
  • a useLocalStorage hook for client-side persistence (used to persist current submission form state)
  • API_KEY env var (don't forget to update your .env.local file when testing/after merge
  • example support for "*" in integration manifest files
  • simplified SDK errors and better utility types

Test Plan

  1. Clone locally, log in to core, and click the "Submit Pub" button at the top of the Submitted stage.
  2. Enter a title, then delete it. You should see a red error message that states the Title field is required.
  3. Repeat step 2 for the Abstract, DOI and URL fields. The DOI and URL fields have extra rules that ensure the strings you enter are valid identifiers.
  4. Use some of the "magic wand" buttons to the right of the Title, DOI, and URL fields. They should do some basic auto-filling, and display success/error messages. Right now these buttons just perform a best guess. They haven't been tested very much!
  5. Click "Submit Pub" when all the fields are valid. You should see a success message.
  6. Click "Go back". You should see the new pub in the Submitted stage.

Screenshots (if applicable)

image

Caveats

The manager's notes field doesn't work yet, I think because there is a space/apostraphe in the field name. We'll address this when we standardize the manifest/field names/etc.

@3mcd 3mcd changed the title [Draft] Add fetch metadata buttons to submissions form; add new fields Add fetch metadata buttons to submissions form; add new fields Sep 11, 2023
Comment thread integrations/submissions/lib/metadata.ts Outdated
Comment thread integrations/submissions/lib/html.ts Outdated
@isTravis isTravis temporarily deployed to em/fetch-metadata - core PR #81 September 12, 2023 02:10 — with Render Destroyed
@3mcd 3mcd force-pushed the em/fetch-metadata branch from 5a196e6 to 02f47a2 Compare September 12, 2023 02:14
@isTravis isTravis temporarily deployed to em/fetch-metadata - core PR #81 September 12, 2023 02:14 — with Render Destroyed
@isTravis isTravis temporarily deployed to em/fetch-metadata - integration-evaluations PR #81 September 12, 2023 02:14 — with Render Destroyed
@isTravis isTravis temporarily deployed to em/fetch-metadata - integration-submissions PR #81 September 12, 2023 02:14 — with Render Destroyed
@3mcd 3mcd force-pushed the em/fetch-metadata branch from 02f47a2 to 5d2df7f Compare September 12, 2023 02:16
@isTravis isTravis temporarily deployed to em/fetch-metadata - core PR #81 September 12, 2023 02:16 — with Render Destroyed
@isTravis isTravis temporarily deployed to em/fetch-metadata - integration-evaluations PR #81 September 12, 2023 02:16 — with Render Destroyed
@isTravis isTravis temporarily deployed to em/fetch-metadata - integration-submissions PR #81 September 12, 2023 02:16 — with Render Destroyed
@3mcd 3mcd force-pushed the em/fetch-metadata branch from 5d2df7f to dc22455 Compare September 12, 2023 02:16
Comment thread integrations/evaluations/.env.template Outdated
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Don't forget to set this in your .env.local for both core and integrations!

@isTravis isTravis temporarily deployed to em/fetch-metadata - core PR #81 September 12, 2023 17:01 — with Render Destroyed
@isTravis isTravis temporarily deployed to em/fetch-metadata - integration-evaluations PR #81 September 12, 2023 17:01 — with Render Destroyed
@isTravis isTravis temporarily deployed to em/fetch-metadata - integration-submissions PR #81 September 12, 2023 17:01 — with Render Destroyed
Copy link
Copy Markdown
Member

@gabestein gabestein left a comment

Choose a reason for hiding this comment

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

Thanks for demoing! LGTM.

@3mcd 3mcd merged commit 5a83568 into main Sep 12, 2023
@3mcd 3mcd deleted the em/fetch-metadata branch September 12, 2023 19:05
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.

Submissions Integration

3 participants