Skip to content

[NEW] Add author name in the info messages#1708

Closed
youssef-md wants to merge 4 commits intoRocketChat:developfrom
youssef-md:new.username-channel-info
Closed

[NEW] Add author name in the info messages#1708
youssef-md wants to merge 4 commits intoRocketChat:developfrom
youssef-md:new.username-channel-info

Conversation

@youssef-md
Copy link
Copy Markdown
Contributor

@RocketChat/ReactNative

Closes #1689

In this PR was done:

  • Added the name of the author of the action(join a room, delete a message)
  • Limited his name so that the entire info message stays in a single line

ezgif com-optimize

const Message = React.memo((props) => {
if (props.isThreadReply || props.isThreadSequential || props.isInfo) {
const thread = props.isThreadReply ? <RepliedThread {...props} /> : null;
const { username } = props.author;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

We'll have author always?

@localguru
Copy link
Copy Markdown

Hi, does the PR only publish the username? What if on server side "full name" is activated, then it should be Firstname Lastname @username Timestamp has xyz the channel. I also think there should be no difference in content between the app and browser/desktop client.

@diegolmello
Copy link
Copy Markdown
Member

@localguru Mobile has a very smaller space to show all those info without breaking line.
I'll talk to the design team about this.
Thanks.

@youssef-md youssef-md force-pushed the new.username-channel-info branch from 0a9c8b3 to f6383cb Compare February 12, 2020 20:37
@lgtm-com
Copy link
Copy Markdown

lgtm-com bot commented Feb 12, 2020

This pull request introduces 2 alerts when merging 2f294cc into 3a87872 - view on LGTM.com

new alerts:

  • 2 for Unused variable, import, function or class

@dkoo761
Copy link
Copy Markdown
Contributor

dkoo761 commented Sep 19, 2020

Just launched my first Rocket.Chat community today (🎉🎉🎉) and noticed this issue right away as soon as people started signing up :)

Is there a reason to try and keep it to one line? It seems like the way it works on the mobile web UI looks fine with it wrapping to 2 lines most of the time. I would prefer to keep all the info (avatar, full name, username, time joined, joined message) and have it wrap to 2 lines, rather than truncating the info.

@diegolmello
Copy link
Copy Markdown
Member

Just launched my first Rocket.Chat community today (🎉🎉🎉) and noticed this issue right away as soon as people started signing up :)

Is there a reason to try and keep it to one line? It seems like the way it works on the mobile web UI looks fine with it wrapping to 2 lines most of the time. I would prefer to keep all the info (avatar, full name, username, time joined, joined message) and have it wrap to 2 lines, rather than truncating the info.

Congrats on your community, man!
Yeah, we hold this PR just because we needed to tweak it a bit, but we've never found time to do it.
Hopefully we can take a look at it soon.

@dkoo761
Copy link
Copy Markdown
Contributor

dkoo761 commented Sep 19, 2020

@diegolmello Thanks! I'm really excited to be building a community on Rocket.Chat.

I've built many Meteor apps (been using it full-time since 2013) and also have experience building React Native apps for iOS and Android. How about I take a crack at fixing this up as my first Rocket.Chat issue? :)

@diegolmello
Copy link
Copy Markdown
Member

@dkoo761 Sure! Go ahead :)

@dkoo761
Copy link
Copy Markdown
Contributor

dkoo761 commented Sep 19, 2020

Great, thanks!

@dkoo761
Copy link
Copy Markdown
Contributor

dkoo761 commented Oct 7, 2020

@diegolmello I've got a local Rocket.Chat dev server environment up and running and am having a look through the code there before moving onto the React Native code. I've noticed that it takes about 4-5 minutes to restart after each code change. Is that normal? Seems like it would make development extremely slow. Could you share how you guys deal with that? Maybe you comment out imports or code you're not using for a specific feature or something?

Also, is there a better place to be asking general dev questions like this? I've tried asking on forums.rocket.chat and on open.rocket.chat but didn't get any reply on either one.

@dkoo761
Copy link
Copy Markdown
Contributor

dkoo761 commented Oct 7, 2020

I did some profiling and made a list of everything that took more than 1 second:

(#3) Total: 104,696 ms (Build App)

| Top leaves:
| files.readFile..........................................16,258 ms (47956)
| other ImportScanner#findImportedModuleIdentifiers.......14,636 ms (6832)
| files.stat..............................................12,892 ms (91138)
| other minifyCssFiles.....................................8,229 ms (2)
| Babel.compile............................................5,001 ms (4291)
| other compileUnibuild (the app)..........................3,391 ms (3)
| other ImportScanner#resolve..............................3,169 ms (30116)
| files.watchFile..........................................2,857 ms (174052)
| other plugin templating-compiler.........................2,593 ms (2)
| linker File#getPrelinkedOutput...........................2,496 ms (4765)
| getPrelinkedFiles toStringWithSourceMap..................2,358 ms (3)
| other ImportScanner#scanImports for the app..............2,239 ms (3)
| files.writeFile..........................................1,844 ms (6547)
| other safeWatcher.watch..................................1,756 ms (172508)
| plugin rocketchat:version................................1,577 ms (3)
| other PackageSource#_findSources for os..................1,541 ms (1)
| files.readdirWithTypes...................................1,498 ms (49851)
| CssTools.stringifyCss....................................1,385 ms (2)
| CssTools.parseCss........................................1,319 ms (124)
| other bundler writeSiteArchive...........................1,046 ms (1)

Total: 250,253 ms (Server startup)

I20201007-15:26:12.951(-7)? | Top leaves:
I20201007-15:26:14.532(-7)? | Meteor.startup at module (app/authorization/server/startup.js:9:8).101,713 ms (1)
I20201007-15:26:14.532(-7)? | other require("/app/lib/server/startup/settings.js")....35,951 ms (1)
I20201007-15:26:14.532(-7)? | Meteor.startup at module (app/autolinker/server/settings.js:5:8).7,488 ms (1)
I20201007-15:26:14.532(-7)? | Meteor.startup at module (app/livechat/server/config.js:5:8).6,207 ms (1)
I20201007-15:26:14.533(-7)? | require("/node_modules/@rocket.chat/apps-engine/server/AppManager.js").3,139 ms (1)
I20201007-15:26:14.533(-7)? | Meteor.startup at module (app/meteor-accounts-saml/server/startup.ts:21:8).2,925 ms (1)
I20201007-15:26:14.533(-7)? | Meteor.startup at module (app/autotranslate/server/settings.js:5:8).2,418 ms (1)
I20201007-15:26:14.533(-7)? | Meteor.startup at module (app/markdown/server/settings.js:5:8).2,413 ms (1)
I20201007-15:26:14.533(-7)? | other require("/app/models/server/models/_oplogHandle.ts").2,076 ms (1)
I20201007-15:26:14.533(-7)? | other require("/app/models/server/models/Subscriptions.js").1,905 ms (1)
I20201007-15:26:14.541(-7)? | Meteor.startup at module (app/videobridge/server/settings.js:5:8).1,737 ms (1)
I20201007-15:26:14.541(-7)? | other require("/app/models/server/models/Messages.js")...1,732 ms (1)
I20201007-15:26:14.541(-7)? | Meteor.startup at module (app/sms/server/settings.js:5:8).1,559 ms (1)
I20201007-15:26:14.541(-7)? | other require("/app/assets/server/assets.js")............1,553 ms (1)
I20201007-15:26:14.541(-7)? | Meteor.startup at module (app/search/server/service/providerService.js:123:8).1,368 ms (1)
I20201007-15:26:14.541(-7)? | other require("/node_modules/meteor/accounts-base/server_main.js").1,245 ms (1)
I20201007-15:26:14.543(-7)? | Meteor.startup at module (app/authentication/server/startup/settings.ts:5:8).1,218 ms (1)
I20201007-15:26:14.543(-7)? | Meteor.startup at module (app/google-vision/server/settings.js:5:8).1,210 ms (1)
I20201007-15:26:14.543(-7)? | Meteor.startup at module (app/cas/server/cas_rocketchat.js:9:8).1,206 ms (1)
I20201007-15:26:14.543(-7)? | other require("/app/models/server/models/Rooms.js")......1,127 ms (1)
I20201007-15:26:14.543(-7)? | Meteor.startup at module (app/crowd/server/settings.js:5:8).1,114 ms (1)

Again my apologies, I know this isn't the right place to be having this discussion, but it's currently blocking me from getting started with development. So just hoping you can point me in the right direction.

@dkoo761
Copy link
Copy Markdown
Contributor

dkoo761 commented Oct 8, 2020

@diegolmello Perfect, I'll ask there. Thanks so much!

@dkoo761
Copy link
Copy Markdown
Contributor

dkoo761 commented Oct 14, 2020

Just submitted my PR for this ^^^

@diegolmello diegolmello closed this Mar 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

missing user name for status messages, like 'Has joined channel', 'Message removed' etc.

5 participants