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

fix(Designer): Updated HTML Editor to support newline and carriage return characters (for dynamic content) #5117

Merged
merged 17 commits into from
Jul 25, 2024

Conversation

spanvalkar
Copy link
Contributor

  • Please check if the PR fulfills these requirements
  • The commit message follows our guidelines
  • Tests for the changes have been added (for bug fixes/features)
  • Docs have been added / updated (for bug fixes / features)
  • What kind of change does this PR introduce? (Bug fix, feature, docs update, ...)

This PR fixes a bug with the HTML Editor where the HTML Editor cannot support newline characters.

  • What is the current behavior? (You can also link to an open issue here)

When a user adds dynamic content to any action with an HTML Editor and adds a newline character (for example, by pressing the 'enter' key) and then closes the action, reopening the action will cause the dynamic content to disappear. The dynamic content should stay in the action's HTML Editor, but it does not stay because the HTML Editor does not support newline characters.

Bug 26654763: Expression gets lost when newline is used

  • What is the new behavior (if this is a feature change)?

My change enables the HTML Editor to support newline characters. With my change, a user can add newline characters to the HTML Editor for dynamic content and the newline character (and dynamic content) will be preserved. It will not spontaneously disappear (as seen in the bug linked above). This improves the user experience for LA Designer users because it ensures the HTML Editor can support newline characters.

  • Does this PR introduce a breaking change? (What changes might users need to make in their application due to this PR?)

This PR does not break any existing functionality. Rather, it only adds to the functionality of the HTML Editor by supporting newline characters.

  • Please Include Screenshots or Videos of the intended change:

Added a newline character after the 'a' in email:

image

Upon reopening the HTML-to-Text action, the dynamic content with newline character remains. Previously, HTML-to-Text field would appear blank (incorrectly):

image

@hartra344
Copy link
Contributor

@Eric-B-Wu can you take a look at this?

@spanvalkar as discussed offline, I do want to hold off signing off on this until there are adequate tests added. This has been a painful issue in the past.

@Eric-B-Wu
Copy link
Contributor

asking for tests on the changes made here, as well as a test on a previous regression from this PR Parameters wiped after saving an update · Issue #4765 · Azure/LogicAppsUX (github.com)

@Eric-B-Wu Eric-B-Wu merged commit ef36f8a into Azure:main Jul 25, 2024
11 of 12 checks passed
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

Successfully merging this pull request may close these issues.

4 participants