Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
c079914
Fix room header members icon not filled when enabled
GimleLarpes Jun 19, 2025
2fae418
fix hierarchy indenting and order
GimleLarpes Jun 27, 2025
6b3841c
Partially fix collapse behaviour
GimleLarpes Jun 28, 2025
a9fa1aa
remove getInCollapedCategories
GimleLarpes Jun 28, 2025
2570e5e
Merge branch 'cinnyapp:dev' into improve-space
GimleLarpes Jun 28, 2025
6ff0260
fix collapse behaviour
GimleLarpes Jun 28, 2025
a55065b
bugfix
GimleLarpes Jun 29, 2025
64fc306
improve lobby
GimleLarpes Jun 29, 2025
56dfc6a
Undo breaking change
GimleLarpes Jun 30, 2025
e417b18
minor changes
GimleLarpes Jun 30, 2025
8580c2d
Revert "Fix room header members icon not filled when enabled"
GimleLarpes Jun 30, 2025
9b5ce37
bugfix and polishing
GimleLarpes Jul 3, 2025
0f3f4a8
Merge branch 'cinnyapp:dev' into improve-space
GimleLarpes Jul 4, 2025
c0056ea
Merge branch 'dev' into improve-space
GimleLarpes Jul 5, 2025
ae75ee7
Merge branch 'dev' into improve-space
GimleLarpes Jul 17, 2025
18082ff
show space header if subspaces contain rooms
GimleLarpes Jul 25, 2025
10a2f8c
Merge branch 'dev' into improve-space
GimleLarpes Jul 25, 2025
b4d7f52
fix docstring
GimleLarpes Jul 25, 2025
df8ba32
improve function naming
GimleLarpes Jul 27, 2025
71e775f
Merge branch 'dev' into improve-space
GimleLarpes Jul 27, 2025
4947efe
improve performance
GimleLarpes Jul 28, 2025
b9ce251
Merge branch 'dev' into improve-space
GimleLarpes Sep 16, 2025
24b3b9c
clean up conflicts
GimleLarpes Sep 16, 2025
30f809e
Merge branch 'cinnyapp:dev' into improve-space
GimleLarpes Jan 29, 2026
9fc2452
Merge branch 'dev' into improve-space
GimleLarpes Feb 12, 2026
d7f85de
Documentation, fix recursion error
GimleLarpes Feb 12, 2026
dce97cf
minor formatting
GimleLarpes Feb 12, 2026
056adb8
Use spaceRooms in Space, bugfixing, fix Lobby recursion
GimleLarpes Feb 13, 2026
1333ee0
optimizations
GimleLarpes Feb 13, 2026
694ca21
fix cache in Lobby
GimleLarpes Feb 13, 2026
8d93671
support multiple reuse of spaces, fix recursion errors when encounter…
GimleLarpes Feb 14, 2026
61c0453
Merge commit '8d93671b' from GimleLarpes/cinny into improve-space
KaceCottam Mar 13, 2026
bf36587
Update Space sidebar with depth-based link to space lobby
KaceCottam Mar 14, 2026
1445f3f
Merge branch 'dev' into improve-space
KaceCottam Mar 14, 2026
8c4f5e5
Initial modification of Space navbar to have svg thread lines
KaceCottam Mar 15, 2026
515b378
Added setting to control depth limit and cleaned up the code
KaceCottam Mar 15, 2026
557f3fc
Add "Open Lobby" for subspaces in lobby view
KaceCottam Mar 17, 2026
ad3e907
Run lint fix and fmt
KaceCottam Mar 17, 2026
689aee5
Merge branch 'dev' of https://github.com/SableClient/Sable into impro…
KaceCottam Mar 17, 2026
e904a54
resolve issues after linting
KaceCottam Mar 17, 2026
e69fc12
another lint check
KaceCottam Mar 17, 2026
10a2c40
Improve nested displays and clean up UI for small displays
KaceCottam Mar 18, 2026
f4d454c
Ran formatting and lint checks.
KaceCottam Mar 19, 2026
0dd44ba
Add back the button, but removed from subspaces
KaceCottam Mar 19, 2026
7e22cac
Add changeset
KaceCottam Mar 19, 2026
a7fb89c
Ran pnpm lint:fix and fmt
KaceCottam Mar 19, 2026
ab1fc15
Merge branch 'dev' into improve-space
KaceCottam Mar 19, 2026
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
9 changes: 9 additions & 0 deletions .changeset/implements_improved_subspace_rendering.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
default: minor
---

