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

Add "filter-category-keys constant file to anvil-cmg project #611

Open
NoopDog opened this issue Nov 15, 2022 · 1 comment
Open

Add "filter-category-keys constant file to anvil-cmg project #611

NoopDog opened this issue Nov 15, 2022 · 1 comment
Assignees

Comments

@NoopDog
Copy link
Member

NoopDog commented Nov 15, 2022

Need

When updating the configured filters and columns of an explorer app config, the filters and columns can easily get out of sync. We need to make it easier to keep these items in sync.

Approach

The columns are configured in the various dev/index/entityConfig.tx files such as https://github.com/clevercanary/data-browser/blob/1e80477e5e975a06b5784f162263d6de602ce538/explorer/site-config/anvil-cmg/dev/index/datasetsEntityConfig.ts

The filters are configured in the category configs sections.

For the anvil-cmg project, let's make a filter-category-keys.ts similar to the one here but configured for the anvil-cmg categories.

Let's then use the key in both the entityConfig files for the sortKey like:

 {
        componentConfig: {
          component: Components.NTagCell,
          viewBuilder: ViewBuilder.buildStudyDesigns,
        } as ComponentConfig<typeof Components.NTagCell>,
        header: "Study Design",
        sort: {
          sortKey: ANVIL_CATALOG_FILTER_CATEGORY_KEYS.STUDY_DESIGN,
        },
        width: { max: "1fr", min: "120px" },
      },

and for the category configs like:

categoryConfigs: [
    {
      key: ANVIL_CATALOG_FILTER_CATEGORY_KEYS.CONSENT_CODE,
      label: "Consent Code",
    },
@NoopDog
Copy link
Member Author

NoopDog commented Nov 15, 2022

@jpaten I just realized you wouldn't be able to run this app locally as it is behind a VPN. You can use the instructions above and do #612 (the same thing but for the hca-dcp)_ project while I work on getting you access to anvil-cmg.

@NoopDog NoopDog assigned NoopDog and unassigned jpaten Jan 30, 2023
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

No branches or pull requests

2 participants