HomePhabricator
Diffusion Comm f2d68fec126d

[web] Fixed thread name clearing issue in `ThreadSettingGeneralTab`

Description

[web] Fixed thread name clearing issue in ThreadSettingGeneralTab

Summary:
Fixed issue where the thread name cleared when setting it to anything with the same prefix. The bug was with the firstLine function in onChangeName.

firstLine in onChangeName was introduced in D863 and D862 to make it impossible to set a thread title with newlines, this fix still ensures that.

And for good measure, this also helps resolve the issue in D3980, where the ThreadSettingsGeneralTab button doesn't stay disabled if there are no queued changes.

Related Linear issue with full context here.

Test Plan:
Tested on Chrome/Safari and the issue is gone.

Before:

After:

Reviewers: atul

Reviewed By: atul

Subscribers: ashoat, palys-swm, Adrian

Differential Revision: https://phabricator.ashoat.com/D4062

Details

Provenance
aboshAuthored on May 16 2022, 4:49 PM
Reviewer
atul
Differential Revision
D4062: [web] Fixed thread name clearing issue in `ThreadSettingGeneralTab`
Parents
rCOMM6205a4947c09: [native, web, lib] [refactor] [ENG-536] move search index to hook
Branches
Unknown
Tags
Unknown