HomePhabricator
Diffusion Comm 862691c53b49

[lib] Add support for EntityText uiName to entity-text.js

Description

[lib] Add support for EntityText uiName to entity-text.js

Summary:
In the following diffs I'll update ThreadInfo.uiName so that it can return an EntityText, which have to be resolved at callsites to show ENS names.

But since EntityText itself can contain ThreadEntitys that are represented by their uiName, we need to add the capability for resolving these to EntityText itself.

Nesting an EntityText type within itself feels a bit hacky, but I think it's necessary. I considered resolving ThreadEntitys that have ENS names in their uiName at an earlier step, eg. in the ET tag function... but if we resolve them that early, we'll lose the context we need for linking (the uiName should be linked to the thread, and not to the individual user profiles). So instead we have to keep the "structure" here represented in the AST until it's resolved at the final step.

Test Plan: Tested in combination with following diffs

Reviewers: atul

Reviewed By: atul

Subscribers: tomek

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

Details

Provenance
ashoatAuthored on Feb 4 2023, 5:51 PM
Reviewer
atul
Differential Revision
D6586: [lib] Add support for EntityText uiName to entity-text.js
Parents
rCOMM738aa93507fc: [lib] Stop passing notifThreadName to notificationTexts
Branches
Unknown
Tags
Unknown