You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Motivation EventComponent renders two types of messages:
message of type system
message carrying attribute event
There may be 3 reasons why we want to separate those two into separate components:
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
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.
The fact that message is of type system should not exclude the possibility that it carries custom event attribute
Proposed solution
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)
the default component for system messages should be a new SystemMessage component
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.
The text was updated successfully, but these errors were encountered:
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
Motivation
EventComponent
renders two types of messages:system
event
There may be 3 reasons why we want to separate those two into separate components:
Event
should render system messages if it expects that messages of typesystem
do not carry attributeevent
event
is a custom message payload. And so, there is no reason, why integrators should know about this custom non-documented attribute.system
should not exclude the possibility that it carries customevent
attributeProposed solution
event
into a separate componentEventComponent
and code for rendering system messages intoSystemMessage
component (theif (type === 'system'
part)SystemMessage
componentEventComponent
will not keep theif (type === 'system')
branchThis will be a breaking change for those who are using
EventComponent
to display system messages in their custom code.The text was updated successfully, but these errors were encountered: