caponetto commented on code in PR #2242:
URL:
https://github.com/apache/incubator-kie-tools/pull/2242#discussion_r1580836030
##########
packages/editor/src/envelope/LoadingScreen/LoadingScreen.tsx:
##########
@@ -47,9 +47,11 @@ export function LoadingScreen(props: { loading: boolean }) {
}
}, [props.loading]);
+ const style = !props.style ? "kie-tools--loading-screen" : props.style + "
kie-tools--loading-screen";
Review Comment:
```suggestion
const style = (props.style ? `${props.style} ` : "") +
"kie-tools--loading-screen";
```
Not sure if this is better readable, but it'd be nice to remove the
duplication of the hardcoded string `"kie-tools--loading-screen"`.
##########
packages/serverless-workflow-combined-editor/src/editor/ServerlessWorkflowCombinedEditor.tsx:
##########
@@ -486,13 +488,24 @@ const RefForwardingServerlessWorkflowCombinedEditor:
ForwardRefRenderFunction<
);
};
-function getThemeStyle(theme: EditorTheme) {
+interface ThemeStyle {
Review Comment:
```suggestion
interface ThemeStyleTag {
```
##########
packages/serverless-workflow-combined-editor/src/editor/ServerlessWorkflowCombinedEditor.tsx:
##########
@@ -462,15 +462,17 @@ const RefForwardingServerlessWorkflowCombinedEditor:
ForwardRefRenderFunction<
}
}, [editorEnvelopeCtx, isCombinedEditorReady]);
+ const themeStyle = getThemeStyle(theme!);
+
return (
<div style={{ height: "100%" }}>
Review Comment:
When we are in dark mode, I see a quick white blink during the transition
between the loading screen and the editor screen. As far as I can see, this is
because we don't set any background color to this div. Do you think you can
incorporate a fix for this case into this PR? I believe it is just a matter of
setting the `backgroundColor` to a value depending on the theme. In our case,
it could be black for dark and white for light. WDYT?
##########
packages/editor/src/envelope/LoadingScreen/LoadingScreen.tsx:
##########
@@ -24,7 +24,7 @@ import { Title } from
"@patternfly/react-core/dist/js/components/Title";
import { Bullseye } from "@patternfly/react-core/dist/js/layouts/Bullseye";
import { useEditorEnvelopeI18nContext } from "../i18n";
-export function LoadingScreen(props: { loading: boolean }) {
+export function LoadingScreen(props: { loading: boolean; style?: string }) {
Review Comment:
```suggestion
export function LoadingScreen(props: { loading: boolean; styleTag?: string
}) {
```
Just to make it clear that the parameter corresponds to a tag.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]