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

Enable metadata editing for internal data sources #96

Open
SeanLeRoy opened this issue May 8, 2024 · 4 comments
Open

Enable metadata editing for internal data sources #96

SeanLeRoy opened this issue May 8, 2024 · 4 comments
Assignees
Labels
enhancement New feature or request

Comments

@SeanLeRoy
Copy link
Contributor

SeanLeRoy commented May 8, 2024

This feature would be available on right click context menu as an "Edit Metadata" option only when the data source is "AICS FMS"

Clicking the "Edit Metadata" button it would open up a modal that just looks like any other file row but the cells in this are editable. Then also included in the modal would be a description of how the metadata is applied. So this would describe that the metadata would overwrite any and all metadata assigned to these files and talk about why some columns are present and some aren't.

We want to touch MMS not FES for reading and writing this metadata because we only want users to touch directly annotated metadata like "Plate Barcode" instead of "Solution" because the "Solution" annotation in this example is an indirect annotation that is sourced from "Plate Barcode" downstream of MMS in the ETL. So with this in mind when we build the row for users the edit we want to include only the annotations that are directly assigned to any of the files rather than the entirety of all the annotations i.e. only edit directly assigned annotations and let users add new columns (annotations).

The File Upload App's mass edit feature is a similar UI to what we want where it is one row that is edited that represents the metadata for the entire selection.

Might be good to start a new metadata branch for this? Like Edit or something?

Key endpoints in MMS:

  • GET /filemetadata/<file_id>
  • PUT /filemetadata/<file_id>
@SeanLeRoy SeanLeRoy changed the title Enable metadata editing for internal and external data sources Enable metadata editing for internal data sources Jun 11, 2024
@aswallace aswallace self-assigned this Jun 11, 2024
@SeanLeRoy
Copy link
Contributor Author

#120 Required

@SeanLeRoy SeanLeRoy added the enhancement New feature or request label Aug 7, 2024
@aswallace
Copy link
Contributor

aswallace commented Sep 18, 2024

Task breakdown (condensed, not showing details for UI tasks):

  • Add state logic for calling MMS endpoints
    • GET file metadata
    • PUT custom file metadata
    • POST new annotation
  • Add edit option in menu when right click file(s) selection
  • "Existing annotation" pathway
    • Fuzzy search to select existing field --> can we disable non-editable fields? Restrict editable annotations #343
    • Get and display current unique values with counts
    • Provide input field or dropdown for new values --> get existing options from templates in MMS?
  • Progress message & success message
  • "New annotation" pathway Logic for adding new annotations/metadata #371
    • Fuzzy search for potential matches to new annotation name --> threshold for how many matches/how close to show?
  • Password requirement --> implement authentication/password system? Add password logic to edit modal #341
  • Alert if user tries to leave page while editing is still in progress (after submit)

Two ways to approach:

  1. Work through this ^ list one task at a time, developing related UI/backend work simultaneously
    • advantage: will know earlier if there are problems w/ the designs bc of practical implementation
    • disadvantage: high potential for chaos and overwhelm when doing frontend & logic together
  2. Implement all the UX designs first with mock data & no backend functionality or state logic, then do the state logic and MMS endpoint stuff separately later (or vice versa)
    • advantage: less brain chaos
    • disadvantage: may not realize things won't work together until late

@SeanLeRoy
Copy link
Contributor Author

Based on your awesome breakdown, here is my rec of the workflow

First aspect, create backend connection to inform decisions about what state we will need to keep to be able to send edits to backend

  • Add state logic for calling MMS endpoints
    • GET file metadata
    • PUT custom file metadata
    • POST new annotation

Actually create the edit menu option, at first let it render a blank modal

  • Add edit option in menu when right click file(s) selection

Start filling in the modal with the existing annotation pathway, skip the password UI for now

  • Fuzzy search to select existing field
  • Provide input field or dropdown for new values --> get existing options from templates in MMS?
  • Get and display current unique values with counts

Add progress

  • Progress message & success message, just render the progress using the existing progress UI for now
  • Make sure we can track progress/completion

Add new annotation pathway

  • Fuzzy search for potential matches to new annotation name --> threshold for how many matches/how close to show?

Add disable non-editable fields feature

  • Disable non-editable fields in annotation selection menu (@SeanLeRoy will provide list of annotation names to make non-editable, this list will be hard-coded for now)

Add UI for password (create a random hardcoded password for now)

  • Password requirement --> implement authentication/password system?

Add feature for alerting user when leaving page

  • Alert if user tries to leave page while editing is still in progress (after submit)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

When branches are created from issues, their pull requests are automatically linked.

3 participants