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

Feat/#485 files menu option - sidebar #491

Merged
merged 13 commits into from
Mar 12, 2024

Conversation

umangutkarsh
Copy link
Contributor

Brief Title

Added a new section "Files Menu" where users can see all the files shared in the channel. It also supports a 'search file' functionality to search files by filtering out their name.

Acceptance Criteria fulfillment

  • Create a menu option, and a sidebar tab to view all shared 'Files'
  • Use the REST API endpoint to fetch all the files of that channel,
  • Integrate it with the existing codebase.

Note:

  1. This PR requires a rebuild as a new API calling is added.
  2. Adding a functionality of previewing the file will be a good addition, which can be dealt with in a separate issue.

Fixes #485

Video/Screenshots

files-menu.webm

@umangutkarsh
Copy link
Contributor Author

Will fix the linting issues.

Meanwhile, please review the PR.

@umangutkarsh
Copy link
Contributor Author

Hi @sidmohanty11 @abhinavkrin . Please review the PR.
Thanks.

@umangutkarsh
Copy link
Contributor Author

umangutkarsh commented Mar 10, 2024

Hi @sidmohanty11 . Please take a look into this whenever you are free.

Copy link
Collaborator

@sidmohanty11 sidmohanty11 left a comment

Choose a reason for hiding this comment

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

LGTM @umangutkarsh , just left a minor comment

@@ -135,7 +135,7 @@ const AudioMessageRecorder = () => {
if (file) {
setFile(null);
}
}, [isRecorded, file]);
}, [isRecorded, file, ECOptions.enableThreads, RCInstance, threadId]);
Copy link
Collaborator

Choose a reason for hiding this comment

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

Are you sure about this? There are some linting warnings for which a quick fix of adding dependencies actually messes things up and creates issues. If you are sure then fine

Copy link
Collaborator

Choose a reason for hiding this comment

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

I have faced such issues. That's why just letting you know...

Copy link
Contributor Author

@umangutkarsh umangutkarsh Mar 10, 2024

Choose a reason for hiding this comment

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

I think tried to check after adding these as dependencies. Everything was working fine I guess.
Still I'll once more look into to be sure.

Thanks for pointing this out.

Copy link
Collaborator

@Spiral-Memory Spiral-Memory Mar 10, 2024

Choose a reason for hiding this comment

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

I would suggest keeping the linting warnings as it is if you are not sure about it. Linting warnings won't create any issues while committing.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Yup agreed with @Spiral-Memory , can you please check @umangutkarsh if these are actually required and if its completely safe to go ahead with/without them

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hey @sidmohanty11 @Spiral-Memory . I've reverted and removed them from the dependencies so that nothing breaks.

Also one thing, after pulling the latest changes from the recent commits. The 'send-message' button is not working as expected.
Screenshot 2024-03-11 235358

It's opening this modal. Just wanted to confirm if this is something added or an issue.
Please let me know. Thanks.

Copy link
Collaborator

@Spiral-Memory Spiral-Memory Mar 11, 2024

Choose a reason for hiding this comment

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

Thank you so much, @umangutkarsh , for the notice. Yes, this was a new feature introduced to handle excessively long messages, but it wasn't intended to work this way. Yesterday, I made some changes to the sendMessage function and added a parameter there, which defaults to false, to check whether it is an attachment. By pressing Enter, everything was working fine. However, when using the send-btn, I was mistakenly assigning that function rather than calling it like ()=>sendMessage(). That's the reason this issue originated.

Thank you so much for the notice. I have just fixed it in #510. @sidmohanty11 , please review it.

@@ -50,7 +50,7 @@ const EmbeddedChat = ({
useEffect(() => {
setToastbarPosition(toastBarPosition);
setShowAvatar(showAvatar);
}, [toastBarPosition, showAvatar]);
}, [toastBarPosition, showAvatar, setShowAvatar, setToastbarPosition]);
Copy link
Collaborator

@Spiral-Memory Spiral-Memory Mar 11, 2024

Choose a reason for hiding this comment

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

I don't think it will cause an issue here with dependencies, still confirm it

Also confirm, there is no console errors. Rest LGTM!

@sidmohanty11 sidmohanty11 merged commit 5fa3ed1 into RocketChat:develop Mar 12, 2024
3 checks passed
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.

Feat: Add a 'Files' menu option view the files shared in the channel
3 participants