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

[ResourceItem] Add dataHref prop #3975

Merged
merged 2 commits into from
Feb 4, 2021
Merged

Conversation

iamkahvi
Copy link

@iamkahvi iamkahvi commented Feb 4, 2021

WHY are these changes introduced?

To enable prefetching when a user hovers over the ResourceItem through a data-href attribute on the parent li tag.

Fixes https://github.com/Shopify/marketing-technology/issues/6390. Also referenced here @billycai

WHAT is this pull request doing?

Adds the dataHref prop to ResourceItem. If a string is provided, the main li tag will render a data-href attribute. Also adds two tests to check functionality.

@ghost
Copy link

ghost commented Feb 4, 2021

👋 Thanks for opening your first pull request. A contributor should give feedback soon. If you haven’t already, please check out the contributing guidelines.

@github-actions
Copy link
Contributor

github-actions bot commented Feb 4, 2021

🟢 This pull request modifies 2 files and might impact 1 other files.

Details:
All files potentially affected (total: 1)
🧩 src/components/ResourceItem/ResourceItem.tsx (total: 1)

Files potentially affected (total: 1)

🧩 src/components/ResourceItem/tests/ResourceItem.test.tsx (total: 0)

Files potentially affected (total: 0)

@iamkahvi iamkahvi added the 🤖Skip Changelog Causes CI to ignore changelog update check. label Feb 4, 2021
@iamkahvi iamkahvi merged commit f27f053 into main Feb 4, 2021
@iamkahvi iamkahvi deleted the add-datahref-to-resourceitem branch February 4, 2021 23:54
@ghost
Copy link

ghost commented Feb 4, 2021

🎉 Thanks for your contribution to Polaris React!

sylvhama pushed a commit that referenced this pull request Mar 26, 2021
* Adding dataHref prop to ResourceItem and updating tests

* Updating test
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🤖Skip Changelog Causes CI to ignore changelog update check.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants