UX: update appropriate btn-flat instances to btn-transparent (#25945)

With the adjustments of `btn-transparent` in https://github.com/discourse/discourse/pull/24666, there are more buttons that could use this class instead of `btn-flat`. This mostly relates to `x` close buttons, but also includes composer and chat toggles.

The primary difference between these styles is that `btn-transparent` never has a background, where `btn-flat` may have a hover or focus background.
This commit is contained in:
Kris
2024-02-29 11:47:07 +01:00
committed by GitHub
parent 88f833418f
commit 8c22831672
29 changed files with 36 additions and 44 deletions
@@ -38,7 +38,7 @@ export default class ChatNotices extends Component {
<DButton
@icon="times"
@action={{this.clearNotice}}
class="btn-flat chat-notices__notice__clear"
class="btn-transparent chat-notices__notice__clear"
/>
</div>
</template>
@@ -41,7 +41,7 @@ export default class ChatRetentionReminder extends Component {
<DButton
@action={{this.dismiss}}
@icon="times"
class="btn no-text btn-icon btn-flat no-text dismiss-btn"
class="no-text btn-icon btn-transparent dismiss-btn"
/>
</div>
{{/if}}
@@ -18,7 +18,7 @@ export default class ChatNavbarCloseDrawerButton extends Component {
@icon="times"
@action={{this.closeDrawer}}
@title="chat.close"
class="btn-flat no-text c-navbar__close-drawer-button"
class="btn-transparent no-text c-navbar__close-drawer-button"
/>
</template>
}
@@ -10,7 +10,7 @@ export default class ChatNavbarCloseThreadButton extends Component {
<template>
{{#if this.site.desktopView}}
<LinkTo
class="c-navbar__close-thread-button btn-flat btn btn-icon no-text"
class="c-navbar__close-thread-button btn-transparent btn btn-icon no-text"
@route="chat.channel"
@models={{@thread.channel.routeModels}}
title={{i18n "chat.thread.close"}}
@@ -12,7 +12,7 @@ export default class ChatNavbarCloseThreadsButton extends Component {
<template>
{{#if this.site.desktopView}}
<LinkTo
class="c-navbar__close-threads-button btn-flat btn btn-icon no-text"
class="c-navbar__close-threads-button btn-transparent btn btn-icon no-text"
@route="chat.channel"
@models={{@channel.routeModels}}
title={{this.closeButtonTitle}}
@@ -24,7 +24,7 @@ export default class ChatNavbarFullPageButton extends Component {
{{#if this.chatStateManager.isDrawerExpanded}}
<DButton
@icon="discourse-expand"
class="btn-flat no-text c-navbar__full-page-button"
class="btn-transparent no-text c-navbar__full-page-button"
@title="chat.open_full_page"
@action={{this.openInFullPage}}
/>
@@ -22,7 +22,7 @@ export default class ChatNavbarOpenDrawerButton extends Component {
<DButton
@icon="discourse-compress"
@title="chat.close_full_page"
class="c-navbar__open-drawer-button btn-flat"
class="c-navbar__open-drawer-button btn-transparent"
@action={{this.openDrawer}}
/>
{{/if}}
@@ -30,7 +30,7 @@ export default class ChatNavbarThreadSettingsButton extends Component {
@action={{this.openThreadSettings}}
@icon="cog"
@title="chat.thread.settings"
class="btn-flat c-navbar__thread-settings-button"
class="btn-transparent c-navbar__thread-settings-button"
/>
{{/if}}
</template>
@@ -19,7 +19,7 @@ export default class ChatNavbarToggleDrawerButton extends Component {
"chat.collapse"
"chat.expand"
}}
class="btn-flat no-text c-navbar__toggle-drawer-button"
class="btn-transparent no-text c-navbar__toggle-drawer-button"
/>
</template>
}
@@ -537,7 +537,7 @@ export default class ChatRouteChannelInfoSettings extends Component {
@action={{this.onArchiveChannel}}
@label="chat.channel_settings.archive_channel"
@icon="archive"
class="archive-btn chat-form__btn btn-flat"
class="archive-btn chat-form__btn btn-transparent"
/>
</:action>
</section.row>
@@ -550,14 +550,14 @@ export default class ChatRouteChannelInfoSettings extends Component {
@action={{this.onToggleChannelState}}
@label="chat.channel_settings.close_channel"
@icon="lock"
class="close-btn chat-form__btn btn-flat"
class="close-btn chat-form__btn btn-transparent"
/>
{{else}}
<DButton
@action={{this.onToggleChannelState}}
@label="chat.channel_settings.open_channel"
@icon="unlock"
class="open-btn chat-form__btn btn-flat"
class="open-btn chat-form__btn btn-transparent"
/>
{{/if}}
</:action>
@@ -569,7 +569,7 @@ export default class ChatRouteChannelInfoSettings extends Component {
@action={{this.onDeleteChannel}}
@label="chat.channel_settings.delete_channel"
@icon="trash-alt"
class="delete-btn chat-form__btn btn-flat"
class="delete-btn chat-form__btn btn-transparent"
/>
</:action>
</section.row>