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

ServiceButton Component Creation #290

Open
wants to merge 33 commits into
base: dev
Choose a base branch
from
Open

ServiceButton Component Creation #290

wants to merge 33 commits into from

Conversation

sreidthomas
Copy link
Contributor

@sreidthomas sreidthomas commented Feb 12, 2025

Mobile

Image

Desktop

Image

Requirements

  • Minimum width of the component should be 340px.
  • Transition between hover states should be a 200ms ease-in-out transition.
  • The spirit SVG in the hovered state is here: Detroit Spirit
  • The title and subtitle of the button should be slotted elements, however they need to be tightly controlled.
  • use the slotchange event to strip away any HTML tags the user may have placed in the slot and just take the text content.

BUTTON WITHOUT HOVER:

image
image
image

BUTTON WITH HOVER:

image
image
image

ADD TESTS FOR COMPONENT

  • Test for title and subtitle:
    Verify that the title text is rendered correctly
    Verify that the subtitle text is rendered correctly
  • Test for hover:
    Verify that the button changes color on hover
    Check that the overlay effect appears on hover
  • [ ]Test for hover with SVG:
    Verify that the SVG appears on hover
    Check that the SVG is positioned correctly (bottom right)

TEST RESULTS:

image

image

@maxatdetroit maxatdetroit linked an issue Feb 17, 2025 that may be closed by this pull request
Copy link
Member

@maxatdetroit maxatdetroit left a comment

Choose a reason for hiding this comment

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

This is definitely on the right track. We're going to have to think about how to handle accessibility requirements (e.g. aria attributes) inside the component, so feel free to think about that yourself as you're revising this PR. I'll also review for accessibility when I come back on the next PR review.

@sreidthomas
Copy link
Contributor Author

I kept having issues with the other 2 tests I had. Do you have any test ideas? I was trying mock click, which kept clicking the button and sending it to the dummy link whenever I opened Storybook. And the other was check for something other than span it kept changing the layout of the component: @maxatdetroit
test4results

Copy link
Member

@maxatdetroit maxatdetroit left a comment

Choose a reason for hiding this comment

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

This is pretty close to done but needs a few tweaks.

@sreidthomas sreidthomas requested a review from maxatdetroit March 5, 2025 18:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Create service button component
2 participants