datalad / datalad-catalog

Create a user-friendly data catalog from structured metadata
https://datalad-catalog.netlify.app
MIT License
15 stars 12 forks source link

ENH+NF: add javascript customization options via config #283

Closed jsheunis closed 1 year ago

jsheunis commented 1 year ago

This PR:

Both are done by allowing more configuration options via the config file, basically resulting in show/hide logic for certain UI components.

In order to apply these changes to an existing catalog, the affected html and javascript files will have to be checked out into the existing catalog repo, and the catalog's config file will need to be updated with the "social_links" and "dataset_options" fields.

Towards parts of https://github.com/psychoinformatics-de/sfb1451-projects-catalog/issues/5

codecov-commenter commented 1 year ago

Codecov Report

Patch and project coverage have no change.

Comparison is base (377fffe) 82.67% compared to head (b009163) 82.67%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #283 +/- ## ======================================= Coverage 82.67% 82.67% ======================================= Files 32 32 Lines 2164 2164 ======================================= Hits 1789 1789 Misses 375 375 ``` | Flag | Coverage Δ | | |---|---|---| | unittests | `72.06% <ø> (ø)` | | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=datalad#carryforward-flags-in-the-pull-request-comment) to find out more. Help us with your feedback. Take ten seconds to tell us [how you rate us](https://about.codecov.io/nps?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=datalad). Have a feature suggestion? [Share it here.](https://app.codecov.io/gh/feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=datalad)

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.

jsheunis commented 1 year ago

Ooh sorry (it's about time to implement https://github.com/datalad/datalad-catalog/issues/273 then)

Here are some examples:

1

config: {
    ...
    "social_links": {
        "about": null,
        "documentation": null,
        "github": null,
        "twitter": null
    },
    "dataset_options": {
        "include_metadata_export": false
    },
    ...
}
Screenshot 2023-04-13 at 09 00 42

2

config: {
    ...
    "social_links": {
        "about": null,
        "documentation": "https://docs.datalad.org/projects/catalog/en/latest/",
        "github": "https://github.com/datalad/datalad-catalog",
        "twitter": "https://twitter.com/datalad"
    },
    "dataset_options": {
        "include_metadata_export": true
    },
    ...
}
Screenshot 2023-04-13 at 08 59 36
jsheunis commented 1 year ago

Ok, fire in the hole.