NCEAS / metacatui

MetacatUI: A client-side web interface for DataONE data repositories
https://nceas.github.io/metacatui
Apache License 2.0
42 stars 28 forks source link

Clean up EML211EditorView to address issues with submitting datasets #2565

Open robyngit opened 1 week ago

robyngit commented 1 week ago

The EML211EditorView is currently difficult to maintain and extend due to its size and complexity. We need to make it more modular and readable in order to address issues users are encountering with submitting datasets.

During the clean-up, we will:

robyngit commented 1 day ago

There are a series of steps taken in the EML211EditorView to ensure that the user has the correct permissions to edit the metadata and resource map and metadata:

  1. Make sure the user is signed in
  2. Fetch the metadata
  3. Use the metadata to identify and then fetch the resource map
  4. Make sure the user has write permission on the metadata
  5. Make sure the user has write permission on the resource map

These steps add quite a bit of complexity to the view and really fit better in a model. The DataPackage model is a natural place to move this logic to, and would simplify the process. There may be other views that could reuse these methods as well. Before moving them, we should first finish the DataPackage clean-up. So this issue is on the back-burner until issue #2567 is completed.