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

[ZEPPELIN-6076] Fix rendering runtime dynamic components in new UI #4809

Merged
merged 3 commits into from
Sep 3, 2024

Conversation

tbonelee
Copy link
Contributor

@tbonelee tbonelee commented Sep 2, 2024

What is this PR for?

The current issue is that the new UI fails to render dynamically created components at runtime, which causes the %sh.terminal interpreter to malfunction.

This problem occurs because Angular's AOT compiler removes decorators during the build process.(related issue)

As far as I know, Angular does not support JIT compilation alongside the AOT compiler.

However, we need to render runtime dynamic components for compatibility reasons.

By Importing and re-exporting Angular core decorators, we can prevent the AOT compiler from removing them.
(angular/angular-cli#9306 (comment))
I believe there are two possible solutions: either implementing this fix or turning off AOT compilation.
However, giving up the performance benefits of AOT compilation is not ideal, So I chose this approach.

What type of PR is it?

Bug Fix

Todos

What is the Jira issue?

How should this be tested?

  • Run %sh.terminal interpreter and see if it renders well.
    Note: Since Angular dev servers do not use AOT compilation, testing in development mode will not reproduce the issue.

Screenshots (if appropriate)

Before

image

After

image - The connection status message appears broken due to incompatibility between Angular and AngularJS syntax, but this does not affect functionality. (This can be addressed in a separate issue.)

Questions:

  • Does the license files need to update? No
  • Is there breaking changes for older versions? No
  • Does this needs documentation? No

@pan3793 pan3793 merged commit 13412ad into apache:master Sep 3, 2024
28 checks passed
@tbonelee tbonelee deleted the fix-ng-module branch September 6, 2024 13:20
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.

2 participants