FIX: Minor hashtag autocomplete fixes (#19173)

* Do not search category name when searching channels to avoid
  confusing results
* Overflow text in autocomplete menu with ... if it is too long
* Make autocomplete menu less height
This commit is contained in:
Martin Brennan
2022-11-24 14:45:13 +10:00
committed by GitHub
parent 65f57a4d05
commit a34838d671
3 changed files with 16 additions and 16 deletions

View File

@ -55,20 +55,10 @@ RSpec.describe Chat::ChatChannelHashtagDataSource do
end
describe "#search" do
it "finds a channel by category name" do
it "does not find channels by category name" do
category.update!(name: "Randomizer")
result = described_class.search(guardian, "randomiz", 10).first
expect(result.to_h).to eq(
{
relative_url: channel1.relative_url,
text: "Zany Things",
description: "Just weird stuff",
icon: "comment",
type: "channel",
ref: nil,
slug: "random",
},
)
expect(result.to_h).to eq({})
end
it "finds a channel by slug" do