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

Add publication-time block for the Web Components documentation page #491

Merged
merged 7 commits into from
May 2, 2024

Conversation

bdelacretaz
Copy link
Contributor

@bdelacretaz bdelacretaz commented Mar 28, 2024

Add publication-time block

https://main--helix-website--adobe.aem.page/developer/web-components

vs

https://publication-time-block--helix-website--bdelacretaz.hlx.page/developer/web-components

Description

This adds a publication-time block for the upcoming Web Components docs page, using the https://github.com/github/relative-time-element component to display time in a friendly way such as "3 days ago", "18 minutes ago" etc.

It replaces #459, using a Web Component that's actually (somewhat) useful for the website as opposed to a completely distinct example, as discussed with @kptdobe

Related Issue

#457

How Has This Been Tested?

Besides visual testing, the new code is covered by automated tests.

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 (I'm an Adobe employee)
  • 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.

Copy link

aem-code-sync bot commented Mar 28, 2024

Page Scores Audits Google
/developer/web-components PERFORMANCE A11Y SEO BEST PRACTICES SI FCP LCP TBT CLS PSI

@bdelacretaz bdelacretaz marked this pull request as draft March 28, 2024 18:08
@bdelacretaz bdelacretaz marked this pull request as ready for review March 28, 2024 18:29
Copy link
Contributor

@kptdobe kptdobe left a comment

Choose a reason for hiding this comment

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

I definitively prefer this version showcasing a useful web component. Thanks @bdelacretaz.
2 notes in the documentation page:

  • paragraph name should be Publication time instead of publication-time (author friendly)
  • the output of the web component is not visually clear (it uses the same paragraph style). Maybe we can add one variance (block name could become Publication time (highlight)) and the css would "highlight" or "italic" the content of the block.

@bdelacretaz
Copy link
Contributor Author

@kptdobe thank you for your review and suggestion, I have implemented the highlight option as suggested, visible at https://publication-time-block--helix-website--bdelacretaz.hlx.page/developer/web-components

With this, from my point of view this PR is ready for review and merge - or feel free to tweak the CSS if you want something different for the "highlight" CSS.

@kptdobe kptdobe merged commit 4e6fd43 into adobe:main May 2, 2024
4 checks passed
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.

2 participants