feat(room-preview): preview affordance in space lobby + explore grids
Follow-up to the room-preview work so you can actually reach a preview from the room lists, not just via a matrix.to link: - Space lobby (RoomItem): un-joined child rooms now show an Eye 'Preview' chip next to Join. It routes through the existing onOpen (data-room-id -> space/room path), which renders the full JoinBeforeNavigate preview card because the room isn't joined. - Explore grids (Server + Featured): pass join_rule (and encryption, where the summary provides it) to RoomCard, so the directory/featured cards — which already are full preview cards — now show the join-rule chip and a Request-to-join button for knock rooms instead of a Join that fails. 738 tests pass, build clean. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -70,6 +70,8 @@ export function FeaturedRooms() {
|
||||
name={roomSummary?.name}
|
||||
topic={roomSummary?.topic}
|
||||
memberCount={roomSummary?.num_joined_members}
|
||||
joinRule={roomSummary?.join_rule}
|
||||
encrypted={!!roomSummary?.['im.nheko.summary.encryption']}
|
||||
onView={navigateSpace}
|
||||
renderTopicViewer={(name, topic, requestClose) => (
|
||||
<RoomTopicViewer
|
||||
@@ -101,6 +103,8 @@ export function FeaturedRooms() {
|
||||
name={roomSummary?.name}
|
||||
topic={roomSummary?.topic}
|
||||
memberCount={roomSummary?.num_joined_members}
|
||||
joinRule={roomSummary?.join_rule}
|
||||
encrypted={!!roomSummary?.['im.nheko.summary.encryption']}
|
||||
onView={navigateRoom}
|
||||
renderTopicViewer={(name, topic, requestClose) => (
|
||||
<RoomTopicViewer
|
||||
|
||||
@@ -604,6 +604,7 @@ export function PublicRooms() {
|
||||
topic={chunkRoom.topic}
|
||||
memberCount={chunkRoom.num_joined_members}
|
||||
roomType={chunkRoom.room_type}
|
||||
joinRule={chunkRoom.join_rule}
|
||||
onView={
|
||||
chunkRoom.room_type === RoomType.Space
|
||||
? navigateSpace
|
||||
|
||||
Reference in New Issue
Block a user