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

fix(Button): remove button as default role #2876

Merged
merged 4 commits into from
May 13, 2024
Merged

fix(Button): remove button as default role #2876

merged 4 commits into from
May 13, 2024

Conversation

dreamwasp
Copy link
Contributor

@dreamwasp dreamwasp commented May 10, 2024

Overview

Remove unnecessary button default role

Pointed out here

PR Checklist

  • Related to designs:
  • Related to JIRA ticket: [ABC-123]
  • I have run this code to verify it works
  • This PR includes unit tests for the code change
  • This PR includes testing instructions tests for the code change
  • The alpha package of this PR is passing end-to-end tests in all relevant Codecademy repositories

Testing Instructions

  1. Checkout the button storybook
  2. They should still look like buttons and not have an additional "button" role

PR Links and Envs

Repository PR Link PR Env
Monorepo Monorepo PR Monolith Env

@dreamwasp dreamwasp marked this pull request as ready for review May 13, 2024 18:22
@dreamwasp dreamwasp requested a review from a team as a code owner May 13, 2024 18:22
Copy link
Contributor

@LinKCoding LinKCoding left a comment

Choose a reason for hiding this comment

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

lgtm! no longer seeing role="button" for the buttons rendered in SB :)
I had some questions about the test, but more so to learn and not blockers.


describe('when the button is disabled', () => {
it('does not render the href attribute and renders a button', () => {
const buttonText = 'Submit';
Copy link
Contributor

Choose a reason for hiding this comment

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

does this need to be set again? doesn't it have access to buttonText in line 5?

});

it('renders the disabled attribute on button tags', () => {
const buttonText = 'Submit';
Copy link
Contributor

Choose a reason for hiding this comment

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

same Q here about setting buttonText

@codecademydev
Copy link
Collaborator

📬Published Alpha Packages:

@codecademy/[email protected]
@codecademy/[email protected]
@codecademy/[email protected]

@codecademydev
Copy link
Collaborator

🚀 Styleguide deploy preview ready!

https://66426c0ee94e371cdda9027a--gamut-preview.netlify.app

Deploy Logs

@dreamwasp dreamwasp added the Ship It :shipit: Automerge this PR when possible label May 13, 2024
@codecademydev codecademydev merged commit 3a66628 into main May 13, 2024
17 of 18 checks passed
@codecademydev codecademydev deleted the cass-gm-752 branch May 13, 2024 19:41
@codecademydev codecademydev removed the Ship It :shipit: Automerge this PR when possible label May 13, 2024
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.

3 participants