AlexsLemonade / refinebio-web

Refinebio Web
https://staging.web.refine.bio
BSD 3-Clause "New" or "Revised" License
1 stars 0 forks source link

Use getReadable for the experiment database names #379

Closed nozomione closed 2 weeks ago

nozomione commented 1 month ago

Context

Epic: #366

In PR #321, we introduced helpers/getReadable and config/readable.

In this issue, we want to expand their usage by using getReadable for the experiment database name and cleaning up experiment.databaseNames property from config/options.

 // setting for the experiment hook
  experiment: {
    databaseNames: {
      GEO: 'Gene Expression Omnibus (GEO)',
      SRA: 'Sequence Read Archive (SRA)',
      ARRAY_EXPRESS: 'ArrayExpress'
    }
  },

Problem or idea

We should move the definition of experiment.databaseNames to config/readable and use getReadable to obtain the appropriate database name in the experiment page.

Solution or next step

  1. Move the experiment.databaseNamesvalues fromconfig/optionstoconfig/readable`
  2. Clean up the return value databaseNames from the useExperiment hook
  3. Use the getReadable helper to determine the database name in the Experiment page component
nozomione commented 2 weeks ago

Closing this issue in favor of #397.