[web] update calculateMaxTextWidth to consider different font sizes
Summary:
Our reaction tooltip has texts with two different font sizes (see image below for context) to accommodate for this I updated calculateMaxTextWidth to consider different font sizes so that we can use this function when we introduce the reaction tooltip
Depends on D8829
Test Plan: flow and confirmed that the result of calculateMaxTextWidth was the same before and after the changes
Reviewers: atul, kamil
Reviewed By: kamil
Subscribers: ashoat, tomek
Differential Revision: https://phab.comm.dev/D8831