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

Fix some bugs Tim reported in share-to-Android experience. #5098

Merged
merged 7 commits into from
Nov 16, 2021

Commits on Nov 16, 2021

  1. StreamAutocomplete: Include non-prefix matches

    But with prefix matches shown at the top.
    chrisbobbe authored and gnprice committed Nov 16, 2021
    Configuration menu
    Copy the full SHA
    85f9330 View commit details
    Browse the repository at this point in the history
  2. share-to: Stop mutating input value for mandatory-topics enforcement

    In order to identify a topic as empty, we first have to take the raw
    input and .trim() it, and then compare the result of that to the
    empty string. That way, topics like " " and "   " will correctly be
    treated as empty.
    
    For the trimming part, we've just been calling .trim() every time
    the input value changes and immediately setting the input value to
    the output of that .trim().
    
    This had the annoying side effect that it was really frustrating to
    set a topic with multiple words in it, like "test topic". When you'd
    typed as far as "test ", it would trim out the trailing space. So,
    without a workaround, you'd end up with "testtopic". Then, if you
    wanted, you could move the cursor back in between the words and
    insert a space, to make "test topic". (That space wouldn't be
    trimmed out because it's not at the beginning or end of the string.)
    
    So, get rid of the side effect of changing the input value.
    chrisbobbe authored and gnprice committed Nov 16, 2021
    Configuration menu
    Copy the full SHA
    665c7bd View commit details
    Browse the repository at this point in the history
  3. share-to: Stop mutating input value for stream-not-empty enforcement

    With the same reasoning as we used for doing this to the topic
    input, in a recent commit.
    chrisbobbe authored and gnprice committed Nov 16, 2021
    Configuration menu
    Copy the full SHA
    7889a50 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    562cf74 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    bb90a7e View commit details
    Browse the repository at this point in the history
  6. share-to: Explain validation errors on press of disabled send button

    Greg reports the following behavior in Gmail on Android [1]:
    
    > * When I haven't entered anything (even in the To: field), the
    >   "send" icon is grayed out.
    > * But if I tap it anyway, I get a little modal error dialog: "Add
    >   at least one recipient.", with an "OK" button.
    > * Then once I enter a valid email address, the icon gets its
    >   normal blue color.
    
    So, do like that here: tell the ZulipButton that taps are handled
    when it's disabled, and handle them by giving an explicit
    validation-error message.
    
    [1] zulip#5098 (comment)
    chrisbobbe authored and gnprice committed Nov 16, 2021
    Configuration menu
    Copy the full SHA
    630a543 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    9125fd2 View commit details
    Browse the repository at this point in the history