Skip to content
Open
Show file tree
Hide file tree
Changes from 15 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .envrc
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The 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 @@
use nix
26 changes: 26 additions & 0 deletions shell.nix
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The 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 ];

}
2 changes: 1 addition & 1 deletion stylesheets/_modules.scss
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@
// Module: Conversation List Item
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure where this is coming from yet, but the attachment corner disappeared on this build.

Left is your build, right is current prod

Image


.module-conversation-list-item {
max-width: 300px;
max-width: 100%;
display: flex;
flex-direction: row;
padding-inline-end: 16px;
Expand Down
12 changes: 11 additions & 1 deletion stylesheets/_session_conversation.scss
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you make those
min-width: 680px
a css var
you can add it to globals.scss

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The 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:
https://developer.mozilla.org/en-US/docs/Web/CSS/Guides/Cascading_variables/Using_custom_properties.

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) {
Expand All @@ -34,6 +37,13 @@
}
}

.mobile-close-conversation {
display: block;
@media screen and (min-width: 680px) {
display: none;
}
}
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this should be a styled component (i.e. in the tsx file)_

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The 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;
Expand Down
17 changes: 17 additions & 0 deletions stylesheets/_session_left_pane.scss
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The 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

21 changes: 16 additions & 5 deletions ts/components/SessionInboxView.tsx
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) => {
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The 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.
Maybe the 680 & 679 px should be bigger?

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) {
Expand Down
2 changes: 1 addition & 1 deletion ts/components/SplitViewContainer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ const TopSplitViewPanel = ({
topHeight: number | undefined;
setTopHeight: (value: number) => void;
}) => {
const topRef = useRef<HTMLDivElement>(null);
const topRef = useRef<HTMLDivElement | null>(null);
useEffect(() => {
if (topRef.current) {
if (!topHeight) {
Expand Down
15 changes: 14 additions & 1 deletion ts/components/conversation/header/ConversationHeader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,21 @@ import { ConversationTypeEnum } from '../../../models/types';
import { Constants } from '../../../session';
import { useShowConversationSettingsFor } from '../../menuAndSettingsHooks/useShowConversationSettingsFor';
import { sectionActions } from '../../../state/ducks/section';
import { SessionLucideIconButton } from '../../icon/SessionIconButton';
import { LUCIDE_ICONS_UNICODE } from '../../icon/lucide';
import { resetConversationExternal } from '../../../state/ducks/conversations';

const StyledConversationHeader = styled.div`
display: flex;
flex-direction: row;
align-items: center;
height: var(--main-view-header-height);
position: relative;
padding: 0px var(--margins-lg) 0px var(--margins-sm);
background: var(--background-primary-color);
padding: 0px var(--margins-lg) 0px var(--margins-lg);
@media screen and (min-width: 680px) {
padding: 0px var(--margins-lg) 0px var(--margins-sm);
}
`;

export const ConversationHeaderWithDetails = () => {
Expand All @@ -62,6 +68,13 @@ export const ConversationHeaderWithDetails = () => {
width="100%"
$flexGrow={1}
>
<div className="mobile-close-conversation">
<SessionLucideIconButton
iconSize={'large'}
unicode={LUCIDE_ICONS_UNICODE.X}
onClick={() => window?.inboxStore?.dispatch(resetConversationExternal())}
/>
</div>
<ConversationHeaderTitle
showSubtitle={!isOutgoingRequest && !isIncomingRequest && !isBlocked}
/>
Expand Down
18 changes: 14 additions & 4 deletions ts/components/leftpane/LeftPane.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,18 @@ import { useIsRtl } from '../../util/i18n/rtlSupport';
export const leftPaneListWidth = 300; // var(--left-panel-width) without the 80px of the action gutter

const StyledLeftPane = styled.div<{ $isRtl: boolean }>`
width: ${() => `${leftPaneListWidth}px`};
height: 100%;
width: 100%;
@media screen and (min-width: 680px) {
width: ${() => `${leftPaneListWidth}px`};
height: 100%;
border-left: 1px solid var(--border-color);
border-right: 1px solid var(--border-color);
}
height: calc(100% - 76px);
display: inline-flex;
flex-direction: column;
position: relative;
flex-shrink: 0;
border-left: 1px solid var(--border-color);
border-right: 1px solid var(--border-color);
direction: ${({ $isRtl }) => ($isRtl ? 'rtl' : 'ltr')};
`;

Expand All @@ -38,7 +42,13 @@ const CallContainer = () => {

const StyledLeftPaneSession = styled.div`
display: flex;
flex-direction: column-reverse;
height: 100%;
width: 100%;

@media screen and (min-width: 680px) {
flex-direction: row;
}
`;

export const LeftPane = () => {
Expand Down
23 changes: 17 additions & 6 deletions ts/components/leftpane/LeftPaneSectionContainer.tsx
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) {
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same comment here, we need a css var for max-width: 679px

z-index: -1;
}
}
`;
14 changes: 9 additions & 5 deletions ts/components/registration/components/Hero.tsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,17 @@
import styled from 'styled-components';

const StyledHeroContainer = styled.div`
width: 40%;
height: 100%;
display: none;

div {
width: 100%;
@media screen and (min-width: 680px) {
display: block;
width: 40%;
height: 100%;
overflow: hidden;
div {
width: 100%;
height: 100%;
overflow: hidden;
}
}
`;

Expand Down
2 changes: 1 addition & 1 deletion ts/localization
2 changes: 1 addition & 1 deletion ts/mains/main_node.ts
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ function getDefaultWindowSize() {
return {
defaultWidth: 880,
defaultHeight: openDevToolsTestIntegration() ? 1000 : 820, // the dev tools open at the bottom hide some stuff which should be visible
minWidth: 880,
minWidth: 380,
minHeight: 600,
};
}
Expand Down
Loading