-
Notifications
You must be signed in to change notification settings - Fork 92
Feat/mobile optimised UI #1786
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: dev
Are you sure you want to change the base?
Feat/mobile optimised UI #1786
Changes from 15 commits
2735ead
70fa5a5
a5a6ea6
409d4d6
c54042f
07eeabf
43e4125
6b72ac8
5f5df47
1041937
c3fea35
3aed295
c1b8777
4cfce5d
06e9b28
8f79f5b
89d0366
7da23f6
e1e991f
78af1d2
0c2f8f2
81482f1
07961ab
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| use nix |
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. to remove |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,26 @@ | ||
| { pkgs ? import <nixpkgs> {} }: | ||
|
|
||
| pkgs.mkShell { | ||
|
|
||
| name = "session-desktop"; | ||
| packages = with pkgs; [ | ||
| nodejs_20 | ||
| nodeenv | ||
| python314 | ||
| cmake | ||
| gnumake | ||
| nodeenv | ||
| (pkgs.yarn.override { | ||
| nodejs = null; | ||
| }) | ||
| ]; | ||
|
|
||
| env = { | ||
| }; | ||
|
|
||
| shellHook = '' | ||
| ''; | ||
|
|
||
| LD_LIBRARY_PATH = with pkgs; pkgs.lib.makeLibraryPath [ nss nspr dbus cups gtk3 libxcomposite libgbm expat libxkbcommon alsa-lib ]; | ||
|
|
||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -281,7 +281,7 @@ | |
| // Module: Conversation List Item | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
|
|
||
| .module-conversation-list-item { | ||
| max-width: 300px; | ||
| max-width: 100%; | ||
| display: flex; | ||
| flex-direction: row; | ||
| padding-inline-end: 16px; | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -23,8 +23,11 @@ | |
| flex-grow: 1; | ||
| display: flex; | ||
| flex-direction: column; | ||
| width: var(--main-panel-content-width); | ||
| width: 1px; | ||
| height: 100%; | ||
| @media screen and (min-width: 680px) { | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. can you make those
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Apparently css vars within media queries is not a thing, at least not today: we could try doing sass variable instead if you're OK with that. |
||
| width: var(--main-panel-content-width); | ||
| } | ||
|
|
||
| .selection-mode { | ||
| .messages-container > *:not(.message-selected) { | ||
|
|
@@ -34,6 +37,13 @@ | |
| } | ||
| } | ||
|
|
||
| .mobile-close-conversation { | ||
| display: block; | ||
| @media screen and (min-width: 680px) { | ||
| display: none; | ||
| } | ||
| } | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this should be a styled component (i.e. in the tsx file)_
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. how would i need to pass sass'es $mobile-ui-breakpoint, since css var() does not work within @media ...? |
||
|
|
||
| .conversation-content { | ||
| display: flex; | ||
| flex-grow: 1; | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -16,3 +16,20 @@ | |
| flex-grow: 0; | ||
| padding-inline-end: 5px; | ||
| } | ||
|
|
||
| .module-session-inbox-view__styled_gutter { | ||
| transition: none; | ||
| width: 100%; | ||
| @media screen and (min-width: 680px) { | ||
| width: var(--left-panel-width); | ||
| } | ||
| } | ||
| .mobile-active-conversation { | ||
| width: 1px; | ||
| margin-left: -1px; | ||
| @media screen and (min-width: 680px) { | ||
| width: 100%; | ||
| margin-left: 0px; | ||
| max-width: var(--left-panel-width); | ||
| } | ||
| } | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this should be using the existing Styled component logic. Can you have it fixed that way? i.e. in the tsx what we had in onst StyledGutter = styled.div`
width: var(--left-panel-width) !important;
transition: none;
`;but with your extra changes |
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,15 +1,26 @@ | ||
| import { Provider } from 'react-redux'; | ||
| import styled from 'styled-components'; | ||
| import { AnimatePresence } from 'framer-motion'; | ||
| import { clsx } from 'clsx'; | ||
| import { LeftPane } from './leftpane/LeftPane'; | ||
| import { SessionMainPanel } from './SessionMainPanel'; | ||
| import { SessionTheme } from '../themes/SessionTheme'; | ||
| import { Flex } from './basic/Flex'; | ||
| import { useSelectedConversationKey } from '../state/selectors/selectedConversation'; | ||
|
|
||
| const StyledGutter = styled.div` | ||
| width: var(--left-panel-width) !important; | ||
| transition: none; | ||
| `; | ||
| const StyledGutter = (props: any) => { | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Not related to this file specifically, but the right panel appears to be kind of broken. Screencast.From.2026-01-27.10-15-22.webm |
||
| const conversationKey = useSelectedConversationKey(); | ||
|
|
||
| return ( | ||
| <div | ||
| {...props} | ||
| className={clsx( | ||
| 'module-session-inbox-view__styled_gutter', | ||
| conversationKey && 'mobile-active-conversation' | ||
|
|
||
| )} | ||
| /> | ||
| ); | ||
| }; | ||
|
|
||
| export const SessionInboxView = () => { | ||
| if (!window.inboxStore) { | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,14 +1,25 @@ | ||
| import styled from 'styled-components'; | ||
|
|
||
| export const LeftPaneSectionContainer = styled.div` | ||
| width: var(--actions-panel-width); | ||
| display: flex; | ||
| flex-direction: column; | ||
| width: 100%; | ||
| justify-content: space-between; | ||
| align-items: center; | ||
| overflow-y: auto; | ||
| flex-shrink: 0; | ||
|
|
||
| .session-icon-button { | ||
| padding: 30px 20px; | ||
| @media screen and (min-width: 680px) { | ||
| width: var(--actions-panel-width); | ||
| flex-direction: column; | ||
| align-items: center; | ||
| overflow-y: auto; | ||
| flex-shrink: 0; | ||
|
|
||
| .session-icon-button { | ||
| padding: 30px 20px; | ||
| } | ||
| } | ||
| .mobile-active-conversation & { | ||
| @media screen and (max-width: 679px) { | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. same comment here, we need a css var for |
||
| z-index: -1; | ||
| } | ||
| } | ||
| `; | ||
| +1 −0 | generated/english.ts | |
| +1 −0 | generated/locales.ts | |
| +24 −0 | generated/translations.ts |

There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
to remove