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(combobox): remove underline when no focus #1661

Merged

Conversation

valentin-mladenov
Copy link
Contributor

PR Checklist

Please check if your PR fulfills the following requirements:

  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)
  • If applicable, have a visual design approval

PR Type

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Documentation content changes
  • Other... Please describe:

What is the current behavior?

Sometimes when nested combobox focus presists after focus move to other element.

Issue Number: CDE-2531

What is the new behavior?

Nested combobox focus is removed after focus move to other element.

Does this PR introduce a breaking change?

  • Yes
  • No

Other information

@valentin-mladenov valentin-mladenov requested a review from a team January 13, 2025 11:50
@valentin-mladenov valentin-mladenov self-assigned this Jan 13, 2025
@valentin-mladenov valentin-mladenov marked this pull request as ready for review January 13, 2025 11:50
Copy link
Contributor

github-actions bot commented Jan 13, 2025

👋 @valentin-mladenov,

  • 🙏 The Clarity team thanks you for opening a pull request
  • 🎉 The build for this PR has succeeded
  • 🔍 The PR is now ready for review
  • 🍿 In the meantime, view a preview of this PR
  • 🖐 You can always follow up here. If you're a VMware employee, you can also reach us on our internal Clarity Support space

Thank you,

🤖 Clarity Release Bot

Copy link
Member

@kevinbuhmann kevinbuhmann left a comment

Choose a reason for hiding this comment

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

First, this bug has nothing to with being nested in an accordion. It happens when the combobox has no form control set (no ngModel, formControl, or formControlName). Please update the PR title/description accordingly.

Second, there are extraneous conditional property access operators in this change. The fix should be restricted to only the necessary checks.

Last, there is no need to move the this.focused = true; line. It works fine at the end of the onBlur method.

See this commit for a working fix with minimal changes: b9a0abb. Please remove the extra unnecessary changes to isolate this bug fix commit to only what's needed to fix the bug.

@kevinbuhmann
Copy link
Member

Please update the PR title/summary before merging.

@valentin-mladenov
Copy link
Contributor Author

First, this bug has nothing to with being nested in an accordion. It happens when the combobox has no form control set (no ngModel, formControl, or formControlName). Please update the PR title/description accordingly.

Second, there are extraneous conditional property access operators in this change. The fix should be restricted to only the necessary checks.

Last, there is no need to move the this.focused = true; line. It works fine at the end of the onBlur method.

See this commit for a working fix with minimal changes: b9a0abb. Please remove the extra unnecessary changes to isolate this bug fix commit to only what's needed to fix the bug.

  1. I don't say is a combobox accordion related bug. Just that is the place I observed it.
  2. Separate PR for null refernce checks is created fix(combobox): null reference ngControl #1670
  3. Corrected in commit 834884a

@valentin-mladenov valentin-mladenov merged commit 9666d79 into main Jan 15, 2025
12 checks passed
@valentin-mladenov valentin-mladenov deleted the combobox-remove-underline-when-no-focus_cde-2531 branch January 15, 2025 09:27
@kevinbuhmann
Copy link
Member

I don't say is a combobox accordion related bug. Just that is the place I observed it.

My problem is the commit message not accurately describing the bug. The bug happened when there was no control, not when nesting as you did say in the commit message.

Separate PR for null refernce checks is created #1670

I'm not sure why you split the null reference checks for the same bug into two separate PRs, but it's too late now.

Copy link
Contributor

🎉 This PR is included in version 17.6.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Copy link
Contributor

github-actions bot commented Feb 8, 2025

Hi there 👋, this is an automated message. To help Clarity keep track of discussions, we automatically lock closed PRs after 14 days. Please look for another open issue or open a new issue with updated details and reference this one as necessary.

@github-actions github-actions bot locked and limited conversation to collaborators Feb 8, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants