Skip to content

[Due for payment 2025-08-05] [$250] iOS - Chat - Expand button does not appear in composer when entering multiline text #64900

Closed

Description

@jponikarchuk

If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!


Version Number: 9.1.71-1
Reproducible in staging?: Yes
Reproducible in production?: No
If this was caught during regression testing, add the test name, ID and link from TestRail: https://expensify.testrail.io/index.php?/tests/view/6354433
Email or phone of affected tester (no customers): fischer9966+062425eee@gmail.com
Issue reported by: Applause Internal Team
Device used: iPhone 16 Pro / 18.5
App Component: Chat Report View

Action Performed:

  1. Open iOS App
  2. Login with any account
  3. Go to any chat
  4. Enter multiline text more then 3 lines into Composer

Expected Result:

Expand button appears in composer when entering multiline text more then 3 lines long

Actual Result:

Expand button does not appear in composer when entering multiline text more then 3 lines long. Expand button appears if user re-enter the chat without sending this message.

Workaround:

Unknown

Platforms:

  • Android: App
  • Android: mWeb Chrome
  • iOS: App
  • iOS: mWeb Safari
  • iOS: mWeb Chrome
  • Windows: Chrome
  • MacOS: Chrome / Safari
  • MacOS: Desktop

Screenshots/Videos

1.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~021937954205581340877
  • Upwork Job ID: 1937954205581340877
  • Last Price Increase: 2025-07-02
  • Automatic offers:
    • linhvovan29546 | Contributor | 107981180
Issue OwnerCurrent Issue Owner: @
Issue OwnerCurrent Issue Owner: @muttmuure

Activity

  1. added
    DeployBlockerCashThis issue or pull request should block deployment
    BugSomething is broken. Auto assigns a BugZero manager.
    on Jun 25, 2025
  2. melvin-bot commented on Jun 25, 2025

    @melvin-bot

    Triggered auto assignment to @muttmuure (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details. Please add this bug to a GH project, as outlined in the SO.

  3. melvin-bot commented on Jun 25, 2025

    @melvin-bot

    Triggered auto assignment to @blimpich (DeployBlockerCash), see https://stackoverflowteams.com/c/expensify/questions/9980/ for more details.

  4. melvin-bot commented on Jun 25, 2025

    @melvin-bot

    💬 A slack conversation has been started in #expensify-open-source

  5. github-actions commented on Jun 25, 2025

    @github-actions
    Contributor

    👋 Friendly reminder that deploy blockers are time-sensitive ⏱ issues! Check out the open `StagingDeployCash` deploy checklist to see the list of PRs included in this release, then work quickly to do one of the following:

    1. Identify the pull request that introduced this issue and revert it.
    2. Find someone who can quickly fix the issue.
    3. Fix the issue yourself.
  6. Eskalifer1 commented on Jun 25, 2025

    @Eskalifer1
    Contributor

    Proposal

    Please re-state the problem that we are trying to solve in this issue.

    iOS - Chat - Expand button does not appear in composer when entering multiline text

    What is the root cause of that problem?

    The cause of the problem is the behavior of iOS with onContentSizeChange. On IOS, when enableScroll !== false, onContentSizeChange may not work because of the internal implementation of UITextView on IOS.

    What changes do you think we should make in order to solve the problem?

    To do this, we need to change the function:

    const updateIsFullComposerAvailable = useCallback(
    (e: NativeSyntheticEvent<TextInputContentSizeChangeEventData>) => {
    const paddingTopAndBottom = (containerComposeStyles.paddingVertical as number) * 2;
    const inputHeight = e.nativeEvent.contentSize.height;
    const totalHeight = inputHeight + paddingTopAndBottom;
    const isFullComposerAvailable = totalHeight >= CONST.COMPOSER.FULL_COMPOSER_MIN_HEIGHT;
    setIsFullComposerAvailable?.(isFullComposerAvailable);
    },
    [setIsFullComposerAvailable, containerComposeStyles],
    );

    Take out the internal logic as follows:

        const computeIsFullComposerAvailable = useCallback(
            (inputHeight: number) => {
                const paddingTopAndBottom = (containerComposeStyles.paddingVertical as number) * 2;
                const totalHeight = inputHeight + paddingTopAndBottom;
                const isFullComposerAvailable = totalHeight >= CONST.COMPOSER.FULL_COMPOSER_MIN_HEIGHT;
                setIsFullComposerAvailable?.(isFullComposerAvailable);
            },
            [containerComposeStyles, setIsFullComposerAvailable],
        );
    
        const updateIsFullComposerAvailable = useCallback(
            (e: NativeSyntheticEvent<TextInputContentSizeChangeEventData>) => {
                const inputHeight = e.nativeEvent.contentSize.height;
                computeIsFullComposerAvailable(inputHeight);
            },
            [computeIsFullComposerAvailable],
        );

    Add a check for IOS and call this function in onLayout:

        const onLayout = useCallback(
            (e: LayoutChangeEvent) => {
                onLayoutProps?.(e);
                const composerLayoutHeight = e.nativeEvent.layout.height;
                if (composerHeight === composerLayoutHeight) {
                    return;
                }
                setComposerHeight(composerLayoutHeight);
    
                if (isIOSNative) {
                    textInputRef.current?.measure?.((x, y, width, height, pageX, pageY) => {
                        const inputHeight = height - (containerComposeStyles.paddingVertical as number) * 2;
                        computeIsFullComposerAvailable(inputHeight);
                    });
                }
            },
            [composerHeight, onLayoutProps],
        );

    What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?

    None

    What alternative solutions did you explore? (Optional)

    Reminder: Please use plain English, be brief and avoid jargon. Feel free to use images, charts or pseudo-code if necessary. Do not post large multi-line diffs or write walls of text. Do not create PRs unless you have been hired for this job.

  7. blimpich commented on Jun 25, 2025

    @blimpich
    Contributor

    Looking into this. I don't think this is worth blocking deploy on, but I'll see if I can find the offending PR before demoting.

  8. blimpich commented on Jun 25, 2025

    @blimpich
    Contributor

    Ugh, this only reproduces on iOS. I'm just gonna put this out to contributors. Not worth debugging to prevent this from going out to production IMO.

  9. 48 remaining items

  10. melvin-bot commented on Jul 29, 2025

    @melvin-bot

    Reviewing label has been removed, please complete the "BugZero Checklist".

  11. melvin-bot commented on Jul 29, 2025

    @melvin-bot

    The solution for this issue has been 🚀 deployed to production 🚀 in version 9.1.86-3 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:

    If no regressions arise, payment will be issued on 2025-08-05. 🎊

    For reference, here are some details about the assignees on this issue:

  12. melvin-bot commented on Jul 29, 2025

    @melvin-bot

    @getusha @muttmuure The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the BugZero Checklist from here into a new comment on this GH and complete it. If you have the K2 extension, you can simply click: [this button]

  13. melvin-bot commented on Aug 7, 2025

    @melvin-bot

    @muttmuure Whoops! This issue is 2 days overdue. Let's get this updated quick!

  14. melvin-bot commented on Aug 11, 2025

    @melvin-bot

    @muttmuure 6 days overdue. This is scarier than being forced to listen to Vogon poetry!

  15. muttmuure commented on Aug 11, 2025

    @muttmuure
    Contributor

    Payment Summary

    Contributor: @linhvovan29546 paid $250 via Upwork
    Contributor+: @getusha due $250 via NewDot

  16. muttmuure commented on Aug 11, 2025

    @muttmuure
    Contributor

    Do we need a regression test? @getusha?

  17. getusha commented on Aug 12, 2025

    @getusha
    Contributor

    Looks like we already have one @muttmuure

  18. flaviadefaria commented on Oct 2, 2025

    @flaviadefaria
    Contributor

    $250 approved for @getusha

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Awaiting PaymentAuto-added when associated PR is deployed to productionBugSomething is broken. Auto assigns a BugZero manager.DailyKSv2EngineeringExternalAdded to denote the issue can be worked on by a contributor

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions