appsmithorg / appsmith

Platform to build admin panels, internal tools, and dashboards. Integrates with 25+ databases and any API.
https://www.appsmith.com
Apache License 2.0
34.63k stars 3.74k forks source link

[Feature]: Allow multiple lines in showAlert message #30851

Open LPTrungGTN opened 9 months ago

LPTrungGTN commented 9 months ago

Is there an existing issue for this?

Description

i code alert same here: showAlert('First line of message \nSecond line of message', 'info')

Screenshot 2024-02-02 at 08 09 24

Steps To Reproduce

go to code make new function code: showAlert('First line of message \nSecond line of message', 'info') and run this function

Public Sample App

No response

Environment

Production

Issue video log

No response

Version

appsmith

saiprabhu-dandanayak commented 2 months ago

Hi @Nikhil-Nandagopal , i am intrested in picking up this issue

rohan-arthur commented 2 months ago

@saiprabhu-dandanayak thank you, please go ahead. Please tag @appsmithorg/query-js-pod for review or any other communication

rishabhrathod01 commented 2 months ago

@saiprabhu-dandanayak for the direction to solve this, you can check Toast.tsx file.

saiprabhu-dandanayak commented 2 months ago

Hi @rishabhrathod01 , added pre tag to the content and it worked as expected image

After using pre tag:

Screenshot from 2024-09-03 18-32-41

Do we need to do the same as well at onClick.

rishabhrathod01 commented 2 months ago

@saiprabhu-dandanayak The font will need to be the same as earlier and also it will need to follow the design system of appsmith for this please refer to the styles in the component.

ALOK9442 commented 4 weeks ago

hey @rohan-arthur is it not fixed yet? as you re-opened the issue, I would like to know more about it, and work on it if possible. Thanks!!

rishabhrathod01 commented 4 weeks ago

hey @rohan-arthur is it not fixed yet? as you re-opened the issue, I would like to know more about it, and work on it if possible. Thanks!!

The PR that closed this issue added a flaky cypress test, which dropped CI stability. Also, the storybook showed an error where the toast UI was bigger than expected. These errors were not anticipated and hence the PR had to be reverted and issue was reopened.

The team plans to use the old PR, fix the issues, and merge again in the future.

ALOK9442 commented 4 weeks ago

@rishabhrathod01 thanks for letting me know