-
Notifications
You must be signed in to change notification settings - Fork 53
feat(ARCH-349/forms): lazyload react ace #3258
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
Conversation
and there is no UMD for it
…nd/ui into jmfrancois/chore/cmf-upgrade-sentry
This reverts commit 86a80df.
Size Change: -24.4 kB (-1%) Total Size: 2.25 MB
ℹ️ View Unchanged
|
…:Talend/ui into jmfrancois/feat/forms-lazyload-react-ace
1 similar comment
1 similar comment
clearInterval(intervalId); | ||
resolve(window[varName]); | ||
} | ||
}, 200); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not confident there is no error management at this point
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes but I have no way to track status of the loading
The only option is to put some console.log at some pace may be ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It could be neat, with a timeout?
"enableLiveAutocompletion": true, | ||
"enableSnippets": true, | ||
<AceCodeWidget> | ||
<UNDEFINED |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we add a displayName?
packages/forms/src/deprecated/widgets/CodeWidget/CodeWidget.component.js
Outdated
Show resolved
Hide resolved
name: 'react-ace', | ||
varName: 'ReactAce', | ||
version: '6.2.0', | ||
path: '/dist/react-ace.min.js', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could be neat to use the mapping from DynamicWebpackPlugin instead?
"enableLiveAutocompletion": true, | ||
"enableSnippets": true, | ||
> | ||
<UNDEFINED |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
😬
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
May be just inject the global var before the tests are runned should fix that
packages/components/src/index.js
Outdated
@@ -22,6 +22,7 @@ import CollapsiblePanel from './CollapsiblePanel'; | |||
import ConfirmDialog from './ConfirmDialog'; | |||
import Datalist from './Datalist'; | |||
import { ModelViewer, RecordsViewer } from './DataViewer'; | |||
import { importFromCDN } from './importFromCDN'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What do you think about a babel macro instead? Defined in TUI Scripts?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
AFAIK macro are good when you have few lines of code here I am not sure of the qtt
1 similar comment
…:Talend/ui into jmfrancois/feat/forms-lazyload-react-ace
1 similar comment
super seed by #3692 |
What is the problem this PR is trying to solve?
react-ace is downloaded (part of dependencies.json manifest) while it will may be never used.
What is the chosen solution to this problem?
POC a way to lazy load UMD.
Please check if the PR fulfills these requirements
[ ] This PR introduces a breaking change