BotFramework-Composer icon indicating copy to clipboard operation
BotFramework-Composer copied to clipboard

fix: [#9346] Remove new line symbol from LGWidget

Open sw-joelmut opened this issue 2 years ago • 1 comments

Addresses #9346 #minor

Description

This PR solves part of an issue when rendering the LGWidget component (internal process to recognize language generation texts) to the Authoring Canvas UI. Language generation texts that have multiple lines, new lines are being replaced with the ↵ symbol concatenating the texts into a single one causing the memory to increase when interacting in Composer. By removing the new line symbol, and just leave the text as is (with the new lines only) reduced the amount of memory storage used.

Specific Changes

  • Removes the ↵ symbol from the useLgTemplate.ts file.
  • Updates unit test, removing use of the ↵ symbol.

Testing

The following image shows the before and after the applied fix, how the memory usage and the Authoring Canvas behaves. image

sw-joelmut avatar Nov 29 '22 13:11 sw-joelmut

Coverage Status

Coverage: 54.555%. Remained the same when pulling f4ac6aee68f705a22af3de9708bc83192886ce14 on southworks/update/lgwidget-newline-symbol into 66a028ae89d05b5cd5ee82691506770a46089731 on main.

coveralls avatar Nov 29 '22 15:11 coveralls

Closed as it's no longer necessary

sw-joelmut avatar May 16 '24 13:05 sw-joelmut