From faa3e3fbd43cd2e5129bc44561a50a4a97478cba Mon Sep 17 00:00:00 2001 From: Pecacheu <3608878+Pecacheu@users.noreply.github.com> Date: Sat, 14 Feb 2026 12:08:51 -0500 Subject: [PATCH 01/24] fix: Fix for #541, add call button to header bar instead Shrink home-screen flex layout to single-column for mobile Signed-off-by: Pecacheu <3608878+Pecacheu@users.noreply.github.com> --- .../features/voice/callCard/VoiceCallCard.tsx | 15 ++-- .../voice/callCard/VoiceCallCardPreview.tsx | 69 ------------------- packages/client/src/interface/Home.tsx | 2 + .../src/interface/channels/ChannelHeader.tsx | 16 +++++ 4 files changed, 24 insertions(+), 78 deletions(-) delete mode 100644 packages/client/components/ui/components/features/voice/callCard/VoiceCallCardPreview.tsx diff --git a/packages/client/components/ui/components/features/voice/callCard/VoiceCallCard.tsx b/packages/client/components/ui/components/features/voice/callCard/VoiceCallCard.tsx index 7ba327be7..f2d066d56 100644 --- a/packages/client/components/ui/components/features/voice/callCard/VoiceCallCard.tsx +++ b/packages/client/components/ui/components/features/voice/callCard/VoiceCallCard.tsx @@ -279,16 +279,13 @@ function VoiceCallCard(props: { channel: Channel }) { const inCall = () => voice.channel()?.id === props.channel.id; return ( - - - } - > + + + - - - + + + ); } diff --git a/packages/client/components/ui/components/features/voice/callCard/VoiceCallCardPreview.tsx b/packages/client/components/ui/components/features/voice/callCard/VoiceCallCardPreview.tsx deleted file mode 100644 index 948589bcd..000000000 --- a/packages/client/components/ui/components/features/voice/callCard/VoiceCallCardPreview.tsx +++ /dev/null @@ -1,69 +0,0 @@ -import { For, Show } from "solid-js"; - -import { Trans, useLingui } from "@lingui-solid/solid/macro"; -import { Channel } from "stoat.js"; -import { styled } from "styled-system/jsx"; - -import { useUsers } from "@revolt/markdown/users"; -import { useVoice } from "@revolt/rtc"; -import { Avatar, Ripple, Text } from "@revolt/ui/components/design"; -import { Row } from "@revolt/ui/components/layout"; -import { Symbol } from "@revolt/ui/components/utils/Symbol"; - -/** - * Call card (preview) - */ -export function VoiceCallCardPreview(props: { channel: Channel }) { - const voice = useVoice(); - const { t } = useLingui(); - - const ids = () => [...props.channel.voiceParticipants.keys()]; - const users = useUsers(ids); - - function subtext() { - const names = users() - .map((user) => user?.username) - .filter((x) => x); - - return names.length ? t`With ${names.join(", ")}` : t`Start the call`; - } - - return ( - voice.connect(props.channel)}> - - - voice_chat}> - {(user) => ( - - )} - - - - Switch to this voice channel} - > - Join the voice channel - - - {subtext()} - - ); -} - -const Preview = styled("div", { - base: { - position: "relative", // - borderRadius: "var(--borderRadius-lg)", - - height: "100%", - justifyContent: "center", - - display: "flex", - flexDirection: "column", - gap: "var(--gap-sm)", - padding: "var(--gap-lg)", - - color: "var(--md-sys-color-on-surface)", - }, -}); diff --git a/packages/client/src/interface/Home.tsx b/packages/client/src/interface/Home.tsx index 4801b4bf3..fe5569c0b 100644 --- a/packages/client/src/interface/Home.tsx +++ b/packages/client/src/interface/Home.tsx @@ -66,6 +66,8 @@ const Buttons = styled("div", { gap: "8px", padding: "8px", display: "flex", + flexWrap: "wrap", + justifyContent: "center", borderRadius: "var(--borderRadius-lg)", color: "var(--md-sys-color-on-surface-variant)", diff --git a/packages/client/src/interface/channels/ChannelHeader.tsx b/packages/client/src/interface/channels/ChannelHeader.tsx index c7dfcb0f4..2aabad491 100644 --- a/packages/client/src/interface/channels/ChannelHeader.tsx +++ b/packages/client/src/interface/channels/ChannelHeader.tsx @@ -9,6 +9,7 @@ import { useClient } from "@revolt/client"; import { TextWithEmoji } from "@revolt/markdown"; import { useModals } from "@revolt/modal"; import { useState } from "@revolt/state"; +import { useVoice } from "@revolt/rtc"; import { LAYOUT_SECTIONS } from "@revolt/state/stores/Layout"; import { Button, @@ -55,6 +56,7 @@ export function ChannelHeader(props: Props) { const client = useClient(); const { t } = useLingui(); const state = useState(); + const voice = useVoice(); const searchValue = () => { if (!props.sidebarState) return null; @@ -134,6 +136,20 @@ export function ChannelHeader(props: Props) { + + voice.connect(props.channel)} + use:floating={{ + tooltip: { + placement: "bottom", + content: t`Join the voice channel`, + }, + }} + > + voice_chat + + + Date: Sat, 14 Feb 2026 18:01:17 -0500 Subject: [PATCH 02/24] fix: More mobile UI fixes - Settings menu margin shrink and use "Back" button in sidebar instead of "Esc" button on right when screen width < 800px - Message box doesn't grow from placeholder, overflow with ... instead - Hide GIF button when typing Signed-off-by: Pecacheu <3608878+Pecacheu@users.noreply.github.com> --- .../app/interface/settings/Settings.tsx | 12 ++++++++---- .../app/interface/settings/UserSettings.tsx | 5 +++-- .../app/interface/settings/_layout/Content.tsx | 8 ++++++++ .../app/interface/settings/_layout/Sidebar.tsx | 14 +++++++++----- .../settings/_layout/SidebarButton.tsx | 5 +++++ .../app/interface/settings/index.tsx | 6 +++++- .../interface/settings/user/_AccountCard.tsx | 18 ++++++++++++++++++ .../messaging/composition/MessageBox.tsx | 11 +++++++++++ .../features/texteditor/TextEditor2.tsx | 3 +++ .../interface/channels/text/Composition.tsx | 13 +++++++------ 10 files changed, 77 insertions(+), 18 deletions(-) diff --git a/packages/client/components/app/interface/settings/Settings.tsx b/packages/client/components/app/interface/settings/Settings.tsx index bd60cadc8..43e71a98a 100644 --- a/packages/client/components/app/interface/settings/Settings.tsx +++ b/packages/client/components/app/interface/settings/Settings.tsx @@ -89,7 +89,11 @@ export function Settings(props: SettingsProps & SettingsConfiguration) { navigate, }} > - + {(list) => ( <> @@ -156,14 +160,14 @@ export function Settings(props: SettingsProps & SettingsConfiguration) { */ function MemoisedList(props: { context: never; - list: (context: never) => SettingsList; + onClose?: () => void; + list: (context: never, onClose?: () => void) => SettingsList; children: (list: Accessor>) => JSX.Element; }) { /** * Generate list of categories / links */ - const list = createMemo(() => props.list(props.context)); - + const list = createMemo(() => props.list(props.context, props.onClose)); return <>{props.children(list)}; } diff --git a/packages/client/components/app/interface/settings/UserSettings.tsx b/packages/client/components/app/interface/settings/UserSettings.tsx index c6e2e6789..c42ceec22 100644 --- a/packages/client/components/app/interface/settings/UserSettings.tsx +++ b/packages/client/components/app/interface/settings/UserSettings.tsx @@ -34,7 +34,7 @@ import { Feedback } from "./user/Feedback"; import { LanguageSettings } from "./user/Language"; import Native from "./user/Native"; import { Sessions } from "./user/Sessions"; -import { AccountCard } from "./user/_AccountCard"; +import { AccountCard, BackCard } from "./user/_AccountCard"; import { AppearanceMenu } from "./user/appearance"; import { MyBots, ViewBot } from "./user/bots"; import { EditProfile } from "./user/profile"; @@ -112,7 +112,7 @@ const Config: SettingsConfiguration<{ server: Server }> = { * Generate list of categories / entries for client settings * @returns List */ - list() { + list(_, onClose) { const { pop } = useModals(); const { logout } = useClientLifecycle(); @@ -120,6 +120,7 @@ const Config: SettingsConfiguration<{ server: Server }> = { context: null!, prepend: ( +
diff --git a/packages/client/components/app/interface/settings/_layout/Content.tsx b/packages/client/components/app/interface/settings/_layout/Content.tsx index 75d0fc1de..adf17a331 100644 --- a/packages/client/components/app/interface/settings/_layout/Content.tsx +++ b/packages/client/components/app/interface/settings/_layout/Content.tsx @@ -88,6 +88,10 @@ const InnerContent = styled("div", { padding: "80px 32px", justifyContent: "stretch", zIndex: 1, + + "@media (max-width: 800px)": { + padding: "12px" + } }, }); @@ -126,5 +130,9 @@ const CloseAction = styled("div", { color: "var(--md-sys-color-on-surface)", fontSize: "0.75rem", }, + + "@media (max-width: 800px)": { + display: "none" + } }, }); diff --git a/packages/client/components/app/interface/settings/_layout/Sidebar.tsx b/packages/client/components/app/interface/settings/_layout/Sidebar.tsx index c39509023..3aa3f0879 100644 --- a/packages/client/components/app/interface/settings/_layout/Sidebar.tsx +++ b/packages/client/components/app/interface/settings/_layout/Sidebar.tsx @@ -20,18 +20,18 @@ import { */ export function SettingsSidebar(props: { list: Accessor>; - setPage: Setter; page: Accessor; }) { const { navigate } = useSettingsNavigation(); + const list = props.list(); /** * Select first page on load */ onMount(() => { if (!props.page()) { - props.setPage(props.list().entries[0].entries[0].id); + props.setPage(list.entries[0].entries[0].id); } }); @@ -40,8 +40,8 @@ export function SettingsSidebar(props: {
- {props.list().prepend} - + {list.prepend} + {(category) => ( @@ -87,7 +87,7 @@ export function SettingsSidebar(props: { )} - {props.list().append} + {list.append}
@@ -123,6 +123,10 @@ const Content = styled("div", { "& a > div": { margin: 0, }, + + "@media (max-width: 800px)": { + padding: "12px 0" + } }, }); diff --git a/packages/client/components/app/interface/settings/_layout/SidebarButton.tsx b/packages/client/components/app/interface/settings/_layout/SidebarButton.tsx index a24c27149..acb2528de 100644 --- a/packages/client/components/app/interface/settings/_layout/SidebarButton.tsx +++ b/packages/client/components/app/interface/settings/_layout/SidebarButton.tsx @@ -33,6 +33,11 @@ export const SidebarButton = styled("a", { background: "var(--md-sys-color-primary-container)", }, }, + mobileOnly: { + true: { + "@media (min-width: 800px)": {display: "none"} + } + } }, }); diff --git a/packages/client/components/app/interface/settings/index.tsx b/packages/client/components/app/interface/settings/index.tsx index 78f574a63..82be8caf6 100644 --- a/packages/client/components/app/interface/settings/index.tsx +++ b/packages/client/components/app/interface/settings/index.tsx @@ -9,9 +9,13 @@ export { Settings } from "./Settings"; export type SettingsConfiguration = { /** * Generate list of categories and entries + * @param props State information * @returns List */ - list: (context: T) => SettingsList; + list: ( + context: T, + onClose?: () => void + ) => SettingsList; /** * Render the title of the current breadcrumb key diff --git a/packages/client/components/app/interface/settings/user/_AccountCard.tsx b/packages/client/components/app/interface/settings/user/_AccountCard.tsx index 209ef601b..f0ffdf0a8 100644 --- a/packages/client/components/app/interface/settings/user/_AccountCard.tsx +++ b/packages/client/components/app/interface/settings/user/_AccountCard.tsx @@ -3,6 +3,8 @@ import { Trans } from "@lingui-solid/solid/macro"; import { useClient } from "@revolt/client"; import { Avatar, OverflowingText, Ripple, typography } from "@revolt/ui"; +import MdArrowBack from "@material-design-icons/svg/outlined/arrow_back.svg?component-solid"; + import { useSettingsNavigation } from "../Settings"; import { SidebarButton, @@ -40,3 +42,19 @@ export function AccountCard() { ); } + +export function BackCard(props: { + onClose?: () => void; +}) { + return ( + + + + + + Back + + + + ); +} \ No newline at end of file diff --git a/packages/client/components/ui/components/features/messaging/composition/MessageBox.tsx b/packages/client/components/ui/components/features/messaging/composition/MessageBox.tsx index 71ad88af1..4a4c1df55 100644 --- a/packages/client/components/ui/components/features/messaging/composition/MessageBox.tsx +++ b/packages/client/components/ui/components/features/messaging/composition/MessageBox.tsx @@ -95,6 +95,7 @@ interface Props { const Base = styled("div", { base: { flexGrow: 1, + minWidth: 0, paddingInlineEnd: "var(--gap-md)", paddingBlock: "var(--gap-sm)", @@ -103,6 +104,16 @@ const Base = styled("div", { display: "flex", background: "var(--md-sys-color-surface-container-high)", color: "var(--md-sys-color-on-surface)", + + "& .cm-content": { + minWidth: 0 + }, + "& .cm-placeholder": { + overflow: "hidden", + textOverflow: "ellipsis", + whiteSpace: "nowrap", + width: "100%" + } }, variants: { hasActionsAppend: { diff --git a/packages/client/components/ui/components/features/texteditor/TextEditor2.tsx b/packages/client/components/ui/components/features/texteditor/TextEditor2.tsx index 31ef9e5d1..045bb3b65 100644 --- a/packages/client/components/ui/components/features/texteditor/TextEditor2.tsx +++ b/packages/client/components/ui/components/features/texteditor/TextEditor2.tsx @@ -73,6 +73,9 @@ export function TextEditor2(props: Props) { const codeMirror = document.createElement("div"); codeMirror.className = editor; + //Custom CSS + codeMirror.style.minWidth = '0'; + /** * Handle 'Enter' key presses * Submit only if not currently in a code block diff --git a/packages/client/src/interface/channels/text/Composition.tsx b/packages/client/src/interface/channels/text/Composition.tsx index 7f5dc9e33..9abb7de31 100644 --- a/packages/client/src/interface/channels/text/Composition.tsx +++ b/packages/client/src/interface/channels/text/Composition.tsx @@ -345,17 +345,18 @@ export function MessageComposition(props: Props) { > {(triggerProps) => ( <> - - - gif - - + + + + gif + + + emoticon -
)} From abf0f076c76e8172f8d455c2e5a00b9f4cc68b2b Mon Sep 17 00:00:00 2001 From: Pecacheu <3608878+Pecacheu@users.noreply.github.com> Date: Sat, 14 Feb 2026 22:31:26 -0500 Subject: [PATCH 03/24] fix: Mobile UI marches onwards - Disable hover action buttons for DMs, server list, and messages on mobile because these are too easy to accidentially tap - Move the text editor fixes from MessageBox.tsx to codeMirrorLineWrap.ts to make it act as a CodeMirror extension - Allow newlines with enter key on mobile instead of sending (Attempted send with Ctrl + Enter on mobile, but this doesn't work for some reason. Eg. this would matter for mobile external keyboard or Android Desktop mode.) - Fix stoat assets from submodule not syncing Signed-off-by: Pecacheu <3608878+Pecacheu@users.noreply.github.com> --- packages/client/components/state/index.tsx | 3 ++ .../messaging/composition/MessageBox.tsx | 10 ------ .../features/messaging/elements/Container.tsx | 9 +++++- .../features/texteditor/TextEditor2.tsx | 7 +++-- .../features/texteditor/codeMirrorLineWrap.ts | 19 +++++++++--- .../navigation/channels/HomeSidebar.tsx | 31 +++++++++++-------- .../navigation/channels/ServerSidebar.tsx | 9 ++---- 7 files changed, 51 insertions(+), 37 deletions(-) diff --git a/packages/client/components/state/index.tsx b/packages/client/components/state/index.tsx index bfdbb55db..6296c5b58 100644 --- a/packages/client/components/state/index.tsx +++ b/packages/client/components/state/index.tsx @@ -11,6 +11,7 @@ import { SetStoreFunction, createStore } from "solid-js/store"; import equal from "fast-deep-equal"; import localforage from "localforage"; +import { isMobileBrowser } from "@livekit/components-core"; import { AbstractStore, Store } from "./stores"; import { Auth } from "./stores/Auth"; import { Draft } from "./stores/Draft"; @@ -46,6 +47,7 @@ export class State { private store: Store; private setStore: SetStoreFunction; private writeQueue: Record; + isMobile: boolean; // define all stores auth = new Auth(this); @@ -99,6 +101,7 @@ export class State { this.store = store as never; this.setStore = setStore; this.writeQueue = {}; + this.isMobile = isMobileBrowser(); } /** diff --git a/packages/client/components/ui/components/features/messaging/composition/MessageBox.tsx b/packages/client/components/ui/components/features/messaging/composition/MessageBox.tsx index 4a4c1df55..61f6e61b0 100644 --- a/packages/client/components/ui/components/features/messaging/composition/MessageBox.tsx +++ b/packages/client/components/ui/components/features/messaging/composition/MessageBox.tsx @@ -104,16 +104,6 @@ const Base = styled("div", { display: "flex", background: "var(--md-sys-color-surface-container-high)", color: "var(--md-sys-color-on-surface)", - - "& .cm-content": { - minWidth: 0 - }, - "& .cm-placeholder": { - overflow: "hidden", - textOverflow: "ellipsis", - whiteSpace: "nowrap", - width: "100%" - } }, variants: { hasActionsAppend: { diff --git a/packages/client/components/ui/components/features/messaging/elements/Container.tsx b/packages/client/components/ui/components/features/messaging/elements/Container.tsx index 74e68851a..efa29157a 100644 --- a/packages/client/components/ui/components/features/messaging/elements/Container.tsx +++ b/packages/client/components/ui/components/features/messaging/elements/Container.tsx @@ -13,6 +13,7 @@ import { Time, } from "@revolt/ui/components/utils"; +import { useState } from "@revolt/state"; import { MessageToolbar } from "./MessageToolbar"; interface CommonProps { @@ -307,6 +308,7 @@ const CompactInfo = styled(Row, { */ export function MessageContainer(props: Props) { const { t } = useLingui(); + const { isMobile } = useState(); return (
diff --git a/packages/client/components/ui/components/features/texteditor/TextEditor2.tsx b/packages/client/components/ui/components/features/texteditor/TextEditor2.tsx index 045bb3b65..09679d212 100644 --- a/packages/client/components/ui/components/features/texteditor/TextEditor2.tsx +++ b/packages/client/components/ui/components/features/texteditor/TextEditor2.tsx @@ -8,6 +8,7 @@ import { css } from "styled-system/css"; import { AutoCompleteSearchSpace } from "../../utils/autoComplete"; +import { useState } from "@revolt/state"; import { codeMirrorAutoComplete } from "./codeMirrorAutoComplete"; import { isInFencedCodeBlock } from "./codeMirrorCommon"; import { smartLineWrapping } from "./codeMirrorLineWrap"; @@ -70,11 +71,12 @@ const placeholderCompartment = new Compartment(); * Text editor powered by CodeMirror */ export function TextEditor2(props: Props) { + const { isMobile } = useState(); const codeMirror = document.createElement("div"); codeMirror.className = editor; //Custom CSS - codeMirror.style.minWidth = '0'; + codeMirror.style.minWidth = "0"; /** * Handle 'Enter' key presses @@ -82,7 +84,8 @@ export function TextEditor2(props: Props) { */ const enterKeymap = keymap.of([ { - key: "Enter", + key: isMobile ? "Ctrl-Enter" : "Enter", + //TODO: This is not working right, mobile seems to not trigger the function run: (view) => { if (!props.onComplete) return false; diff --git a/packages/client/components/ui/components/features/texteditor/codeMirrorLineWrap.ts b/packages/client/components/ui/components/features/texteditor/codeMirrorLineWrap.ts index 428e376fc..d8e9fdae4 100644 --- a/packages/client/components/ui/components/features/texteditor/codeMirrorLineWrap.ts +++ b/packages/client/components/ui/components/features/texteditor/codeMirrorLineWrap.ts @@ -155,18 +155,27 @@ const lineWrapStyles = EditorView.theme({ ".cm-line.linewrap-indent": { // The tiny offset appears to make the indent more reliable, // for unknown reasons. - "text-indent": "calc(-1 * var(--indented) - 0.1px)", - "padding-left": "calc(var(--indented) + var(--cm-left-padding, 4px))", + textIndent: "calc(-1 * var(--indented) - 0.1px)", + paddingLeft: "calc(var(--indented) + var(--cm-left-padding, 4px))", }, ".linewrap-whitespace": { - "font-family": "monospace, monospace", + fontFamily: "monospace, monospace", // Prevent slightly-oversided monospace fonts from changing line heights // when indented, but also changes the height of lines with only whitespace... - // "font-size": "0.9em", + // fontSize: ".9em", }, ".cm-line > *": { - "text-indent": "0", + textIndent: 0, }, + ".cm-content": { + minWidth: 0 + }, + ".cm-placeholder": { + overflow: "hidden", + textOverflow: "ellipsis", + whiteSpace: "nowrap", + width: "100%" + } }); export const smartLineWrapping = [ diff --git a/packages/client/src/interface/navigation/channels/HomeSidebar.tsx b/packages/client/src/interface/navigation/channels/HomeSidebar.tsx index de8579e53..fbfb8dbb0 100644 --- a/packages/client/src/interface/navigation/channels/HomeSidebar.tsx +++ b/packages/client/src/interface/navigation/channels/HomeSidebar.tsx @@ -25,6 +25,7 @@ import { Symbol } from "@revolt/ui/components/utils/Symbol"; import MdClose from "@material-design-icons/svg/outlined/close.svg?component-solid"; +import { useState } from "@revolt/state"; import { SidebarBase } from "./common"; interface Props { @@ -55,6 +56,7 @@ export const HomeSidebar = (props: Props) => { const navigate = useNavigate(); const location = useLocation(); const { openModal } = useModals(); + const { isMobile } = useState(); const savedNotesChannelId = createMemo(() => props.openSavedNotes()); @@ -186,6 +188,7 @@ export const HomeSidebar = (props: Props) => { style={item.style} channel={item.item} active={item.item.id === props.channelId} + isMobile={isMobile} />
)} @@ -261,12 +264,12 @@ const NameStatusStack = styled("div", { * Single conversation entry */ function Entry( - props: { channel: Channel; active: boolean } /*& Omit< + props: { channel: Channel; active: boolean; isMobile: boolean } /*& Omit< ComponentProps, "href" >*/, ) { - const [local, remote] = splitProps(props, ["channel", "active"]); + const [local, remote] = splitProps(props, ["channel", "active", "isMobile"]); const { t } = useLingui(); const { openModal } = useModals(); @@ -331,17 +334,19 @@ function Entry( } actions={ - { - e.preventDefault(); - openModal({ - type: "delete_channel", - channel: local.channel, - }); - }} - > - - + + { + e.preventDefault(); + openModal({ + type: "delete_channel", + channel: local.channel, + }); + }} + > + + + } use:floating={{ contextMenu: () => diff --git a/packages/client/src/interface/navigation/channels/ServerSidebar.tsx b/packages/client/src/interface/navigation/channels/ServerSidebar.tsx index 2b0b857ee..507cc8ecc 100644 --- a/packages/client/src/interface/navigation/channels/ServerSidebar.tsx +++ b/packages/client/src/interface/navigation/channels/ServerSidebar.tsx @@ -112,9 +112,7 @@ export const ServerSidebar = (props: Props) => { // TODO: we want it to feel smooth when navigating through channels, so we'll want to select channels immediately but not actually navigate until we're done moving through them /** Navigates to the channel offset from the current one, wrapping around if needed */ const _navigateChannel = (byOffset: number) => { - if (props.channelId == null) { - return; - } + if (props.channelId == null) return; const channels = visibleChannels(); @@ -510,7 +508,7 @@ function Entry( } actions={ - <> + - - + } > From 54ea8eb7cd4d34239d0b5c711ff61642b6c85754 Mon Sep 17 00:00:00 2001 From: Pecacheu <3608878+Pecacheu@users.noreply.github.com> Date: Sat, 14 Feb 2026 23:22:17 -0500 Subject: [PATCH 04/24] fix: Add back button to Channel & Server settings Signed-off-by: Pecacheu <3608878+Pecacheu@users.noreply.github.com> --- .../components/app/interface/settings/ChannelSettings.tsx | 4 +++- .../components/app/interface/settings/ServerSettings.tsx | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/packages/client/components/app/interface/settings/ChannelSettings.tsx b/packages/client/components/app/interface/settings/ChannelSettings.tsx index d00fa6937..9b39b37e7 100644 --- a/packages/client/components/app/interface/settings/ChannelSettings.tsx +++ b/packages/client/components/app/interface/settings/ChannelSettings.tsx @@ -19,6 +19,7 @@ import { ChannelPermissionsEditor } from "./channel/permissions/ChannelPermissio import { ChannelPermissionsOverview } from "./channel/permissions/ChannelPermissionsOverview"; import { ViewWebhook } from "./channel/webhooks/ViewWebhook"; import { WebhooksList } from "./channel/webhooks/WebhooksList"; +import { BackCard } from "./user/_AccountCard"; const Config: SettingsConfiguration = { /** @@ -98,11 +99,12 @@ const Config: SettingsConfiguration = { * Generate list of categories / entries for channel settings * @returns List */ - list(channel) { + list(channel, onClose) { const { openModal } = useModals(); return { context: channel, + prepend: , entries: [ { title: , diff --git a/packages/client/components/app/interface/settings/ServerSettings.tsx b/packages/client/components/app/interface/settings/ServerSettings.tsx index c7b48002e..28d880332 100644 --- a/packages/client/components/app/interface/settings/ServerSettings.tsx +++ b/packages/client/components/app/interface/settings/ServerSettings.tsx @@ -24,6 +24,7 @@ import { EmojiList } from "./server/emojis/EmojiList"; import { ListServerInvites } from "./server/invites/ListServerInvites"; import { ServerRoleEditor } from "./server/roles/ServerRoleEditor"; import { ServerRoleOverview } from "./server/roles/ServerRoleOverview"; +import { BackCard } from "./user/_AccountCard"; const Config: SettingsConfiguration = { /** @@ -89,12 +90,13 @@ const Config: SettingsConfiguration = { * Generate list of categories / entries for server settings * @returns List */ - list(server) { + list(server, onClose) { const user = useUser(); const { openModal } = useModals(); return { context: server, + prepend: , entries: [ { title: , From 7c009fc50ba409286724d48d34f1f3497a1973de Mon Sep 17 00:00:00 2001 From: Pecacheu <3608878+Pecacheu@users.noreply.github.com> Date: Sun, 15 Feb 2026 14:59:32 -0500 Subject: [PATCH 05/24] fix: Simplified CSS - Found a better spot to put the @media query so that it's all in one place for easier maintence - Hide breadcrums at top in "My Account" panel to fix visual bug where there's still a gap there despite no title - Center ESC button text properly Signed-off-by: Pecacheu <3608878+Pecacheu@users.noreply.github.com> --- .../interface/settings/_layout/Content.tsx | 34 ++++++++----------- .../interface/settings/_layout/Sidebar.tsx | 6 +--- .../settings/_layout/SidebarButton.tsx | 7 ---- .../interface/settings/user/_AccountCard.tsx | 8 ++--- .../components/modal/modals/Settings.tsx | 31 ++++++++++++----- 5 files changed, 40 insertions(+), 46 deletions(-) diff --git a/packages/client/components/app/interface/settings/_layout/Content.tsx b/packages/client/components/app/interface/settings/_layout/Content.tsx index adf17a331..efe91ef8c 100644 --- a/packages/client/components/app/interface/settings/_layout/Content.tsx +++ b/packages/client/components/app/interface/settings/_layout/Content.tsx @@ -29,24 +29,26 @@ export function SettingsContent(props: { }} > - + - - - props.title(props.list() as SettingsList, key) - } - navigate={(keys) => navigate(keys.join("/"))} - /> - + + + + props.title(props.list() as SettingsList, key) + } + navigate={(keys) => navigate(keys.join("/"))} + /> + + {props.children}
- + @@ -88,10 +90,6 @@ const InnerContent = styled("div", { padding: "80px 32px", justifyContent: "stretch", zIndex: 1, - - "@media (max-width: 800px)": { - padding: "12px" - } }, }); @@ -125,14 +123,10 @@ const CloseAction = styled("div", { marginTop: "4px", display: "flex", justifyContent: "center", - width: "36px", + width: "40px", fontWeight: 600, color: "var(--md-sys-color-on-surface)", fontSize: "0.75rem", }, - - "@media (max-width: 800px)": { - display: "none" - } }, }); diff --git a/packages/client/components/app/interface/settings/_layout/Sidebar.tsx b/packages/client/components/app/interface/settings/_layout/Sidebar.tsx index 3aa3f0879..c366dbf08 100644 --- a/packages/client/components/app/interface/settings/_layout/Sidebar.tsx +++ b/packages/client/components/app/interface/settings/_layout/Sidebar.tsx @@ -38,7 +38,7 @@ export function SettingsSidebar(props: { return (
- + {list.prepend} @@ -123,10 +123,6 @@ const Content = styled("div", { "& a > div": { margin: 0, }, - - "@media (max-width: 800px)": { - padding: "12px 0" - } }, }); diff --git a/packages/client/components/app/interface/settings/_layout/SidebarButton.tsx b/packages/client/components/app/interface/settings/_layout/SidebarButton.tsx index acb2528de..9cfafa668 100644 --- a/packages/client/components/app/interface/settings/_layout/SidebarButton.tsx +++ b/packages/client/components/app/interface/settings/_layout/SidebarButton.tsx @@ -7,9 +7,7 @@ export const SidebarButton = styled("a", { base: { // for : position: "relative", - minWidth: 0, - display: "flex", alignItems: "center", padding: "6px 8px", @@ -33,11 +31,6 @@ export const SidebarButton = styled("a", { background: "var(--md-sys-color-primary-container)", }, }, - mobileOnly: { - true: { - "@media (min-width: 800px)": {display: "none"} - } - } }, }); diff --git a/packages/client/components/app/interface/settings/user/_AccountCard.tsx b/packages/client/components/app/interface/settings/user/_AccountCard.tsx index f0ffdf0a8..f93b10faa 100644 --- a/packages/client/components/app/interface/settings/user/_AccountCard.tsx +++ b/packages/client/components/app/interface/settings/user/_AccountCard.tsx @@ -43,11 +43,9 @@ export function AccountCard() { ); } -export function BackCard(props: { - onClose?: () => void; -}) { +export function BackCard(props: { onClose?: () => void }) { return ( - + @@ -57,4 +55,4 @@ export function BackCard(props: { ); -} \ No newline at end of file +} diff --git a/packages/client/components/modal/modals/Settings.tsx b/packages/client/components/modal/modals/Settings.tsx index eb9343d4b..a47a87770 100644 --- a/packages/client/components/modal/modals/Settings.tsx +++ b/packages/client/components/modal/modals/Settings.tsx @@ -5,6 +5,7 @@ import { Motion, Presence } from "solid-motionone"; import { Settings, SettingsConfigurations } from "@revolt/app"; import { DialogProps } from "@revolt/ui"; +import { styled } from "styled-system/jsx"; import { Modals } from "../types"; /** @@ -31,14 +32,7 @@ export function SettingsModal( > - - +
); } + +const Base = styled(Motion.div, { + base: { + height: "100%", + pointerEvents: "all", + display: "flex", + color: "var(--md-sys-color-on-surface)", + background: "var(--md-sys-color-surface-container-highest)", + + //Tablet view + "& .setMobileBack": { display: "none" }, + "@media (max-width: 800px)": { + "& .setCont": { padding: "12px" }, + "& .setSidebar": { padding: "12px 0" }, + "& .setClose": { display: "none" }, + "& .setMobileBack": { display: "flex" }, + }, + }, +}); From eef94606d83a5f482dbe180ed08f0d280815a18e Mon Sep 17 00:00:00 2001 From: Pecacheu <3608878+Pecacheu@users.noreply.github.com> Date: Mon, 16 Feb 2026 01:15:22 -0500 Subject: [PATCH 06/24] fix: Move the CSS again & misc - I swear this is the last time lol. Now using classes for everything instead of just some of it, will also help with changes for phone view - Change threshold for tablet view to 900px - Fix modal button touch event prorogation bug causing touches to glitch through as it closes Signed-off-by: Pecacheu <3608878+Pecacheu@users.noreply.github.com> --- .../interface/settings/_layout/Content.tsx | 6 +--- .../interface/settings/_layout/Sidebar.tsx | 3 +- .../components/modal/modals/Settings.tsx | 25 ++------------ .../ui/components/design/Button.tsx | 8 +++++ .../ui/components/design/IconButton.tsx | 8 +++++ packages/client/components/ui/styles.css | 33 +++++++++++++++++-- packages/client/src/Interface.tsx | 12 ++----- packages/client/src/interface/Sidebar.tsx | 2 +- .../navigation/channels/HomeSidebar.tsx | 2 +- .../navigation/channels/ServerSidebar.tsx | 5 ++- 10 files changed, 61 insertions(+), 43 deletions(-) diff --git a/packages/client/components/app/interface/settings/_layout/Content.tsx b/packages/client/components/app/interface/settings/_layout/Content.tsx index efe91ef8c..d1bbce27a 100644 --- a/packages/client/components/app/interface/settings/_layout/Content.tsx +++ b/packages/client/components/app/interface/settings/_layout/Content.tsx @@ -23,11 +23,7 @@ export function SettingsContent(props: { const { navigate } = useSettingsNavigation(); return ( -
+
diff --git a/packages/client/components/app/interface/settings/_layout/Sidebar.tsx b/packages/client/components/app/interface/settings/_layout/Sidebar.tsx index c366dbf08..1635b0a73 100644 --- a/packages/client/components/app/interface/settings/_layout/Sidebar.tsx +++ b/packages/client/components/app/interface/settings/_layout/Sidebar.tsx @@ -36,7 +36,7 @@ export function SettingsSidebar(props: { }); return ( - +
@@ -104,6 +104,7 @@ const Base = styled("div", { flex: "1 0 218px", paddingLeft: "8px", justifyContent: "flex-end", + height: "100%", }, }); diff --git a/packages/client/components/modal/modals/Settings.tsx b/packages/client/components/modal/modals/Settings.tsx index a47a87770..9a14aae5c 100644 --- a/packages/client/components/modal/modals/Settings.tsx +++ b/packages/client/components/modal/modals/Settings.tsx @@ -5,7 +5,6 @@ import { Motion, Presence } from "solid-motionone"; import { Settings, SettingsConfigurations } from "@revolt/app"; import { DialogProps } from "@revolt/ui"; -import { styled } from "styled-system/jsx"; import { Modals } from "../types"; /** @@ -32,7 +31,8 @@ export function SettingsModal( > - - +
); } - -const Base = styled(Motion.div, { - base: { - height: "100%", - pointerEvents: "all", - display: "flex", - color: "var(--md-sys-color-on-surface)", - background: "var(--md-sys-color-surface-container-highest)", - - //Tablet view - "& .setMobileBack": { display: "none" }, - "@media (max-width: 800px)": { - "& .setCont": { padding: "12px" }, - "& .setSidebar": { padding: "12px 0" }, - "& .setClose": { display: "none" }, - "& .setMobileBack": { display: "flex" }, - }, - }, -}); diff --git a/packages/client/components/ui/components/design/Button.tsx b/packages/client/components/ui/components/design/Button.tsx index c142304a0..e75dac45e 100644 --- a/packages/client/components/ui/components/design/Button.tsx +++ b/packages/client/components/ui/components/design/Button.tsx @@ -119,10 +119,18 @@ export function Button(props: Props) { ); const { buttonProps } = createButton(rest, () => ref); + + function stopProp(e: TouchEvent) { + e.preventDefault(); + e.stopPropagation(); + } + return (