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

Enable StandaloneLink in Actions #758

Merged
merged 29 commits into from
Oct 14, 2022

Conversation

nandereck
Copy link
Contributor

@nandereck nandereck commented Oct 12, 2022

🎟️ Asana Task
πŸ” Preview Link
🎨 Figma


Description

This PR adds support for the StandaloneLink in Actions. The requirements are as follows:

  • Actions supports all of the Button / StandaloneLink combinations in the spec.
  • The first CTA and second CTA are always the primary variation and secondary variation respectively.
  • When both a Button and StandaloneLink render, the StandaloneLink always comes second.
    Addition

The changeset includes the following:

  • Adds StandaloneLink to the render method of Actions
  • Changes the url prop for Actions to href. This was done to match the <a> attribute name.
  • Removes the now cruft variant prop from CTAs in Actions
  • Updates the docs and tests to account for the new variations
  • Updates failing tests for Intro and NextSteps. This occurs due to the change of the url prop to href

Validation Steps

  • Navigate to Actions in the preview
  • Under examples, verify that all of the variations match the Figma (see above)

PR Checklist πŸš€

Items in this checklist may not may not apply to your PR, but please consider each item carefully.

  • Add Asana and Preview links above.
  • Conduct thorough self-review.
  • Add or update tests as appropriate.
  • Conduct reasonable cross browser testing for both compatibility and responsive behavior (We have a Sauce Labs account for this, if you don't have access, just ask!).
  • Conduct reasonable accessibility review (use the WAS as a guide or an axe browser plugin until we establish more formal checks).
  • Identify (in the description above) and document (add Asana tasks on this board) any technical debt that you're aware of, but are not addressing as part of this PR.

@vercel
Copy link

vercel bot commented Oct 12, 2022

The latest updates on your projects. Learn more about Vercel for Git β†—οΈŽ

Name Status Preview Updated
react-components βœ… Ready (Inspect) Visit Preview Oct 14, 2022 at 7:57PM (UTC)

@changeset-bot
Copy link

changeset-bot bot commented Oct 12, 2022

πŸ¦‹ Changeset detected

Latest commit: 7250da9

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 3 packages
Name Type
@hashicorp/react-actions Minor
@hashicorp/react-intro Minor
@hashicorp/react-next-steps Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@nandereck nandereck changed the title Nels/intro/add standalone link support v3 Enable StandaloneLink in Actions Oct 12, 2022
@nandereck nandereck changed the title Enable StandaloneLink in Actions Enable StandaloneLink in Actions (WIP) Oct 12, 2022
@nandereck
Copy link
Contributor Author

@alexcarpenter - WIP PR here. Curious to get your thoughts on this.

I think this hits all the requirements (see the description above), is relatively understandable, and is backwards compatible with the existing Actions component.

There's also a high likelihood that I'm overlooking something important here too πŸ˜… πŸ™ƒ

packages/actions/types.ts Outdated Show resolved Hide resolved
packages/actions/index.tsx Outdated Show resolved Hide resolved
packages/actions/index.tsx Outdated Show resolved Hide resolved
packages/actions/index.tsx Outdated Show resolved Hide resolved
packages/actions/types.ts Outdated Show resolved Hide resolved
packages/actions/types.ts Outdated Show resolved Hide resolved
packages/actions/index.tsx Outdated Show resolved Hide resolved
@nandereck
Copy link
Contributor Author

Cool - @alexcarpenter I think this is ready for re-review.

@github-actions
Copy link
Contributor

github-actions bot commented Oct 13, 2022

πŸ“¦ Canary Packages Published

Latest commit: 7250da9

Published 3 packages

@hashicorp/react-actions@0.4.0-canary-20221014205736

npm install @hashicorp/react-actions@canary

@hashicorp/react-intro@0.5.0-canary-20221014205736

npm install @hashicorp/react-intro@canary

@hashicorp/react-next-steps@0.3.0-canary-20221014205736

npm install @hashicorp/react-next-steps@canary

Copy link
Contributor

@alexcarpenter alexcarpenter left a comment

Choose a reason for hiding this comment

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

LGTM. A couple of little cleanup things we can do before merging.

Update props.js to fix brand -> theme. This was my mistake when initially building this out. and I don't think variant is available on the ctas, its type right?

CleanShot 2022-10-13 at 16 10 43@2x

Copy link
Contributor

@alexcarpenter alexcarpenter left a comment

Choose a reason for hiding this comment

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

LGTM! Nice work. πŸ‘πŸΌ

@nandereck nandereck added release:canary Triggers a canary release for commits to this pull request and removed release:canary Triggers a canary release for commits to this pull request labels Oct 14, 2022
@nandereck nandereck merged commit f464318 into main Oct 14, 2022
@nandereck nandereck deleted the nels/intro/add-standalone-link-support-v3 branch October 14, 2022 21:31
@hashibot-web hashibot-web mentioned this pull request Oct 14, 2022
nandereck pushed a commit that referenced this pull request Oct 14, 2022
This PR was opened by the [Changesets release](https://github.com/changesets/action) GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated.

# Releases
## @hashicorp/react-actions@0.4.0

### Minor Changes

-   [#758](#758) [`f464318c`](f464318) Thanks [@nandereck](https://github.com/nandereck)! - Enables StandaloneLink support in Actions. Updates NextSteps and Intro components to accommodate changes in Actions.

 ## @hashicorp/react-intro@0.5.0

### Minor Changes

-   [#758](#758) [`f464318c`](f464318) Thanks [@nandereck](https://github.com/nandereck)! - Enables StandaloneLink support in Actions. Updates NextSteps and Intro components to accommodate changes in Actions.

### Patch Changes

-   Updated dependencies \[[`f464318c`](f464318)]:
    -   @hashicorp/react-actions@0.4.0

 ## @hashicorp/react-next-steps@0.3.0

### Minor Changes

-   [#758](#758) [`f464318c`](f464318) Thanks [@nandereck](https://github.com/nandereck)! - Enables StandaloneLink support in Actions. Updates NextSteps and Intro components to accommodate changes in Actions.

### Patch Changes

-   Updated dependencies \[[`f464318c`](f464318)]:
    -   @hashicorp/react-actions@0.4.0
    -   @hashicorp/react-intro@0.5.0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release:canary Triggers a canary release for commits to this pull request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants