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 kudo amount input. #140

Merged
merged 1 commit into from
Nov 14, 2023
Merged

Conversation

marcianosr
Copy link
Contributor

What

Explain what changes inside the code, this can be as simple or complicated as you want as long as it's clear

Why

Explain why these things are changes. This explanation is for your colleagues and your future self.

Code Review

Please consider the following checklist when reviewing this Pull Request.
More background and details here.

  • Does the code actually solve the problem it was meant to solve?
  • Is the code covered by unit tests? Integration tests?
  • Does anything here need documentation? (Focus on why, not what.)
  • Does any of this code deal with privacy sensitive information or affects security? Ask an additional reviewer.
  • Is the code easy to understand and change in the future?
  • Is the same code or concept duplicated? Find a balance between DRYness and readability.
  • Does the code reasonably adhere to the Kabisa coding standards?
  • Be kind.

@marcianosr marcianosr requested a review from sandercamp November 8, 2023 14:34
Copy link

codeclimate bot commented Nov 8, 2023

Code Climate has analyzed commit 7ab8e9f and detected 2 issues on this pull request.

Here's the issue category breakdown:

Category Count
Duplication 2

The test coverage on the diff in this pull request is 0.0% (50% is the threshold).

This pull request will bring the total coverage in the repository to 12.8% (0.0% change).

View more on Code Climate.

@sandercamp
Copy link
Contributor

sandercamp commented Nov 9, 2023

Nice one! Made it work without resorting to hacky solutions I see.

Minor thing I noticed: when a value is selected and I want to change it again the cursor is positioned before the input value. Backspace will still empty the field though.

@@ -150,7 +151,6 @@ class GuidelineInput extends Component<Props, State> {
}),
}}
isClearable
autoFocus
Copy link
Contributor

Choose a reason for hiding this comment

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

Removing the autofocus will reintroduce the issue where the input loses focus when changing the value using only the keyboard. The root cause is the fact that the whole component rerenders when the value is updated, I think. Enabling autofocus was/is an easy workaround, but there might be a better solution.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Should be picked up later in refactoring phase

@marcianosr marcianosr merged commit 9fc9749 into develop Nov 14, 2023
@matthijsgroen matthijsgroen deleted the fix/kudo-selection-amount-freedom branch May 14, 2024 13:05
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.

2 participants