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

[PM-4871] Remove clickable row in favor of clickable cell content #6911

Merged
merged 3 commits into from
Feb 14, 2024

Conversation

Spitfireap
Copy link
Contributor

Type of change

- [ ] Bug fix
- [ ] New feature development
- [ ] Tech debt (refactoring, code cleanup, dependency upgrades, etc)
- [ ] Build/deploy pipeline (DevOps)
- [ X] UX Improvement

Objective

Improve UX.

When selecting multiple items in the vault it is easy to mis-click and trigger the "show item" action which not only show the item information but also uncheck every previously checked checkbox. It is really hard to manage a great number of items.

The proposed change check the click event and if the mouse is above the checkbox's <td> the checkbox will trigger instead.

Forum link referring to this issue.

Code changes

  • vault-cipher-row.component.html: added an id to the <td> containing the checkbox for the click event check
  • vault-cipher-row.component.ts: Updated the click event by providing the event's target. If the target contains the id, the input is then checked.

Screenshots

old behavior:

old.mp4

new behavior:

new.mp4

@Spitfireap Spitfireap requested a review from a team as a code owner November 19, 2023 21:31
@Spitfireap Spitfireap changed the title Increase click area of checkbox on vault Increase click area of checkbox on vault item list Nov 19, 2023
@bitwarden-bot
Copy link

Thank you for your contribution! We've added this to our internal Community PR board for review.
ID: PM-4871

@bitwarden-bot bitwarden-bot changed the title Increase click area of checkbox on vault item list [PM-4871] Increase click area of checkbox on vault item list Nov 19, 2023
@bitwarden-bot
Copy link

bitwarden-bot commented Nov 19, 2023

Logo
Checkmarx One – Scan Summary & Detailsc494d3cd-2c9e-4d4e-8549-6b1aca35c0c7

New Issues

Severity Issue Source File / Package Checkmarx Insight
MEDIUM Unpinned Actions Full Length Commit SHA /build-desktop.yml: 1163 Pinning an action to a full length commit SHA is currently the only way to use an action as an immutable release. Pinning to a particular SHA helps...
MEDIUM Unpinned Actions Full Length Commit SHA /build-desktop.yml: 299 Pinning an action to a full length commit SHA is currently the only way to use an action as an immutable release. Pinning to a particular SHA helps...
MEDIUM Unpinned Actions Full Length Commit SHA /build-desktop.yml: 1242 Pinning an action to a full length commit SHA is currently the only way to use an action as an immutable release. Pinning to a particular SHA helps...
LOW Use_Of_Hardcoded_Password /apps/cli/src/tools/generate.command.ts: 68 Attack Vector

Fixed Issues

Severity Issue Source File / Package
MEDIUM Unpinned Actions Full Length Commit SHA /build-desktop.yml: 1164
MEDIUM Unpinned Actions Full Length Commit SHA /version-auto-bump.yml: 47
MEDIUM Unpinned Actions Full Length Commit SHA /build-desktop.yml: 297
MEDIUM Unpinned Actions Full Length Commit SHA /build-desktop.yml: 1243
LOW Client_JQuery_Deprecated_Symbols /libs/common/src/autofill/services/autofill-settings.service.ts: 128
LOW Use_Of_Hardcoded_Password /libs/common/src/tools/send/services/send.service.spec.ts: 495
LOW Use_Of_Hardcoded_Password /apps/browser/src/autofill/background/notification.background.spec.ts: 61
LOW Use_Of_Hardcoded_Password /apps/browser/src/autofill/enums/notification-queue-message-type.enum.ts: 3
LOW Use_Of_Hardcoded_Password /apps/browser/src/autofill/background/notification.background.spec.ts: 61
LOW Use_Of_Hardcoded_Password /apps/browser/src/autofill/background/notification.background.spec.ts: 96
LOW Use_Of_Hardcoded_Password /apps/cli/src/vault/models/cipher.response.ts: 21
LOW Use_Of_Hardcoded_Password /apps/cli/src/vault/models/cipher.response.ts: 21
LOW Use_Of_Hardcoded_Password /apps/cli/src/vault/models/cipher.response.ts: 21
LOW Use_Of_Hardcoded_Password /apps/cli/src/vault/models/cipher.response.ts: 21
LOW Use_Of_Hardcoded_Password /apps/cli/src/vault/models/cipher.response.ts: 21

