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

[feat] interactive states for <rh-tag> #2148

Open
4 tasks
marionnegp opened this issue Jan 28, 2025 · 1 comment
Open
4 tasks

[feat] interactive states for <rh-tag> #2148

marionnegp opened this issue Jan 28, 2025 · 1 comment
Assignees
Labels
feature New feature or request for design Design work is requested needs prioritization This issue needs prioritization

Comments

@marionnegp
Copy link
Collaborator

marionnegp commented Jan 28, 2025

Description

Docs for the linked <rh-tag> show states for linked tags, but they have to be implemented.

We also need to consider instances where <rh-tag> acts as a button, and we may need to show a different affordance for interactivity. (For example, a tag in My Red Hat can trigger a popover.) PatternFly's tag demos currently show clickable tags and linked tags that use the same states.

Additional updates:

  • When tag is used as a button, a space bar should be able to trigger it. Currently it's trigger by the enter key only.

Suggested solution

  • Implement states for linked tags
  • Design clickable tag states
  • Make demos for linked tags and clickable tags (Currently linked tags are only shown in the color context demo.)
  • Fix keyboard interactivity if it's used as a button

Screenshots

No response

Example API

Additional context

No response

@marionnegp marionnegp added feature New feature or request for design Design work is requested needs prioritization This issue needs prioritization labels Jan 28, 2025
@markcaron
Copy link
Collaborator

markcaron commented Jan 28, 2025

Since we currently have linkable <rh-tag> elements, I'm thinking it wouldn't be a stretch to provide the option for clickable through a similar approach.

Linkable:

<rh-tag href="#">

Clickable:

<rh-tag action="{namedAction}">

Where {namedAction} could be a string like popovertarget="popoverID"

And, in the template, we'd just embed a <button popovertarget="popoverID"> instead of <a href="#">.

Or maybe click="" makes more sense?

The attributes would be an either-or situation, as you couldn't have both at the same time. One would take precedence.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request for design Design work is requested needs prioritization This issue needs prioritization
Projects
Status: Backlog
Development

No branches or pull requests

3 participants