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

Long search query overflows in message feed when no results found #29568

Open
zecbfernandes opened this issue Apr 2, 2024 · 8 comments
Open
Assignees
Labels
area: message feed (UI) Buttons/UI directly in the message feed (not popovers, etc.) bug help wanted in progress

Comments

@zecbfernandes
Copy link

Expected Behavior:
When searching for an extremely long word, the error message should display "No search results. You searched for: [the long word]" without overflowing the screen. If the complete word does not fit the entire screen, it should be partially hidden.

Actual Behavior:
Upon searching for an extremely long word, the error message overflows the screen, making it difficult to read the complete message.

Steps to reproduce the buggy behaviour:

  1. On the main view, click the search bar and type an extremely long word/sentence.
  2. Searching for it will now show the word overflowing to the right.
    Zulip

I forked the software 2 days ago so I can only assume I'm on the latest Zulip version.

@zulipbot
Copy link
Member

zulipbot commented Apr 2, 2024

Hello @zecbfernandes!

Thanks for your interest in Zulip! You have attempted to claim an issue without the label "help wanted". You can only claim and submit pull requests for issues with the help wanted label.

If this is your first time here, we recommend reading our guide for new contributors before getting started.

@zecbfernandes
Copy link
Author

I would like to personally fix this issue so if you could assign it to me I would appreciate it!

zecbfernandes added a commit to zecbfernandes/zulip that referenced this issue Apr 4, 2024
…ly Long Word

Fixed bug where when searching for an extremely long word that does not resolve to anything, the word/entence would overflow from the screen.Added test aswell
zecbfernandes added a commit to zecbfernandes/zulip that referenced this issue Apr 5, 2024
…ly Long Word

Fixed bug where when searching for an extremely long word that does not resolve to anything, the word/sentence would overflow from the screen.Added test aswell
@ilyesskhayati
Copy link
Collaborator

I just reproduced this Bug both on the main site and on the latest Zulip version that I forked, following the same steps:

  1. click on the search bar
  2. type a string with over 130 characters

It gave me this result:
Screenshot 2024-05-10 at 10 15 21 AM

Side note: I copied the string and counted with a simple code that gave me the desired string length.

a good expected output is less than 50 characters with 3 dots in the end (like this...) also for the "You searched for:" to not go on top of the result.
Screenshot 2024-05-10 at 10 24 52 AM

I can help with this, if you just add help-wanted.

@alya alya added area: message feed (UI) Buttons/UI directly in the message feed (not popovers, etc.) help wanted labels May 14, 2024
@alya alya changed the title Overflow of Error Message on Search Bar with Extremely Long Word Long search query overflows in message feed when no results found May 14, 2024
@alya
Copy link
Contributor

alya commented May 14, 2024

Sure, assigning to you, @ilyesskhayati -- thanks!

@zecbfernandes
Copy link
Author

Hi @ilyesskhayati, I just noticed your message! I wanted to bring to your attention that I've already made a commit addressing this issue that fixed the bug, but I didn't create the pull request as I wasn't assigned to it. Please take a look at my commits above, where I solved this issue. If you proceed with the pull request, could you please reference my commit? Also, I believe in my second commit, I inadvertently removed the tests I created for my fix so you might have to implement them again. Good luck with the pull request!

@alya
Copy link
Contributor

alya commented May 15, 2024

@zecbfernandes For what it's worth, you can create a pull request without being assigned to an issue. The point of assigning issues is to coordinate work better; it should never prevent us from using work that's been done.

@ilyesskhayati
Copy link
Collaborator

Hello, sorry for the late reply, I was finishing up my Finals exams.

I think I will not work on it now, as I still have some things to do, so yeah!

@zecbfernandes
Copy link
Author

@alya I did not know that, thanks for clearing that up! I will be submitting a pull request with my fix for the issue soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: message feed (UI) Buttons/UI directly in the message feed (not popovers, etc.) bug help wanted in progress
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants