Page MenuHomePhabricator

[web] Fix nested a tags
ClosedPublic

Authored by inka on Sep 8 2023, 2:25 AM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Jul 6, 6:07 AM
Unknown Object (File)
Thu, Jul 4, 10:46 PM
Unknown Object (File)
Thu, Jul 4, 1:22 PM
Unknown Object (File)
Tue, Jul 2, 2:49 PM
Unknown Object (File)
Mon, Jun 10, 7:25 PM
Unknown Object (File)
Apr 4 2024, 7:16 PM
Unknown Object (File)
Apr 4 2024, 7:16 PM
Unknown Object (File)
Apr 4 2024, 7:16 PM
Subscribers

Details

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.

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

inka edited the test plan for this revision. (Show Details)
inka requested review of this revision.Sep 8 2023, 2:44 AM

Thank you for fixing this!

This revision is now accepted and ready to land.Sep 11 2023, 5:32 AM

Found one more plance. Don't know why it wasn't showing errors before...

inka requested review of this revision.Sep 11 2023, 6:41 AM
This revision is now accepted and ready to land.Sep 11 2023, 7:11 AM
This revision was automatically updated to reflect the committed changes.