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

Add room events to timeline #646

Closed
wants to merge 9 commits into from
Closed

Add room events to timeline #646

wants to merge 9 commits into from

Conversation

tezlm
Copy link

@tezlm tezlm commented Jun 24, 2022

Description

This adds room name and topic changes to the room timeline.

image

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings

Preview: https://62f6373d02985a2f943f21ab--pr-cinny.netlify.app
⚠️ Exercise caution. Use test accounts. ⚠️

Copy link
Member

@ajbura ajbura left a comment

Choose a reason for hiding this comment

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

Looks good 👍

src/app/molecules/message/TimelineChange.jsx Outdated Show resolved Hide resolved
src/app/organisms/settings/Settings.jsx Outdated Show resolved Hide resolved
Comment on lines 217 to 221
switch (type) {
case 'm.room.name': return makeReturnObj('edit', tJSXMsgs.roomNameChanged(senderName, content.name));
case 'm.room.topic': return makeReturnObj('edit', tJSXMsgs.roomTopicChanged(senderName));
case 'm.room.avatar': return makeReturnObj('edit', tJSXMsgs[content.url ? 'roomAvatarChanged' : 'roomAvatarRemoved'](senderName));
}

Choose a reason for hiding this comment

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

It's always a good practice to have deafult case.

Copy link
Author

Choose a reason for hiding this comment

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

in this case we want the case to fall through if it's not handled by any of these cases, so that it can be caught by the second switch/case a little bit below

src/app/organisms/settings/Settings.jsx Outdated Show resolved Hide resolved
Copy link
Member

@ajbura ajbura left a comment

Choose a reason for hiding this comment

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

Looks good. Just a minor change is required.

Comment on lines +37 to +39
case 'edit':
iconSrc = HashIC;
break;
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
case 'edit':
iconSrc = HashIC;
break;
case 'room-profile':
iconSrc = HashIC;
break;

variant propTypes for this is also missing.

@tezlm
Copy link
Author

tezlm commented Oct 6, 2023

this exists in and was merged with #1346

@tezlm tezlm closed this Oct 6, 2023
@github-actions github-actions bot locked and limited conversation to collaborators Oct 6, 2023
@tezlm tezlm deleted the room-events branch October 6, 2023 09:12
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants