From 70f0cb610ab4e553f6e100d915fbc59d24d72336 Mon Sep 17 00:00:00 2001 From: chapoi <101828855+chapoi@users.noreply.github.com> Date: Tue, 19 Dec 2023 17:28:07 +0200 Subject: [PATCH] UX: Chat info area back button + styling tweaks (#24966) ## Back button to navigate out of add-member area Currently on mobile, once you're in the member area, there is no easy to return to the general settings area, except exiting the settings altogether, which isn't very user friendly. A go-back link solves the problem. ## Styling tweaks * Removed the background from the leave button * Added more spacing between the sections on desktop and removed the fixed height for rows Co-authored-by: Joffrey JAFFEUX --- .../chat/routes/channel-info-members.gjs | 13 +++++++++ .../assets/stylesheets/common/chat-form.scss | 6 +---- .../mobile/chat-channel-members.scss | 5 ++++ .../assets/stylesheets/mobile/chat-form.scss | 27 ++++++++++++++++--- plugins/chat/config/locales/client.en.yml | 1 + .../spec/system/channel_members_page_spec.rb | 10 +++++++ 6 files changed, 53 insertions(+), 9 deletions(-) diff --git a/plugins/chat/assets/javascripts/discourse/components/chat/routes/channel-info-members.gjs b/plugins/chat/assets/javascripts/discourse/components/chat/routes/channel-info-members.gjs index 2b044bad680..7956723a065 100644 --- a/plugins/chat/assets/javascripts/discourse/components/chat/routes/channel-info-members.gjs +++ b/plugins/chat/assets/javascripts/discourse/components/chat/routes/channel-info-members.gjs @@ -3,6 +3,7 @@ import { cached, tracked } from "@glimmer/tracking"; import { fn, hash } from "@ember/helper"; import { on } from "@ember/modifier"; import { action } from "@ember/object"; +import { LinkTo } from "@ember/routing"; import { inject as service } from "@ember/service"; import { modifier } from "ember-modifier"; import isElementInViewport from "discourse/lib/is-element-in-viewport"; @@ -10,6 +11,7 @@ import DiscourseURL, { userPath } from "discourse/lib/url"; import autoFocus from "discourse/modifiers/auto-focus"; import { INPUT_DELAY } from "discourse-common/config/environment"; import icon from "discourse-common/helpers/d-icon"; +import i18n from "discourse-common/helpers/i18n"; import discourseDebounce from "discourse-common/lib/debounce"; import I18n from "discourse-i18n"; import MessageCreator from "discourse/plugins/chat/discourse/components/chat/message-creator"; @@ -22,6 +24,7 @@ export default class ChatRouteChannelInfoMembers extends Component { @service chatApi; @service modal; @service loadingSlider; + @service site; @tracked filter = ""; @tracked showAddMembers = false; @@ -122,6 +125,16 @@ export default class ChatRouteChannelInfoMembers extends Component { }