-
Notifications
You must be signed in to change notification settings - Fork 1
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
base: main
Are you sure you want to change the base?
Dataset Catalog #225
Conversation
There was a problem hiding this 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/CatalogueCarouselDataset.tsx
Outdated
Show resolved
Hide resolved
src/js/components/Provenance/Catalogue/CatalogueCarouselDataset.tsx
Outdated
Show resolved
Hide resolved
src/js/components/Provenance/Catalogue/CatalogueCarouselDataset.tsx
Outdated
Show resolved
Hide resolved
There was a problem hiding this 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.
There was a problem hiding this 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.
|
||
export const isoDateToString = (d: string, lang?: string) => { | ||
const dateLang = lang === 'fr' ? 'fr-CA' : 'en-US'; | ||
return new Date(d).toLocaleString(dateLang, { |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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 }) => { |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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.
# Conflicts: # src/js/components/Overview/PublicOverview.tsx # src/public/locales/en/default_translation_en.json # src/public/locales/fr/default_translation_fr.json
Added a dataset catalog which is displayed in the overview tab when no project is selected