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

fix(ktabs): allow tab anchors to be links [KHCP-13866] #2532

Merged
merged 5 commits into from
Dec 3, 2024

Conversation

portikM
Copy link
Member

@portikM portikM commented Nov 29, 2024

Summary

Addresses: https://konghq.atlassian.net/browse/KHCP-13866

Add to property in Tab interface to support rendering tabs as links

@portikM portikM self-assigned this Nov 29, 2024
Copy link

netlify bot commented Nov 29, 2024

Deploy Preview for kongponents-sandbox ready!

Name Link
🔨 Latest commit 3cde525
🔍 Latest deploy log https://app.netlify.com/sites/kongponents-sandbox/deploys/674f52053b0aa70008ff515d
😎 Deploy Preview https://deploy-preview-2532--kongponents-sandbox.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

netlify bot commented Nov 29, 2024

Deploy Preview for kongponents ready!

Name Link
🔨 Latest commit 3cde525
🔍 Latest deploy log https://app.netlify.com/sites/kongponents/deploys/674f5205c7938e0008fecb06
😎 Deploy Preview https://deploy-preview-2532--kongponents.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@adamdehaven adamdehaven dismissed their stale review December 2, 2024 16:22

unblocking

@portikM portikM enabled auto-merge (squash) December 3, 2024 17:06
Comment on lines 271 to 273
## Usage

### Tab links
Copy link
Member

Choose a reason for hiding this comment

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

I'm not sure I understand the new "Usage" section here -- can we just document "Tabs as Links" under the Props instead (above the Slots section)

Copy link
Member Author

Choose a reason for hiding this comment

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

Done. Made it a subheading under tabs prop since it mostly relates to that prop

Copy link
Member Author

Choose a reason for hiding this comment

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

@portikM portikM merged commit cdf5caa into main Dec 3, 2024
11 checks passed
@portikM portikM deleted the fix/khcp-13866-ktabs-links branch December 3, 2024 20:14
kongponents-bot pushed a commit that referenced this pull request Dec 3, 2024
## [9.14.18](v9.14.17...v9.14.18) (2024-12-03)

### Bug Fixes

* **ktabs:** allow tab anchors to be links [KHCP-13866] ([#2532](#2532)) ([cdf5caa](cdf5caa))
@kongponents-bot
Copy link
Collaborator

🎉 This PR is included in version 9.14.18 🎉

The release is available on:

Your semantic-release bot 📦🚀

johncowen added a commit to kumahq/kuma-gui that referenced this pull request Jan 30, 2025
Several people have reported issue with being able to click on our tab
component i.e. you have to click exactly on the text instead of being
able to click on the entire button.

A recent kongponent update
(Kong/kongponents#2532) changed the padding of
certain HTML elements, which removed the padding from our anchor links
and added it to the surrounding div instead, meaning whilst it looked
like you could click on the entire button to click the anchor, you where
actually clicking the div, meaning the anchor wasn't navigating.

Also see
https://github.com/Kong/kongponents/pull/2532/files#diff-01f83cc2092a263bfd47c1d0a4ba5e96dea98264d85282662a63f4fa18c44dedR177

This PR rearranges the padding using some overwrites to return the
anchor its previous padded state.

There is still a little unclickable area between the button and the
bottom border, but I think this is intentional form the kongponents
authors. The additional difference with this area is that at least you
don't see a pointer cursor when hovering over it.

Signed-off-by: John Cowen <john.cowen@konghq.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants