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

Add disabled and readonly states to star ratings #1861

Closed
wants to merge 12 commits into from

Conversation

MewenLeHo
Copy link
Contributor

@MewenLeHo MewenLeHo commented Feb 27, 2023

Related issues

Closes #1764

Description

Add disabled and readonly state to star ratings.

Types of change

  • New feature (non-breaking change which adds functionality)

Live previews

https://deploy-preview-1861--boosted.netlify.app/docs/5.3/forms/checks-radios/#readonly

https://deploy-preview-1861--boosted.netlify.app/docs/5.3/forms/checks-radios/#disabled

Checklist

Contribution

Accessibility

  • My change follows accessibility good practices; I have at least run axe

Design

  • My change respects the design guidelines defined in Orange Design System
  • My change is compatible with responsive display

Development

  • My change follows the developer guide
  • I have added JavaScript unit tests to cover my changes
  • I have added SCSS unit tests to cover my changes

Documentation

  • My change introduces changes to the documentation and/or I have updated the documentation accordingly

Checklist (for Core Team only)

  • My change introduces changes to the migration guide
  • My new component is added in Storybook
  • My new component is compatible with RTL
  • Manually run BrowserStack tests
  • Manually test browser compatibility with BrowserStack (Chrome >= 60, Firefox >= 60 (+ ESR), Edge, Safari >= 12, iOS Safari, Chrome & Firefox on Android)
  • Code review
  • Design review
  • A11y review

After the merge

@netlify
Copy link

netlify bot commented Feb 27, 2023

Deploy Preview for boosted ready!

Name Link
🔨 Latest commit f8e145d
🔍 Latest deploy log https://app.netlify.com/sites/boosted/deploys/646cdc4bf256b900083e84d3
😎 Deploy Preview https://deploy-preview-1861--boosted.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@MewenLeHo MewenLeHo marked this pull request as draft February 27, 2023 15:27
@MewenLeHo MewenLeHo changed the title Add disabled and readonly state to star ratings Add disabled and readonly states to star ratings Feb 27, 2023
@MewenLeHo
Copy link
Contributor Author

readonly doesn't work on checkboxes as it prevents user from editing a field's value, but with a checkbox you're actually editing the field's state (on || off).

From faqs.org:

@louismaximepiton
Copy link
Member

louismaximepiton commented Mar 21, 2023

Should we try something with the following markup as a structure instead od readonly?

<div class="star-rating">
  <span>...</span>
  <span>...</span>
  <span>...</span>
  <span>...</span>
  <span>...</span>
</div>

@MewenLeHo MewenLeHo marked this pull request as ready for review April 11, 2023 07:41
@MewenLeHo MewenLeHo marked this pull request as draft April 11, 2023 09:07
@sonarcloud
Copy link

sonarcloud bot commented May 23, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@MewenLeHo
Copy link
Contributor Author

Will be completed by PR #2035

@MewenLeHo MewenLeHo closed this May 23, 2023
@julien-deramond julien-deramond deleted the main-mlh-enhance-star-ratings branch July 17, 2024 11:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Development

Successfully merging this pull request may close these issues.

Enhance star ratings with readonly/disabled states
3 participants