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

Make quickstart functionality available outside cards #3804

Merged

Conversation

Gkrumbach07
Copy link
Member

https://issues.redhat.com/browse/RHOAIENG-20532

Description

This PR adds a useQuickStart hook that extracts the quickstart launch functionality from cards into a reusable hook. This allows any component to trigger quickstarts without being tied to card components.

Key changes:

  • Adds new useQuickStart hook that provides:
    • launchQuickStart method to trigger quickstarts
    • Access to quickstart context values
  • Uses existing launchQuickStartUtil under the hood
  • Small, focused change to improve reusability
  • No changes to existing quickstart behavior

How Has This Been Tested?

  1. Go to any component that needs quickstart functionality
  2. Add the hook:
    const { launchQuickStart } = useQuickStart();
  3. Add a trigger (e.g. button):
    <Button onClick={() => launchQuickStart('create-jupyter-notebook')}>
      Launch Tutorial
    </Button>
  4. Verify the quickstart launches and works as expected
  5. Verify it works the same as the existing card-based quickstart launches

Test Impact

none, just extracts functionality into hook

Request review criteria:

Self checklist (all need to be checked):

  • The developer has manually tested the changes and verified that the changes work
  • Testing instructions have been added in the PR body (for PRs involving changes that are not immediately obvious).
  • The developer has added tests or explained why testing cannot be added (unit or cypress tests for related changes)

If you have UI changes:

  • Included any necessary screenshots or gifs if it was a UI change.
  • Included tags to the UX team if it was a UI/UX change.

After the PR is posted & before it merges:

  • The developer has tested their solution on a cluster by using the image produced by the PR to main

@openshift-ci openshift-ci bot requested review from dpanshug and mturley February 25, 2025 22:18
Copy link

codecov bot commented Feb 25, 2025

Codecov Report

Attention: Patch coverage is 0% with 6 lines in your changes missing coverage. Please review.

Project coverage is 84.66%. Comparing base (7a07b89) to head (a42c35f).
Report is 6 commits behind head on main.

Files with missing lines Patch % Lines
frontend/src/utilities/useQuickStart.ts 0.00% 6 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #3804      +/-   ##
==========================================
+ Coverage   84.62%   84.66%   +0.04%     
==========================================
  Files        1517     1518       +1     
  Lines       35128    35140      +12     
  Branches     9829     9836       +7     
==========================================
+ Hits        29728    29753      +25     
+ Misses       5400     5387      -13     
Files with missing lines Coverage Δ
frontend/src/utilities/useQuickStart.ts 0.00% <0.00%> (ø)

... and 14 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 7a07b89...a42c35f. Read the comment docs.

Copy link
Contributor

@dpanshug dpanshug left a comment

Choose a reason for hiding this comment

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

/lgtm

@Gkrumbach07
Copy link
Member Author

/approve

Copy link
Contributor

openshift-ci bot commented Feb 26, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: dpanshug, Gkrumbach07

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-merge-bot openshift-merge-bot bot merged commit 652b75c into opendatahub-io:main Feb 26, 2025
30 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants