Skip to content

feat: Add href to action card#4682

Draft
SpyZzey wants to merge 3 commits into
mainfrom
feat/href-in-action-card
Draft

feat: Add href to action card#4682
SpyZzey wants to merge 3 commits into
mainfrom
feat/href-in-action-card

Conversation

@SpyZzey

@SpyZzey SpyZzey commented Jul 1, 2026

Copy link
Copy Markdown
Member

Description

Adds href to the action card.

Related links, issue #, if available: cvz6736uKl03

How has this been tested?

Review checklist

The following items are to be evaluated by the author(s) and the reviewer(s).

Correctness

  • Changes include appropriate documentation updates.
  • Changes are backward-compatible if not indicated, see CONTRIBUTING.md.
  • Changes do not include unsupported browser features, see CONTRIBUTING.md.
  • Changes were manually tested for accessibility, see accessibility guidelines.

Security

Testing

  • Changes are covered with new/existing unit tests?
  • Changes are covered with new/existing integration tests?

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@SpyZzey SpyZzey requested a review from a team as a code owner July 1, 2026 12:54
@SpyZzey SpyZzey requested review from georgylobko and removed request for a team July 1, 2026 12:54
@SpyZzey SpyZzey removed the request for review from georgylobko July 1, 2026 13:11
@SpyZzey SpyZzey marked this pull request as draft July 1, 2026 13:11
@SpyZzey SpyZzey changed the title Feat/href in action card feat: Add href to action card Jul 1, 2026
const wrapper = renderActionCard({ header: 'Header', href: '#test', disabled: true });
const anchor = wrapper.getElement().querySelector('a')!;
expect(anchor).not.toHaveAttribute('href');
expect(anchor).toHaveAttribute('aria-disabled', 'true');

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I'd suggest to add a check for the button element here

) => {
const baseProps = getBaseProps(rest);
const buttonRef = useRef<HTMLButtonElement>(null);
const buttonRef = useRef<HTMLElement>(null);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I'd suggest to introduce a more strict type here, like HTMLButtonElement | HTMLAnchorElement and rename the variable to smth like containerRef

}

const handleButtonClick = (event: React.MouseEvent<HTMLButtonElement>) => {
const handleButtonClick = (event: React.MouseEvent<HTMLElement>) => {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Same here - more strict type

@codecov

codecov Bot commented Jul 1, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 97.57%. Comparing base (92c5d7e) to head (949bf92).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #4682   +/-   ##
=======================================
  Coverage   97.57%   97.57%           
=======================================
  Files         948      948           
  Lines       30496    30508   +12     
  Branches    11155    11160    +5     
=======================================
+ Hits        29756    29768   +12     
  Misses        733      733           
  Partials        7        7           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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