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)
Thu, Nov 21, 6:22 AM
Unknown Object (File)
Thu, Nov 21, 6:22 AM
Unknown Object (File)
Thu, Nov 21, 6:22 AM
Unknown Object (File)
Thu, Nov 21, 6:22 AM
Unknown Object (File)
Thu, Nov 21, 6:20 AM
Unknown Object (File)
Oct 29 2024, 2:10 PM
Unknown Object (File)
Oct 22 2024, 2:18 PM
Unknown Object (File)
Oct 22 2024, 2:18 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
Branch
inka/a_tag
Lint
No Lint Coverage
Unit
No Test Coverage

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.