Skip to content
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

/chat: Use Element "home screen" to create new chats #115

Merged
merged 2 commits into from
Dec 6, 2023

Conversation

fnwbr
Copy link
Member

@fnwbr fnwbr commented Dec 6, 2023

This basically supersedes and replaces #38 -- and does everything we want (see screenshots below).
Navigation on mobile is supported just like we do it for /write or /sketch: use your "back" button (or swipe on mobile devices) to go back to the previous page.

image
Screen Shot 2023-12-06 at 15 15 01 Screen Shot 2023-12-06 at 15 14 56

@@ -189,7 +208,7 @@ export default function Chat() {
<iframe
ref={iframe}
title="/chat"
src={`${getConfig().publicRuntimeConfig.chat.pathToElement}/#/room/${roomId}`}
src={`${getConfig().publicRuntimeConfig.chat.pathToElement}/#/${roomId === 'new' ? 'home' : `room/${roomId}`}`}
Copy link
Member Author

Choose a reason for hiding this comment

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

@aofn @andirueckel This is basically all the logic change that was necessary: think of it as a new page under /chat/new.

  • If we navigate to /chat/new and therefore roomId === "new": Show that Element home screen,
  • ... or: If we have a roomId such as /chat/<blablabla> show that inside Element (just like before),
  • ... and otherwise: make /chat show nothing but the sidebar... (just like before; and just like /write or /sketch)

@fnwbr fnwbr merged commit 82646fd into main Dec 6, 2023
@fnwbr fnwbr deleted the chat-create-messages-alternative branch December 6, 2023 14:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant