HomePhabricator
Diffusion Comm 439f1371107c

[web] Fix nested a tags

Description

[web] Fix nested a tags

Summary:
issue: https://linear.app/comm/issue/ENG-2596/anchor-tag-contains-another-anchor-tag-on-web
Nested <a> tags cause errors. The only place where SidebarItem is used on web, is in ChatThreadListSidebar. The only purpose the two <a> tags serve is having an onClick method, that is the same in both cases -
useOnClickThread(threadInfo). So I propose to remove the outer tag, and instead make the underlying SidebarItem take as much space as possible

Here is the pressable area marked in blue:

Screenshot 2023-09-08 at 11.15.33.png (268×806 px, 30 KB)

Test Plan: Checked that pressing the sideabr item in the chat thread list navigates the user to thet sidebar. Checked that the error stopped appearing.

Reviewers: rohan, ginsu, michal, atul

Reviewed By: michal

Subscribers: ashoat, tomek

Differential Revision: https://phab.comm.dev/D9104

Details

Provenance
inkaAuthored on Sep 8 2023, 2:23 AM
Reviewer
michal
Differential Revision
D9104: [web] Fix nested a tags
Parents
rCOMM47bca6f563e2: [web] fix message action tooltip placement for messages with inline engagement
Branches
Unknown
Tags
Unknown