-
Notifications
You must be signed in to change notification settings - Fork 292
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
fix: ChatInput Formatter Tool UI for small screens #693
fix: ChatInput Formatter Tool UI for small screens #693
Conversation
Hey @abirc8010 it looks very good, but a suggestion you just put only formatters in that 3 dot menu. it would be better for user to find audio, video, and file upload buttons if they are displayed and visible on chatformatting toolbar. also you can see in layout editor, the formatters are not adjustable, and audio video and file upload are adjustable. the code I shared to you in that merged pr is based on this feature |
@devanshkansagra I have considered moving the video and files to 3-dot menu so that clicking the audio message does not cause other icons (video, file) to be shifted outside the toolbar. Screencast.from.2024-12-18.11-16-22.webm |
then it might be difficult to edit layout of embeddedchat using layout_editor, or else do one thing, try to remove the margins from sides(left and right) of chat input box on small screen keeping only formatters in 3 dots. just for visualization how it would look, whether it will look consistent or not? |
Screencast.from.2024-12-19.00-36-52.webm@devanshkansagra @Spiral-Memory will it be ok to make the message box occupy the entire width ? |
Hi @abirc8010 and @devanshkansagra , Let’s make it configurable. In mobile mode, let the user (the one setting up EC) decide what they want to keep visible and which options should go into the three-dot menu, similar to how this is configurable in the theme object. @devanshkansagra , maybe you can connect with @abirc8010 to guide him on this or collaborate together on it. |
Sure |
Hey @devanshkansagra @Spiral-Memory Screencast.from.2024-12-24.14-18-10.webm |
Hey @abirc8010, this thing we already have in layout_editor check #607 where we can customize the ui of embeddedchat. so can you tell me why did you implemented here? |
also I don't think we needed this modification of drag and drop here because we don't want that non-admin users should modify the ui otherwise every user will able modify the position of the buttons where they want to and each time the ui of that fomratting toolbar will be changed so it will be difficult for other users to handle new modification each time |
Hey @devanshkansagra after reading this , I thought we need to implement it the same way as it's done in the layout editor. Could you please clarify the intended behavior? |
Ohh my bad I didn't read that comment, I was bit busy a bit since few days and without reading that entire comment I texted sure 😅 |
A problem here till now is that the user's preferences are not stored, so every time the user reloads or visits again, the toolbars revert to their default state. |
It is because default layout is set by layout editor and you are modifying in the environment hence it does not modify the layout editor theme obj so if the page gets refreshed it will reset the changes |
Hi @abirc8010 , It’s important to understand that EmbeddedChat is not a standalone chatting app. It’s presented inside Storybook for development purposes only. Its primary purpose is to be embedded into any website, offering the power of Rocket.Chat and the customizability provided by the external developer configuring it. While setting it up, the developer can define the theme object accordingly. |
You may look into this repo to understand the purpose of EmbeddedChat : https://github.com/Spiral-Memory/rc-app-demo-page |
e379c57
to
0cc4ce4
Compare
Hey @Spiral-Memory @devanshkansagra I have made the message box configurable eg:
for large screen we have: for smaller screen we have: |
Hey @abirc8010, Can you share the working video regarding this or @Spiral-Memory can you please approve this pr to test? |
@devanshkansagra Here is the working video. You mainly need to pass two additional configurations: If these configurations are not provided, the default behavior will place emoji, audio, video, and file options outside the popover menu, while formatters will remain inside it. working.webm |
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.
Approving to test
Hey @Spiral-Memory I can see a 'link' option is added for the chatInputToolbar , should I consider moving it inside the popover menu or keep it outside by default ? |
…eddedChat into fix/message-box-UI
@Spiral-Memory I made it occupy the full screen so that while recording audio other icons do not get shifted out of boundary |
I am not quite sure about this as this seems to be fine from my end. |
Can we please keep the space same as before You can occupy full width, after a breakpoint if needed, but that too, keep the font size consistent as before |
Hey @Spiral-Memory I made the input box occupy full width only for smaller screens |
Hi @abirc8010 |
Hey @Spiral-Memory I made the modification. |
Brief Title
Moved formatters, video and file attachment to popover menu for small screens
Acceptance Criteria fulfillment
@media(max-width: 400px)
) to render the VideoMessageRecorder inside the popover.Video/Screenshots
Screencast.from.2025-01-15.02-39-34.webm
Note: The PR will be ready for live testing at https://rocketchat.github.io/EmbeddedChat/pulls/pr-693 after approval. Contributors are requested to replace
<pr_number>
with the actual PR number.