# Implemented improved subspace rendering

Navbar and Lobby view now represent the hierarchy of subspaces via guide lines.
Depth of subspace limit is customizable with a setting.
Also changes the navbar collapse/extpanded arrows to be on the right of the categories.
30 changes: 28 additions & 2 deletions src/app/features/add-existing/AddExisting.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -83,13 +83,39 @@ export function AddExistingModal({ parentId, space, requestClose }: AddExistingM
const allRoomsSet = useAllJoinedRoomsSet();
const getRoom = useGetRoom(allRoomsSet);

/**
* Recursively checks if a given sourceId room is an ancestor to the targetId space.
*
* @param sourceId - The room to check.
* @param targetId - The space ID to check against.
* @param visited - Set used to prevent recursion errors.
* @returns True if rId is an ancestor of targetId.
*/
const isAncestor = useCallback(
(sourceId: string, targetId: string, visited: Set<string> = new Set()): boolean => {
// Prevent infinite recursion
if (visited.has(targetId)) return false;
visited.add(targetId);

const parentIds = roomIdToParents.get(targetId);
if (!parentIds) return false;

if (parentIds.has(sourceId)) {
return true;
}

return Array.from(parentIds).some((id) => isAncestor(sourceId, id, visited));
},
[roomIdToParents]
);

const allItems: string[] = useMemo(() => {
const rIds = space ? [...spaces] : [...rooms, ...directs];

return rIds
.filter((rId) => rId !== parentId && !roomIdToParents.get(rId)?.has(parentId))
.filter((rId) => rId !== parentId && !isAncestor(rId, parentId))
.sort(factoryRoomIdByAtoZ(mx));
}, [spaces, rooms, directs, space, parentId, roomIdToParents, mx]);
}, [space, spaces, rooms, directs, mx, parentId, isAncestor]);

const getRoomNameStr: SearchItemStrGetter<string> = useCallback(
(rId) => getRoom(rId)?.name ?? rId,
Expand Down
2 changes: 1 addition & 1 deletion src/app/features/lobby/DnD.css.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export const ItemDraggableTarget = style([
top: 0,
zIndex: 1,
cursor: 'grab',
borderRadius: config.radii.R400,
borderRadius: 0,
opacity: config.opacity.P300,

':active': {
Expand Down
15 changes: 15 additions & 0 deletions src/app/features/lobby/HierarchyItemMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ import { IPowerLevels } from '$hooks/usePowerLevels';
import { getRoomCreatorsForRoomId } from '$hooks/useRoomCreators';
import { getRoomPermissionsAPI } from '$hooks/useRoomPermissions';
import { InviteUserPrompt } from '$components/invite-user-prompt';
import { getCanonicalAliasOrRoomId } from '$utils/matrix';
import { useNavigate } from 'react-router-dom';
import { getSpaceLobbyPath } from '$pages/pathUtils';

type HierarchyItemWithParent = HierarchyItem & {
parentId: string;
Expand Down Expand Up @@ -227,6 +230,7 @@ export function HierarchyItemMenu({
};

const handleRequestClose = useCallback(() => setMenuAnchor(undefined), []);
const navigate = useNavigate();

if (!joined && !canEditChild) {
return null;
Expand Down Expand Up @@ -278,6 +282,17 @@ export function HierarchyItemMenu({
</Text>
</MenuItem>
)}
<MenuItem
size="300"
radii="300"
onClick={() => {
navigate(getSpaceLobbyPath(getCanonicalAliasOrRoomId(mx, item.roomId)));
}}
>
<Text as="span" size="T300" truncate>
Open Lobby
</Text>
</MenuItem>
<InviteMenuItem
item={item}
requestClose={handleRequestClose}
Expand Down
Loading
Loading