fix document name overflow (#3263)

Fix the document name getting truncated as I forgot to update a
measurement in the CSS. Also fixes an issue where if you had a long
title which you then cleared, the input width wouldn't update until you
entered your first character of the new name.

### Change Type
- [x] `dotcom` — Changes the tldraw.com web app
- [x] `bugfix` — Bug fix
This commit is contained in:
alex 2024-03-26 11:16:15 +00:00 committed by GitHub
parent 6dd6f8e77e
commit c20d9fc9d2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 2 additions and 2 deletions

View file

@ -276,7 +276,7 @@ const DocumentNameEditor = track(function DocumentNameEditor({
setState((prev) => ({ ...prev, isEditing: false })) setState((prev) => ({ ...prev, isEditing: false }))
}, [setState]) }, [setState])
const name = state.name || documentSettings.name || defaultDocumentName const name = state.name ?? (documentSettings.name || defaultDocumentName)
return ( return (
<div className="tlui-document-name__input__wrapper"> <div className="tlui-document-name__input__wrapper">

View file

@ -339,7 +339,7 @@
.tlui-document-name__input__wrapper { .tlui-document-name__input__wrapper {
position: relative; position: relative;
max-width: calc(100% - 40px); max-width: calc(100% - 36px);
display: flex; display: flex;
flex: auto; flex: auto;
} }