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

fix: add metadata to side-navigation on charm details page #1843

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

Conversation

chillkang
Copy link
Contributor

@chillkang chillkang commented Jun 6, 2024

Done

  • Added Charm details section to include charm repository, charm product page, and juju version from metadata.yaml
  • Added Contacts section to include maintainers and submit a bug link from metadata.yaml
  • For charm product page, only include the first link and do not show the link staring with https://charmhub.io

How to QA

Testing

  • This PR has tests
  • No testing required (explain why):

Issue / Card

Fixes https://warthogs.atlassian.net/browse/WD-10007
Fixes https://warthogs.atlassian.net/browse/WD-10933
Fixes https://warthogs.atlassian.net/browse/WD-10934
Fixes https://warthogs.atlassian.net/browse/WD-10935
Fixes https://warthogs.atlassian.net/browse/WD-10936
Fixes https://warthogs.atlassian.net/browse/WD-10937

Screenshots

Screenshot 2024-06-20 at 2 34 36 PM

@webteam-app
Copy link

@chillkang chillkang marked this pull request as ready for review June 6, 2024 16:00
Copy link
Contributor

@steverydz steverydz left a comment

Choose a reason for hiding this comment

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

LGTM 👍

@lukasSerelis
Copy link

lukasSerelis commented Jun 13, 2024

Looks good, but specific example you've given here shows an issues with this. The product site is meant to be used for charms that have product pages outside of charmhub, like mySQL. (Product page for MySQL).

In most cases website is just the link to charm, which is useful in github docs, but less useful as a link within charmhub. If possible, if the product link could only be shown if it's not a link to charm in charmhub would be ideal. Not sure how possible, but would be much preferred.

Other than that all look really good!

@Lukewh
Copy link
Contributor

Lukewh commented Jun 13, 2024

I'm going to say the same thing. From what I understand the "product page" is meant to be a single link. But for https://charmhub-io-1843.demos.haus/mysql for example, there's a list with no way to discern what each link will do. I'm not sure how the design handles multiple links, or how we would differentiate between the upstream product page and a general link?
In snapcraft we split it up into different link types: https://snapcraft.io/lukewh-test

@lukasSerelis
Copy link

We could have multiple solutions for this.

  1. Either just display links that aren't labeled the way snapcraft does it (just show the domain and add to other links section)
  2. Or force a stricter structure on metadata.yaml/charmcraft.yaml where each link if named (like Charm repository, charm product page, etc.) has to be written in the correct format to be displayed, otherwise it won't be shown
  3. 2nd option but add other links section for every link that isn't following the preset links.

Happy to discuss, but need to make a decision on this before moving forwards

@chillkang
Copy link
Contributor Author

We could have multiple solutions for this.

  1. Either just display links that aren't labeled the way snapcraft does it (just show the domain and add to other links section)
  2. Or force a stricter structure on metadata.yaml/charmcraft.yaml where each link if named (like Charm repository, charm product page, etc.) has to be written in the correct format to be displayed, otherwise it won't be shown
  3. 2nd option but add other links section for every link that isn't following the preset links.

Happy to discuss, but need to make a decision on this before moving forwards

@lukasSerelis I'm happy with either option and let's discuss this next Monday :)

<li class="p-list__item"><a href="mailto:{{ contact.email }}"><i class="p-icon--user-grey"></i>&nbsp;&nbsp;{{ contact.name }}</a></li>
{% endfor %}
</ul>
{% elif package["store_front"]["metadata"]["maintainers"] %}
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm not sure this should be an else if - @lukasSerelis wdyt? Should we be showing both official contact details AND maintainers? Or one or the other? I would have thought both as the main contact may be "Canonical Data Team" but the maintainers could be multiple individuals?

Choose a reason for hiding this comment

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

The end user just cares to find out where to get help/give suggestions/contribute, so as long as there are relevant contact details it shouldn't matter too much what we display.

That being said, adding more contact details than necessary might not make it clear who to contact first, making it more difficult than we think. I'd say the elif here is justified in that case.

Copy link
Contributor

@Lukewh Lukewh left a comment

Choose a reason for hiding this comment

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

👍 LGTM, just one question that I'd like @lukasSerelis's opinion on!

@lukasSerelis
Copy link

lukasSerelis commented Jun 19, 2024

We've discussed how to deal with the multi link situation and this is where we've left it:

  • Don't read all the links in websites:, displaying multiple product links makes no sense, and trying to make sense of which link is what sounds like a job for the charmcraft.yaml spec to standardize more.
  • Just check the first link under websites: and display that as product page, as in most cases this is where the product page should live
  • I've came back from this point, do check if the first link under websites: isn't a charmcraft.io link, and if it is, don't show it. We just need to be diligent that this is a temporary fix, and we are not going to forever try to make sense of inconsistent .yaml files. This check should be removed once we get some more movement on charmers using the proposed charmcraft.yaml template.
  • For a different task, I'll make a new card of what to do with all the other unused links. Now this seems out of scope.

@lukasSerelis
Copy link

There's a small UI issue here as well, where the space between icon and text isn't margin or padding, it's just to spaces. This is the spacing that should be followed
image

@lukasSerelis
Copy link

For whatever reason pgbouncer charm has a product link as first link in websites: also has a source: but show the github link as the product page link and no source link at all

https://charmhub-io-1843.demos.haus/pgbouncer
image

@chillkang
Copy link
Contributor Author

For whatever reason pgbouncer charm has a product link as first link in websites: also has a source: but show the github link as the product page link and no source link at all

https://charmhub-io-1843.demos.haus/pgbouncer image

You found the outlier! This is the metadata I'm getting so I'll dig into this issue.

@lukasSerelis
Copy link

Another one that follows the same mistake: https://charmhub-io-1843.demos.haus/kafka-k8s

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants