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(sbb-select): select shows selected value in form field instead of the label #1843

Conversation

DavideMininni-Fincons
Copy link
Contributor

@DavideMininni-Fincons DavideMininni-Fincons commented Jun 28, 2023

Preflight Checklist

Issue

This PR Closes #1827

Pull request checklist

Please check if your PR fulfills the following requirements:

  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been reviewed and added / updated if needed (for bug fixes / features)

See Review Guidelines for more information what is checked during review process.

Changes

Changes in this pull request:

  • the @Watch('selected') on the sbb-option has been removed to avoid infinite loops;
  • the selectionChange event is triggered only in user interaction cases;
  • the @Watch('value') on sbb-select now looks on values on the sbb-options to display the correct label;
  • a new public @Method has been added to fetch the displayValue.

Browsers

I tested the build on the following browsers:

  • Firefox Desktop
  • Chrome Desktop
  • Edge Desktop
  • Safari Desktop
  • Chrome Mobile
  • Safari Mobile

Screen readers

I tested the build on the following browsers:

  • JAWS Firefox Desktop
  • JAWS Chrome Desktop
  • NVDA Firefox Desktop
  • NVDA Chrome Desktop
  • VoiceOver Safari Desktop
  • VoiceOver Chrome Desktop
  • VoiceOver Safari Mobile
  • Android Accessibility Suite Chrome Mobile

Pull request type

Please check the type of change your PR introduces:

  • Bugfix
  • Feature
  • Code style update (formatting, renaming)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • Documentation content changes
  • Other (please describe):

Does this introduce a breaking change?

  • Yes
  • No

Other information

@github-actions github-actions bot temporarily deployed to preview-pr1843 June 28, 2023 08:07 Inactive
@DavideMininni-Fincons DavideMininni-Fincons marked this pull request as ready for review June 28, 2023 09:24
@github-actions github-actions bot temporarily deployed to preview-pr1843 June 28, 2023 09:53 Inactive
@codecov-commenter
Copy link

codecov-commenter commented Jun 28, 2023

Codecov Report

Merging #1843 (44c81bb) into master (ab917b0) will decrease coverage by 17.35%.
The diff coverage is 34.51%.

❗ Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more.

@@             Coverage Diff             @@
##           master    #1843       +/-   ##
===========================================
- Coverage   54.85%   37.50%   -17.35%     
===========================================
  Files          49      257      +208     
  Lines        1659     9807     +8148     
  Branches      406     2109     +1703     
===========================================
+ Hits          910     3678     +2768     
- Misses        671     5862     +5191     
- Partials       78      267      +189     
Impacted Files Coverage Δ
...ts/sbb-accordion-item/sbb-accordion-item.events.ts 100.00% <ø> (ø)
.../sbb-accordion-item/sbb-accordion-item.stories.tsx 0.00% <0.00%> (ø)
...mponents/sbb-accordion-item/sbb-accordion-item.tsx 0.00% <0.00%> (-37.21%) ⬇️
...components/sbb-accordion/sbb-accordion.stories.tsx 0.00% <0.00%> (ø)
...ents/sbb-action-group/sbb-action-group.stories.tsx 0.00% <0.00%> (ø)
...onents/sbb-alert-group/sbb-alert-group.stories.tsx 0.00% <0.00%> (ø)
src/components/sbb-alert/sbb-alert.stories.tsx 0.00% <0.00%> (ø)
...onents/sbb-autocomplete/sbb-autocomplete.events.ts 100.00% <ø> (ø)
...ents/sbb-autocomplete/sbb-autocomplete.stories.tsx 0.00% <0.00%> (ø)
src/components/sbb-button/sbb-button.stories.tsx 0.00% <0.00%> (ø)
... and 58 more

... and 201 files with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

Copy link
Contributor

@kyubisation kyubisation left a comment

Choose a reason for hiding this comment

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

Bascially LGTM 👍
One question about event content.

src/components/sbb-option/sbb-option.tsx Outdated Show resolved Hide resolved
@DavideMininni-Fincons DavideMininni-Fincons force-pushed the bug/select-shows-selected-value-in-form-field-instead-of-the-label branch from 0930baf to 44c81bb Compare June 28, 2023 11:14
Copy link
Contributor

@jeripeierSBB jeripeierSBB left a comment

Choose a reason for hiding this comment

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

Nice refactoring, thanks

@DavideMininni-Fincons DavideMininni-Fincons merged commit d67e974 into master Jun 28, 2023
@DavideMininni-Fincons DavideMininni-Fincons deleted the bug/select-shows-selected-value-in-form-field-instead-of-the-label branch June 28, 2023 12:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: Select shows selected value in form-field instead of the label
4 participants