nih-cfde / dashboard

Files and documentation related to the CFDE project dashboards
Other
0 stars 0 forks source link

Widget for Personal Collections #119

Closed jrchudy closed 2 years ago

jrchudy commented 2 years ago

As part of Quarter 3, we are adding personal collections to deriva UI. A list will be available from the login dropdown and clicking "Personal Collections", but we should also have a widget for the Personal Dashboard that shows a list of the personal collections. This should be similar to the saved searches widget with a link top view each personal collection.

From a conversation in slack, Karl wrote this for how to get the set of personal collections for a user in a similar way to how saved searches were fetched for the personal dashboard:

  1. obtain an ErmrestCatalog instance with catalog_id 1 (instead of registry) but host and credentials args are the same
  2. obtain the "path builder" from that catalog just as before
  3. start building the query from the CFDE schema personal_collection table (instead of saved_query)
  4. set a filter for column RCB (instead of user_id) but supplying the same authentication ID string as the filter parameter

The main fields to consider displaying are just name and description and then you could also use RMT (record last modified time) timestamp if a time-based sort is desired.

I think the link style can be the much simpler way you might link back to a favorited term, something like /chaise/record/#1/CFDE:personal_collection/RID=X-XXXX unlike the links to saved queries which require facet blobs etc.

ACharbonneau commented 2 years ago

I found it! I'm going to put this in Q4 to talk about Friday