UX: Chat browse redesign (#25698)

* UX: fix search input placeholder cutoff

* UX: use transparent button for new-channel

* UX: remove settings link

* UX: removed joined tag

* UX: increase lock icon size

* UX: use grid for channel card

* UX: chat-channel-card styling + cleanup

* UX: dont space about tabs on mobile

* specs

* PR feedback

Co-authored-by: Joffrey JAFFEUX <j.jaffeux@gmail.com>

* PR feedback > translation

* Remove import

* UX: update copy

---------

Co-authored-by: Joffrey JAFFEUX <j.jaffeux@gmail.com>
This commit is contained in:
chapoi
2024-02-15 19:00:22 +02:00
committed by GitHub
parent 95bf1e1e9a
commit 292685d3de
9 changed files with 88 additions and 171 deletions

View File

@ -35,14 +35,14 @@ module("Discourse Chat | Component | chat-channel-card", function (hooks) {
this.channel.status = "closed";
await render(hbs`<ChatChannelCard @channel={{this.channel}} />`);
assert.true(exists(".chat-channel-card.-closed"));
assert.true(exists(".chat-channel-card.--closed"));
});
test("Archived channel", async function (assert) {
this.channel.status = "archived";
await render(hbs`<ChatChannelCard @channel={{this.channel}} />`);
assert.true(exists(".chat-channel-card.-archived"));
assert.true(exists(".chat-channel-card.--archived"));
});
test("Muted channel", async function (assert) {
@ -50,21 +50,12 @@ module("Discourse Chat | Component | chat-channel-card", function (hooks) {
this.channel.currentUserMembership.following = true;
await render(hbs`<ChatChannelCard @channel={{this.channel}} />`);
assert.strictEqual(
query(".chat-channel-card__tag.-muted").textContent.trim(),
I18n.t("chat.muted")
);
assert.true(exists(".chat-channel-card__muted"));
});
test("Joined channel", async function (assert) {
this.channel.currentUserMembership.following = true;
await render(hbs`<ChatChannelCard @channel={{this.channel}} />`);
assert.strictEqual(
query(".chat-channel-card__tag.-joined").textContent.trim(),
I18n.t("chat.joined")
);
assert.true(exists(".toggle-channel-membership-button.-leave"));
});
@ -109,12 +100,6 @@ module("Discourse Chat | Component | chat-channel-card", function (hooks) {
);
});
test("Settings button", async function (assert) {
await render(hbs`<ChatChannelCard @channel={{this.channel}} />`);
assert.true(exists(".chat-channel-card__setting"));
});
test("Read restricted chatable", async function (assert) {
this.channel.chatable.read_restricted = true;
await render(hbs`<ChatChannelCard @channel={{this.channel}} />`);