Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

desktop: fix big input, and other desktop web issues #4238

Merged

Conversation

patosullivan
Copy link
Member

@patosullivan patosullivan commented Dec 2, 2024

fixes TLON-3273 (making the BigInput actually usable on desktop) We weren't accounting for big input height.

Also fixes other issues:

Notebooks weren't wrapped in a Pressable.

Some bad conditional checks were causing text strings to render outside of Text components/directly within Stack components.

Edits weren't working at all for notebook posts (we weren't filling in the draft content, we weren't passing along the title, and we weren't handling situations where the post had an image).

We were still unnecessarily using a ScrollView for the web version of the BigInput.

We had no way to allow the user to exit the big input editor if they wanted to abandon creating a post.

We were attempting to pass contentFit as a prop to img tags for web, which isn't a valid attribute, which made the image header in the notebook editor too large. I added a way to catch contentFit and pass it to the img as an objectFit property in the style prop. This also fixes an issue where image avatars weren't displaying correctly much of the time.

We had no overflow menu button on notebook posts, so there was no way to get to the message options on desktop.

General cleanup of the web MessageInput component.

Edit: now also adds an overflow button for gallery posts.

Copy link

linear bot commented Dec 2, 2024

Copy link
Member

@latter-bolden latter-bolden left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, didn't see any regressions checking against native.

Only UX thing that threw me off was clicking into an empty big input didn't focus it unless I hit within the height of the first line.

Copy link
Contributor

@dnbrwstr dnbrwstr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Couple comments

packages/ui/src/components/NotebookPost/NotebookPost.tsx Outdated Show resolved Hide resolved
packages/ui/src/components/GalleryPost/GalleryPost.tsx Outdated Show resolved Hide resolved
…able Pressable while we're hovering over the overflow button
@patosullivan patosullivan merged commit eaa43a6 into develop Dec 3, 2024
1 check passed
@patosullivan patosullivan deleted the po/tlon-3273-fix-big-input-and-other-web-issues branch December 3, 2024 13:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants