-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
[Feature]: Allow multiple lines in showAlert message #30851
Comments
Hi @Nikhil-Nandagopal , i am intrested in picking up this issue |
@saiprabhu-dandanayak thank you, please go ahead. Please tag @appsmithorg/query-js-pod for review or any other communication |
@saiprabhu-dandanayak for the direction to solve this, you can check Toast.tsx file. |
Hi @rishabhrathod01 , added After using pre tag:Do we need to do the same as well at |
@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. |
### Description ### Fixes : [#30851](#30851) I have raised this pr in-order to allow multiple lines in alert message ### Screenshots ### passing `\n` in the message ![Screenshot from 2024-09-05 13-51-43](https://github.com/user-attachments/assets/02f5fe58-44a6-40e1-a366-c909018e4417) ### unable to parse `\n` ![Screenshot from 2024-09-05 13-50-06](https://github.com/user-attachments/assets/e5fe1d14-4c80-4c5d-8f67-350788d8d84c) ### After issue is resolved ![Screenshot from 2024-09-05 13-55-01](https://github.com/user-attachments/assets/05c8477c-d593-4b5e-9de0-9b6867234c3f) ### Cypress Testing video https://github.com/user-attachments/assets/ec826cef-664f-4392-b81e-9974178e65ec <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Introduced a new styled component `StyledPre` for enhanced formatting in toast notifications. - Enhanced the Toast component to better render content, improving readability by preserving whitespace and formatting. - Added automated tests for the button widget's alert functionality, ensuring correct display of messages with newline characters. - **Bug Fixes** - Improved the display of alert messages in toast notifications, ensuring they respect original formatting. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
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. |
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. |
@rishabhrathod01 thanks for letting me know |
Is there an existing issue for this?
Description
i code alert same here:
showAlert('First line of message \nSecond line of message', 'info')
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
The text was updated successfully, but these errors were encountered: