The 'responsive' prop on the Button component has no effect
Maintainers usually reply within 1 day
@ashutosh887 is already working on this.
Since Jan 15, 2022.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 45/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Quiet
- Tech stack
- javascript, react
- Domain
- frontend
Research direction
Start in components/button/index.jsx at the responsive prop and compare the current class handling with the referenced commit. Reproduce the issue in the Storybook Button example, then verify that setting responsive changes the small-form-factor width behavior and that leaving it false has no effect.
Written by the indexing model from the issue text.
Description
The Button component has the following prop:
/**
* If true, button scales to 100% width on small form factors.
*/
responsive: PropTypes.bool,
https://github.com/salesforce/design-system-react/blob/master/components/button/index.jsx#L177
This prop does not appear to have any effect when set to true (or false naturally).
This issue is demonstrated on the storybook example:
http://design-system-react-components.herokuapp.com/iframe.html?id=sldsbutton--doc-site-base-neutral&args=&viewMode=story
Looks like at some point the code conditionally adding the class was accidentally left out.
It should probably add the class slds-max-small-size--1-of-1 or some conditional variant of slds-button_stretch. In the past it was slds-max-small-button--stretch - this was removed in this commit https://github.com/salesforce/design-system-react/commit/a796c5b1fe1a967f1427a4fbd3ec4c9710d7592d on 22 Jul 2016:
https://github.com/salesforce/design-system-react/commit/a796c5b1fe1a967f1427a4fbd3ec4c9710d7592d#diff-1beac10e4cb18d36a1e2e3de7103d0f359da4b9b5748c851ce1c8061f1a803aeL143
- Dominant language
- JavaScript
- Stars
- 994
- Forks
- 444
- Avg merge
- 3d 23h
- Merged PRs (30d)
- 44
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from salesforce/design-system-react
-
Difficulty 2/5 1-3 hours Newbie friendliness 42/100
salesforce/design-system-react#3245 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 3/5 1-2 days Newbie friendliness 35/100
salesforce/design-system-react#3174 · 1 comment ·
Maintainers usually reply within 1 day
-
@W-15466811 - Accessibility Issue: Year Combo Box Incorrectly Marked as Read-Only, Affecting Screen Reader UsersMay be free again A pull request for this issue was closed without being merged. Open
Difficulty 2/5 1-3 hours Newbie friendliness 48/100
salesforce/design-system-react#3144 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 4/5 3-5 days Newbie friendliness 25/100
salesforce/design-system-react#3127 · 4 comments ·
Maintainers usually reply within 1 day
-
Difficulty 5/5 Over a week Newbie friendliness 20/100
salesforce/design-system-react#3121 · 2 comments ·
Maintainers usually reply within 1 day
All issues in salesforce/design-system-react
Similar issues
-
verified whatsapp
Difficulty 2/5 1-3 hours Newbie friendliness 77/100
Maintainers usually reply within 6 days
-
Difficulty 1/5 Under an hour Newbie friendliness 83/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
salesforce/sa11y#1022 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
githubnext/gh-aw-workshop#6379 ·
Maintainers usually reply within 1 day
-
FEATURE REQUEST
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
linuxmint/cinnamon-spices-applets#9386 ·
Maintainers usually reply within 1 day