@djsmith85 djsmith85 requested a review from a team November 29, 2023 16:17
danielleflinn
danielleflinn previously approved these changes Nov 29, 2023
Copy link
Member

@danielleflinn danielleflinn left a comment

Choose a reason for hiding this comment

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

This behavior seems to align with the Design request outlined in: PM-3078

@gbubemismith when you get to reviewing this for Vault please reference the internal task which outlines our desired fix for this UX bug.

@djsmith85 djsmith85 linked an issue Dec 1, 2023 that may be closed by this pull request
1 task
@gbubemismith gbubemismith self-assigned this Feb 1, 2024
Copy link
Member

@gbubemismith gbubemismith left a comment

Choose a reason for hiding this comment

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

@Spitfireap Thanks for fixing this bug. I have one suggestion, and we can get this approved.

queryParamsHandling: "merge",
});
@HostListener("click", ["$event.target"])
protected click(target: HTMLSpanElement) {
Copy link
Member

Choose a reason for hiding this comment

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

nitpick: I think the target parameter can be changed to HTMLElement as it is a more general type.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@gbubemismith Change committed ;).
The lint process applied some change on L.37. Do you want to keep them ?

Copy link
Member

Choose a reason for hiding this comment

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

Thanks for jumping on this quickly! I noticed something on a second look: we are shifting our UX to favour clickable cells instead of the entire row. Given this requirement, it looks like removing the HostListener and the HostBinding should meet our aim. Would you mind making those changes? I really appreciate your work on this.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

My pleasure and done ! Thanks for your review.
I've deleted L.37 altogether (activatedRouter didn't seem to be used before). I'm not fluent enough in Angular to be sure it wasn't needed (even though I didn't see any regression). I would appreciate it if you could double-check.
On a side note I feel that making the clickable area for the checkbox wider than its visual appearance (as proposed initially) would still be an accessibility improvement...

Copy link
Member

Choose a reason for hiding this comment

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

One last thing: can you fix the conflict on your branch?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done.

@gbubemismith gbubemismith added the needs-qa Marks a PR as requiring QA approval label Feb 7, 2024
@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
1 out of 2 committers have signed the CLA.

✅ Spitfireap
❌ gbubemismith
You have signed the CLA already but the status is still pending? Let us recheck it.

gbubemismith
gbubemismith previously approved these changes Feb 8, 2024
@danielleflinn danielleflinn changed the title [PM-4871] Increase click area of checkbox on vault item list [PM-4871] Remove clickable row in favor of clickable cell content Feb 9, 2024
@gbubemismith gbubemismith self-requested a review February 12, 2024 15:56
@gbubemismith
Copy link
Member

Hello @Spitfireap, Firstly, thank you for your work on this bug. I moved this to our QA team to test and received feedback on adding this behaviour to collections to keep things consistent. Given the excellent work you have already done, would you mind including this adjustment on the VaultCollectionRowComponent? Please know there's no pressure to take this on if you're not comfortable.

@Spitfireap
Copy link
Contributor Author

@gbubemismith done :).
So no discussion possible about making the clickable area for the checkbox bigger ?

@gbubemismith
Copy link
Member

@gbubemismith done :). So no discussion possible about making the clickable area for the checkbox bigger ?

Thanks for your quick response. I have started this discussion and am sure this suggestion will be considered.

@gbubemismith
Copy link
Member

@Spitfireap Our QA team has approved this PR 🚀. Thanks for your work on this.

@gbubemismith gbubemismith removed the needs-qa Marks a PR as requiring QA approval label Feb 14, 2024
@gbubemismith gbubemismith merged commit 973b95f into bitwarden:main Feb 14, 2024
50 of 56 checks passed
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.

Web UI Checkbox selection gets wiped with Edit Popup Window
5 participants