Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@asthabh23
Copy link
Member

Description

This PR introduces description as part of library metadata for blocks present in block library.
This is based on ask from a customer where they are looking for a detailed description of what the block does and how to use it. An info icon is added next to the block and its variant name. When the icon is hovered over, the description of the block is visible.

Related Issue

#534

Motivation and Context

This solves a customer usecase and would also be useful for any future customer / other projects in DA where blocks need a description for easy of authoring and usage of blocks

How Has This Been Tested?

https://main--da-live--asthabh23.aem.page/edit#/audemars-piguet/arbres-fondationsaudemarspiguet/drafts/astha/library-test
vs
https://i534--da-live--asthabh23.aem.page/edit#/audemars-piguet/arbres-fondationsaudemarspiguet/drafts/astha/library-test

Screenshots (if appropriate):

Screenshot 2025-08-28 at 19 56 02

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • I have signed the Adobe Open Source CLA.
  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@aem-code-sync
Copy link

aem-code-sync bot commented Aug 28, 2025

Page Scores Audits Google
📱 /edit PERFORMANCE A11Y SEO BEST PRACTICES SI FCP LCP TBT CLS PSI
🖥️ /edit PERFORMANCE A11Y SEO BEST PRACTICES SI FCP LCP TBT CLS PSI

if (block.nextElementSibling?.classList.contains('library-metadata')) {
const md = getMetadata(block.nextElementSibling);
item.tags = md?.searchtags?.text || '';
item.tags = md?.searchtags?.text || md?.description?.text || '';
Copy link
Contributor

Choose a reason for hiding this comment

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

Instead of re-using item.tags should this better be its own field like item.description?

Copy link
Member Author

Choose a reason for hiding this comment

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

sure @mhaack , this is addressed in a60e7f7

@auniverseaway
Copy link
Member

This isn't ideal from a user experience perspective, but I think we leave this as is.

The tooltip shows on hover, but the way its designed implies that you can click it. I like the entire item being the clickable element, but we should probably revisit this now that we have this other icon.

I'm not a fan of the tooltip poking outside the bounds of palette, but there is precedent for this. I don't have a good enough sense of how much content there is... and I want to say sidekick library allows HTML. I also don't have a better idea for this right now... so, tooltip it is. 😄

This is also going to be visually noisy now when #512 ships.

The other thing I saw is that because the tooltip is set to fixed and does not have inset / left / right / top / bottom, you get arbitrary locations of where it shows. Screenshots below.

Last,

Screenshot 2025-08-29 at 6 30 59 AM Screenshot 2025-08-29 at 6 31 08 AM

@auniverseaway auniverseaway merged commit a2f3252 into adobe:main Aug 29, 2025
4 of 5 checks passed
@asthabh23
Copy link
Member Author

Hi @auniverseaway , I just saw your comment above and wanted to share that the alignment issue has already been fixed in #557 . Now it's well within the palette boundaries .

Around tooltip, my consideration mainly was the limited space in the palette so having it as a tooltip made sense currently :)
I am open to further suggestions on placing the description. Just wanted to share that with the updated fix , I showcased it to the customer and they are happy with the experience.
Added comment on the other PR as well which fixes the alignment issue.
Please let me know your thoughts on 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