-
Notifications
You must be signed in to change notification settings - Fork 982
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
Experiment-driven Update: Quicklinks in header #6178
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Hi @runleonarun 👋 Quick question for you – this PR implements the values we used in the previous experiment that added the ability to filter via buttons in the Guides page hero. Since we’re not currently running that experiment, would you prefer I:
Let me know which you prefer! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Really digging this feature! Just have one note on how URLs should be handled when trying to link to from the CTAs
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm!! 🚢
// The value of the tag must match a tag in the frontmatter of the guides in order for the filter to apply after clicking | ||
const heroCTAs = [ | ||
{ | ||
title: 'Quickstart Guides', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sugg sentence case
title: 'Quickstart Guides', | |
title: 'Quickstart guides', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm!
What are you changing in this pull request and why?
This pull request adds support for dynamic CTAs in the Guides hero component, extending functionality introduced during this experiment experiment.
The updated component allows either CTAs that are added to include a link or (in the case of the experiment) an on click event. For this version the on click applies a filter to the guides in the same manner as the experiment.
Key Changes:
Preview Link
https://docs-getdbt-com-git-experiment-apply-quicklink-hero-dbt-labs.vercel.app/guides
How to Use the Updated Guides Hero Component
To use the new CTA functionality, follow these steps:
Locate the
heroCTAs
Array:quickstartGuideList/index.js
file, you will find aheroCTAs
array.title
: This will be the displayed text of the CTA.value
: This corresponds to the URL query parameter that will be appended when the CTA is clicked, applying the filter.Ensure Proper
value
Mapping:value
property must match an existing tag in the Topic dropdown for the filter to work correctly.value
is passed as a query parameter, filtering the guides in the same way as manually selecting the topic from the filter dropdown.Example using
onClick
:Example using
href
:Why this change?
This update enhances the flexibility of the Guides hero component, allowing for more interactive CTAs that either navigate users to external pages or trigger in-page filtering, improving the overall UX based on lessons learned from the experiment.
Before merging