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

Dataset Catalog #225

Open
wants to merge 31 commits into
base: main
Choose a base branch
from
Open

Dataset Catalog #225

wants to merge 31 commits into from

Conversation

SanjeevLakhwani
Copy link
Contributor

Added a dataset catalog which is displayed in the overview tab when no project is selected

src/js/components/Overview/PublicOverview.tsx Outdated Show resolved Hide resolved
src/js/components/Provenance/Catalogue/Catalogue.tsx Outdated Show resolved Hide resolved
src/js/components/Provenance/Catalogue/CatalogueCard.tsx Outdated Show resolved Hide resolved
src/js/components/Provenance/Catalogue/CatalogueCard.tsx Outdated Show resolved Hide resolved
src/js/utils/strings.ts Outdated Show resolved Hide resolved
src/styles.css Outdated Show resolved Hide resolved
src/js/components/Provenance/Catalogue/CatalogueCard.tsx Outdated Show resolved Hide resolved
src/js/components/Provenance/Catalogue/CatalogueCard.tsx Outdated Show resolved Hide resolved
src/js/components/Provenance/Catalogue/CatalogueCard.tsx Outdated Show resolved Hide resolved
src/js/components/Overview/PublicOverview.tsx Outdated Show resolved Hide resolved
Copy link
Member

@gsfk gsfk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Carousel autoplay is a bit.... I don't know, aggresive? I think we typically avoid animations, Also: https://shouldiuseacarousel.com/

For projects with a single dataset, I still get left and right arrows, is this intentional?

# Conflicts:
#	src/public/locales/en/default_translation_en.json
#	src/public/locales/fr/default_translation_fr.json
src/js/components/Provenance/Catalogue/CatalogueCard.tsx Outdated Show resolved Hide resolved
src/js/components/Provenance/Catalogue/CatalogueCard.tsx Outdated Show resolved Hide resolved
src/js/components/Provenance/Catalogue/Catalogue.tsx Outdated Show resolved Hide resolved
src/js/components/Provenance/Catalogue/CatalogueCard.tsx Outdated Show resolved Hide resolved
src/js/utils/strings.ts Outdated Show resolved Hide resolved
src/js/components/Provenance/Catalogue/CatalogueCard.tsx Outdated Show resolved Hide resolved
src/js/components/Provenance/Catalogue/Catalogue.tsx Outdated Show resolved Hide resolved
Copy link
Contributor Author

@SanjeevLakhwani SanjeevLakhwani left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The language switcher is broken on the catalog. Should get resolved soon.

Copy link
Member

@davidlougheed davidlougheed left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

missing a change in icon for the menu when in catalogue mode - the pie chart icon no longer makes sense.

src/js/components/Provenance/Catalogue/Dataset.tsx Outdated Show resolved Hide resolved
src/js/components/Provenance/Catalogue/Dataset.tsx Outdated Show resolved Hide resolved
src/js/components/Provenance/Catalogue/CatalogueCard.tsx Outdated Show resolved Hide resolved
src/js/components/Provenance/Catalogue/CatalogueCard.tsx Outdated Show resolved Hide resolved

export const isoDateToString = (d: string, lang?: string) => {
const dateLang = lang === 'fr' ? 'fr-CA' : 'en-US';
return new Date(d).toLocaleString(dateLang, {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why not use i18n.language (or in this case the lang argument) directly here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I gets accessed before i18n is initialized causing issues.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

but can it be passed into the function elsewhere, thus mitigating the "if french else assume english" extra logic?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can create a utility function for it to separate logic., but I think such logic also exists on the initial render of the website (except there is an extra log statement for saying unsupported language).


const MAX_KEYWORD_CHARACTERS = 50;

const CatalogueCard = ({ project }: { project: Project }) => {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think for consistency this should be called Project. we can then later split it into multiple view modes, like with Dataset.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would rather change, Dataset to CatalogDataset as Dataset/Project by itself can mean multiple things in public context by conflicting with overview. I do understand that it is in a folder but the naming does reduce the readability.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

catalogdataset to me doesn't make sense, as the dataset isn't just used in the catalog

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I mean it in the form that a "Dataset" could mean multiple things while at least prefixing catalog tells the purpose. If you think otherwise still, lmk, I shall change it.

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

Successfully merging this pull request may close these issues.

3 participants