Skip to content

Conversation

@marcofranzen99
Copy link
Contributor

@marcofranzen99 marcofranzen99 commented Mar 28, 2023

Resolved / Related Issues

Validation
How did you test these changes?

  • Did you build the app and test your changes?
  • Did you check for accessibility? You can use Accessibility Insights for this.
  • Did you remove any strings from the en-us resource file?
    • Did you search the solution to see if the string is still being used?
  • Did you implement any design changes to an existing feature?
    • Was this change approved?
  • Are there any other steps that were used to validate these changes?
    1. Hovering over multiple selected items won't clear selection
    2. Hovering over not selected items will clear the multi selection & select the new item

Screenshots (optional)

Files_e8IZ9jm00I.mp4

Notes
The first commit inverts two conditions and uses return to save some indentation
The second commit is the actual fix

@yaira2
Copy link
Member

yaira2 commented Mar 28, 2023

Hovering over not selected items will clear the multi selection & select the new item

This isn't desired, if multiple items are already selected, we should ignore the select on hover feature.

@marcofranzen99
Copy link
Contributor Author

marcofranzen99 commented Mar 28, 2023

This isn't desired, if multiple items are already selected, we should ignore the select on hover feature.

That makes sense, i have updated the code accordingly and also the video where I tested the changes in the PR description

@yaira2
Copy link
Member

yaira2 commented Mar 28, 2023

I think this can be simplified by modifying the if statement on line 1101 to return if multiple files are selected.

@marcofranzen99
Copy link
Contributor Author

marcofranzen99 commented Mar 28, 2023

I think this can be simplified by modifying the if statement on line 1101 to return if multiple files are selected.

That was also my first thought, but then it wouldn't work to select multiple items by pressing Shift or Control. The code for that is between line 1116 and 1136.

This condition even expects that at least one item is selected https://github.com/files-community/Files/blob/main/src/Files.App/BaseLayout.cs#L1121

@yaira2 yaira2 requested a review from marcelwgn March 28, 2023 14:55
yaira2
yaira2 previously approved these changes Mar 28, 2023
Copy link
Member

@yaira2 yaira2 left a comment

Choose a reason for hiding this comment

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

Looks good to me, can you add some comments to the code?

@yaira2 yaira2 added the ready for review Pull requests that are ready for review label Mar 28, 2023
@marcofranzen99
Copy link
Contributor Author

Looks good to me, can you add some comments to the code?

I added some basic comments, I think the other parts are pretty self explaining or is there any specific part where I should add a comment?

@yaira2
Copy link
Member

yaira2 commented Mar 28, 2023

Looks good, thanks!

@yaira2 yaira2 added ready to merge Pull requests that are approved and ready to merge and removed ready for review Pull requests that are ready for review labels Mar 29, 2023
@yaira2 yaira2 merged commit 79220aa into files-community:main Mar 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready to merge Pull requests that are approved and ready to merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug: Multiselect is getting cleared when select on hover is enabled

3 participants