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

RFC: Support emoji in messages and participant names #78

Open
MrCoder opened this issue Oct 31, 2023 · 1 comment
Open

RFC: Support emoji in messages and participant names #78

MrCoder opened this issue Oct 31, 2023 · 1 comment

Comments

@MrCoder
Copy link
Collaborator

MrCoder commented Oct 31, 2023

Context

Emoji is a Unicode Char Emojis are considered characters on the web and in digital text. They are encoded as part of the Unicode standard. In Unicode, emojis have their own code points, just like letters, numbers, and special characters. For example, the emoji 😊 has the Unicode code point U+1F60A.

When you include an emoji in a text message, email, tweet, or any other form of digital text, it is treated as a single character, even though it may visually appear more complex than a letter or number. However, it’s worth noting that some emojis are made up of multiple Unicode code points, such as emojis that combine a base emoji with a skin tone modifier.

The syntax :unicorn: (🦄) is a type of short code used by certain platforms and applications to represent emojis. This particular syntax, where an emoji is represented by a short string of text enclosed in colons, is commonly used in Slack, GitHub, Discourse, and some other communication and collaboration tools. Microsoft Teams use (unicorn) format.

Syntax in ZenUML

The syntax :unicorn: is almost universally used. However, it does not work well in our DSL. : is too important to be used for this non-essential feature. For example,

:unicorn:A->:unicorn:B: :unicorn:some message

How about other formats?

Sep Example Sync Message Example Async Message Example Participant
/ /unicorn/ A./unicorn/method A->B:/unicorn/ some message @Actor /unicorn/OrderService
\ \unicorn\ A.\unicorn\method A->B:\unicorn\ some message @Actor \unicorn\OrderService
$ $unicorn$ A.$unicorn$method A->B:$unicorn$ some message @Actor $unicorn$OrderService
\::\ \:unicorn:\ A.:unicorn:\method A->B:\:unicorn:\ some message @Actor 🦄\OrderService
[] [unicorn] A.[unicorn]method A->B:[unicorn] some message @Actor [unicorn]OrderService

It will not only confuse the DSL parser, but will definitely confuse the users.

To support ZenUML, we will add emoji support to the following areas:

  1. Participant Name
  2. Message including parameters
  3. Conditions for Alt and Loop fragment
  4. Divider notes
  5. Comments

Syntax must support two ways of embedding emojis: 1. use the emoji directly like 🏅; 2. use shortcut (e.g. :medal_sports:).

Participant Name

Participant declaration

":unicorn:OrderService"

Considerations

The main challenge in implementing this is to resolve ambiguity between an emoji and an async message which also use :.

An async message is like: A->B:async message. An emoji can be used like
":unicorn:A"->":butterfly:B": :cry: some more messages.

Questions

1. Are emojis considered a modifier or part of the element?

If you have a participant ":unicorn:OrderService", is the participant's name OrderService or :unicorn:OrderService? Further more, does :unicorn:OrderService equal to 🦄OrderService?

@MrCoder
Copy link
Collaborator Author

MrCoder commented Oct 29, 2024

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

No branches or pull requests

1 participant