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

refactor: System message component is rendered within event message component #1601

Open
MartinCupela opened this issue May 20, 2022 · 2 comments
Labels
enhancement New feature or request

Comments

@MartinCupela
Copy link
Contributor

Motivation
EventComponent renders two types of messages:

  1. message of type system
  2. message carrying attribute event

There may be 3 reasons why we want to separate those two into separate components:

  1. There is no reason why component containing word Event should render system messages if it expects that messages of type system do not carry attribute event
  2. System message is official type of message received from the back-end, meanwhile non-system message with attribute event is a custom message payload. And so, there is no reason, why integrators should know about this custom non-documented attribute.
  3. The fact that message is of type system should not exclude the possibility that it carries custom event attribute

Proposed solution

  1. separate code for rendering a message carrying attribute event into a separate component EventComponent and code for rendering system messages into SystemMessage component (the if (type === 'system' part)
  2. the default component for system messages should be a new SystemMessage component
  3. the EventComponent will not keep the if (type === 'system') branch

This will be a breaking change for those who are using EventComponent to display system messages in their custom code.

@MartinCupela MartinCupela added refactor Coding task that does not change the functionality enhancement New feature or request and removed refactor Coding task that does not change the functionality labels May 20, 2022
@MartinCupela MartinCupela changed the title refactor: System message component is rendered withing event message component refactor: System message component is rendered within event message component Sep 13, 2022
@jakedeg
Copy link

jakedeg commented Jan 13, 2023

Hello! Any updates on a timeline for this improvement?

@MartinCupela
Copy link
Contributor Author

Hello @jakedeg! We do not have a specific timeline for this issue at the moment and we keep it in our backlog.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants