Skip to content

chore(docs): add click blocker on stories #5492

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

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

Conversation

leagrdv
Copy link
Contributor

@leagrdv leagrdv commented May 14, 2025

📄 Description

A few stories in the documentation had a click blocker on the links. I've created a common click blocker decorator and added it were needed for consistency.

🚀 Demo

If applicable, please add a screenshot or video to illustrate the changes.


📝 Checklist

  • ✅ My code follows the style guidelines of this project
  • 🛠️ I have performed a self-review of my own code
  • 📄 I have made corresponding changes to the documentation
  • ⚠️ My changes generate no new warnings or errors
  • 🧪 I have added tests that prove my fix is effective or that my feature works
  • ✔️ New and existing unit tests pass locally with my changes

@leagrdv leagrdv requested review from a team as code owners May 14, 2025 14:54
@leagrdv leagrdv requested a review from alizedebray May 14, 2025 14:54
@swisspost-bot
Copy link
Contributor

swisspost-bot commented May 14, 2025

Related Previews

Copy link
Contributor

@alionazherdetska alionazherdetska left a comment

Choose a reason for hiding this comment

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

There are still clickable links that aren't covered by the current implementation:

  1. card.stories.ts - <p><a href="http://google.com">Interactive card</a></p>
  2. teaser.stories.ts - <a href="#" class="btn btn-tertiary px-0">Button label <post-icon name="arrowright"></post-icon></a>
  3. popover.stories.ts - <a href="#">Links</a>

@alionazherdetska
Copy link
Contributor

alionazherdetska commented May 15, 2025

Posssible suggestion: add click blocker for typography stories

Currently, typography.blocks.tsx (https://github.com/swisspost/design-system/blob/main/packages/documentation/src/stories/foundations/typography/typography.blocks.tsx), implements click prevention on placeholder links individually via:

onClick={e => e.preventDefault()}

@alionazherdetska alionazherdetska removed the request for review from alizedebray May 15, 2025 14:40
Copy link

changeset-bot bot commented May 16, 2025

🦋 Changeset detected

Latest commit: ffad0b9

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@swisspost/design-system-documentation Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

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