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

CodeBlock chatbox markdown and format do not match Figma #14821

Open
virginiabalducci opened this issue May 16, 2024 · 0 comments
Open

CodeBlock chatbox markdown and format do not match Figma #14821

virginiabalducci opened this issue May 16, 2024 · 0 comments
Labels
Milestone

Comments

@virginiabalducci
Copy link

virginiabalducci commented May 16, 2024

Bug Report

Description

Steps to reproduce

  1. Open a chat and paste a piece of code, for example:
<!DOCTYPE html><html><body>
<h2>What Can JavaScript Do?</h2>
<p id="demo">JavaScript can change HTML content.</p>
<button type="button" onclick='document.getElementById("demo").innerHTML = "Hello JavaScript!"'>Click Me!</button>
</body></html>
  1. Select the code and select "Code" formatting option.
    Also try by writing three backticks before pasting the code.

Expected behavior

Chatbox: all block of code should be selected
When message is sent block of code should show in the format indicated by this Figma design
See: Code block (non-coloured syntax)

Chatbox:
Screenshot 2024-05-16 at 3 51 53 PM

Message sent:
Screenshot 2024-05-16 at 3 52 03 PM

Actual behavior

When Code option is selected, only the first line of the block of code is formatted in the chatbox.
Screenshot 2024-05-13 at 3 37 53 PM
To get the complete code block formatted, you have to remove spaces or you have to enter each line by pressing SHIFT + Enter. Even after doing so, message is sent as if each line was a separate line of code, instead of what can be seen in Figma.
Screenshot 2024-05-13 at 3 38 41 PM

Code Block requires a closing pair of three backticks even though the above mentioned Figma has this comment: There is no need for a closing pair of ```

However, in the app 2.28.1 you do need closing pair of three backticks if not the code will not be sent in the Code format

Screenshot 2024-05-16 at 3 45 06 PM

https://github.com/status-im/status-desktop/assets/68916150/9a8f6bc3-a705-410e-9020-5675600b0034
https://github.com/status-im/status-desktop/assets/68916150/f0dca7e0-0a93-42dc-b903-5b8a5c8e9c54

Additional Information

  • Status desktop version: 2.28.1
  • Operating System: Mac OS Sonoma 14.4.1
@virginiabalducci virginiabalducci added the bug Something isn't working label May 16, 2024
@noeliaSD noeliaSD added this to the 2.32.0 Beta milestone Jun 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: No status
Development

No branches or pull requests

3 participants