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

[Datahub] Rework the metadata content page #575

Closed
wants to merge 9 commits into from
Closed

Conversation

f-necas
Copy link
Collaborator

@f-necas f-necas commented Aug 11, 2023

PR is intented to add some UI improvements for records. It adds :

  • More contact information (location, phone)
  • Record thumbnail on each records with a lightbox
  • Record status information on search page and record page

Funded by SwissTopo geocat.ch

Peek 2023-08-16 08-45

@github-actions
Copy link
Contributor

github-actions bot commented Aug 11, 2023

Affected libs: feature-catalog, feature-search, feature-record, feature-router, feature-map, feature-dataviz, ui-elements, ui-catalog, ui-search, util-shared, feature-auth, ui-widgets, feature-editor, ui-inputs, ui-map, api-metadata-converter, data-access-datafeeder, util-data-fetcher, data-access-gn4, util-app-config, util-i18n, ui-dataviz, util-types, ui-layout,
Affected apps: datahub, metadata-editor, demo, webcomponents, search, map-viewer, metadata-converter, datafeeder, data-platform,

  • 🚀 Build and deploy storybook and demo on GitHub Pages
  • 📦 Build and push affected docker images

@coveralls
Copy link

coveralls commented Aug 11, 2023

Coverage Status

coverage: 84.033% (+0.009%) from 84.024% when pulling 15d9958 on ui-improvements into 616ce22 on main.

@Angi-Kinas
Copy link
Collaborator

I think it might be easier to see the changes if there is a screenshot. Could you add one of this section? :)

Copy link
Collaborator

@Angi-Kinas Angi-Kinas left a comment

Choose a reason for hiding this comment

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

Well done :) ! It looks really nice on the screen record. And thanks for including that into the PR!
I added some comments, mostly things that I don't know about. We can also have a call about it.

addTranslation.sh Outdated Show resolved Hide resolved
Copy link
Collaborator

@Angi-Kinas Angi-Kinas left a comment

Choose a reason for hiding this comment

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

LGTM! :-)
Thanks for addressing my comments! I'm leaving you another comment, but that's optional.

Copy link
Member

@fgravin fgravin left a comment

Choose a reason for hiding this comment

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

Thanks @f-necas

I compared to the mockup and many things remain different:

  • height/ratio of the image
  • button hover background
  • top margin of the 'contact' label
  • the contact information font size is too big
  • the contact logo too big
  • the "contact" label, should it be "owner" instead ? idk

I am really not a big fan of the status badge, and I don't think that other people would want it, it's geocat specific. BTW the text is not vertically aligned. I will talked with Lucile and customers about that.

Thanks for the PR though, it's just like we should not tweak too much the metadata presentation for the sake of geocat, to me all of this just bring noise into the view... anyway

<div class="relative">
<gn-ui-button
class="absolute bottom-2 right-2"
[type]="'outline'"
Copy link
Member

Choose a reason for hiding this comment

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

probably wrong type compare to the mockup (should be secondary bg).

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

https://geonetwork.github.io/geonetwork-ui/main/storybook/demo/?path=/story/inputs-buttoncomponent--primary&args=type:secondary

Out of our 'default' buttons. In this case, is it better to follow the mockup or to implement one of our button ?

Copy link
Member

Choose a reason for hiding this comment

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

You are right, and I think we need more convention about button styling. We should not have so many different button types...
Anyway, I think that gnui-btn should be replaced by a TW component, keep it like this we'll talk about that later, thanks.

Copy link
Collaborator

@jahow jahow Aug 22, 2023

Choose a reason for hiding this comment

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

we can simply add a new button type, like outline-secondary. I think it was the right choice to use the gn-ui-button component, our strategy is to rely as much as possible on reusable low-level presentation components to avoid having too many TW classes in the HTML.

Copy link
Member

Choose a reason for hiding this comment

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

I do prefer

<button class="btn-secondary"> over <gnui-button type="secondary">, which just manages CSS.
It might be a matter of taste, but TW component is

  • no code
  • no maintenance
  • easily overridden in the app

Copy link
Member

Choose a reason for hiding this comment

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

You can do the same with pure css, don't you ?
It was my call by talking about "TW components".
Maybe we should keep the gnui-button and handle the css with TW component within the component CSS instead of from the javascript.
It's not a priority though...

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

As far as I know, you can't for @apply.
And for sure, you cannot do nested classes, which is quite useful.

Copy link
Member

Choose a reason for hiding this comment

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

This is what I tested in button.component.css

.btn-text-white {
  @apply text-white hover:text-primary-lighter;
}
.btn-text-white-a {
  @apply btn-text-white;
}

Copy link
Collaborator Author

@f-necas f-necas Aug 22, 2023

Choose a reason for hiding this comment

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

Strange, we must have something else which preprocess our css ?
https://caniuse.com/sr_css-apply

Not even in mozilla doc : https://developer.mozilla.org/en-US/docs/Web/CSS/At-rule

Copy link
Member

Choose a reason for hiding this comment

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

@fgravin fgravin changed the title UI improvements [datahub] Metadata content Sep 10, 2023
@jahow jahow added the on hold Work has been temporarily halted label Nov 3, 2023
@fgravin fgravin changed the title [datahub] Metadata content [SwissTopo] [Datahub] Rework the metadata content page Dec 12, 2023
@fgravin fgravin changed the title [SwissTopo] [Datahub] Rework the metadata content page [Datahub] Rework the metadata content page Dec 14, 2023
@f-necas
Copy link
Collaborator Author

f-necas commented Jan 9, 2024

Close it, as it is outdated and will be reworked.

@f-necas f-necas closed this Jan 9, 2024
@jahow jahow deleted the ui-improvements branch October 4, 2024 11:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
on hold Work has been temporarily halted
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants