-
Notifications
You must be signed in to change notification settings - Fork 0
fix: new revert change #18
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
base: qubits_develop
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Original file line number | Diff line number | Diff line change | ||||||||
---|---|---|---|---|---|---|---|---|---|---|
|
@@ -4,8 +4,8 @@ import styles from './reload.css' | |||||||||
function Reload() { | ||||||||||
return ( | ||||||||||
<div className={styles.reloadContainer }> | ||||||||||
<svg xmlns="http://www.w3.org/2000/svg" fill="none" stroke='#801d80' viewBox="0 0 24 24" strokeWidth="1.5" className="size-2"> | ||||||||||
<path strokeLinecap="round" strokeLinejoin="round" d="M16.023 9.348h4.992v-.001M2.985 19.644v-4.992m0 0h4.992m-4.993 0 3.181 3.183a8.25 8.25 0 0 0 13.803-3.7M4.031 9.865a8.25 8.25 0 0 1 13.803-3.7l3.181 3.182m0-4.991v4.99" /> | ||||||||||
<svg xmlns="http://www.w3.org/2000/svg" fill="none" stroke='#801d80' viewBox="0 0 24 24" stroke-width="1.5" class="size-2"> | ||||||||||
<path stroke-linecap="round" stroke-linejoin="round" d="M16.023 9.348h4.992v-.001M2.985 19.644v-4.992m0 0h4.992m-4.993 0 3.181 3.183a8.25 8.25 0 0 0 13.803-3.7M4.031 9.865a8.25 8.25 0 0 1 13.803-3.7l3.181 3.182m0-4.991v4.99" /> | ||||||||||
Comment on lines
+7
to
+8
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. In JSX, you should use
Suggested change
|
||||||||||
</svg> | ||||||||||
</div> | ||||||||||
) | ||||||||||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -138,12 +138,6 @@ const GUIComponent = (props) => { | |
onTelemetryModalCancel, | ||
onTelemetryModalOptIn, | ||
onTelemetryModalOptOut, | ||
setPositionModal, | ||
setProjectName, | ||
setSpriteClickedState, | ||
addNotification, | ||
removeNotification, | ||
setCurrentLayout, | ||
showComingSoon, | ||
soundsTabVisible, | ||
stageSizeMode, | ||
|
@@ -193,10 +187,7 @@ const GUIComponent = (props) => { | |
messenger, | ||
methods: { | ||
getScratchState(message) { | ||
// Use setTimeout to defer the state update to avoid updating during render | ||
setTimeout(() => { | ||
props.setProjectName(message) | ||
}, 0) | ||
props.setProjectName(message) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The setTimeout(() => {
props.setProjectName(message)
}, 0) |
||
}, | ||
}, | ||
timeout: 15000, | ||
|
@@ -219,12 +210,11 @@ const GUIComponent = (props) => { | |
} | ||
}, []) | ||
|
||
|
||
useEffect(() => { | ||
if (currentLayout === 'myprojects') { | ||
setPositionModal(true) | ||
props.setPositionModal(true) | ||
} | ||
}, [currentLayout, setPositionModal]) | ||
}, [currentLayout]) | ||
|
||
useEffect(() => { | ||
if (remote && currentLayout === 'studentChallenge') { | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,22 +13,10 @@ import { setCostumeClickedState } from './../../reducers/vm-status.js' | |
let contextMenuId = 0 | ||
|
||
const SpriteSelectorItem = (props) => { | ||
const { | ||
costumeURLFax, | ||
setCostumeClickedState, | ||
...componentProps | ||
} = props | ||
|
||
useEffect(() => { | ||
if (componentProps.costumeURL) { | ||
// Use setTimeout to defer the state update to avoid updating during render | ||
const timeoutId = setTimeout(() => { | ||
setCostumeClickedState(componentProps.costumeURL) | ||
}, 0) | ||
|
||
return () => clearTimeout(timeoutId) | ||
} | ||
}, [setCostumeClickedState, componentProps.costumeURL]) | ||
props.setCostumeClickedState(props.costumeURL) | ||
}, []) | ||
Comment on lines
17
to
+19
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This
useEffect(() => {
if (props.costumeURL) {
// Use setTimeout to defer the state update to avoid updating during render
const timeoutId = setTimeout(() => {
props.setCostumeClickedState(props.costumeURL)
}, 0)
return () => clearTimeout(timeoutId)
}
}, [props.setCostumeClickedState, props.costumeURL]) |
||
|
||
return ( | ||
<ContextMenuTrigger | ||
|
Original file line number | Diff line number | Diff line change | ||||||||
---|---|---|---|---|---|---|---|---|---|---|
|
@@ -334,9 +334,7 @@ class Blocks extends React.Component { | |||||||||
}) | ||||||||||
}, 0) | ||||||||||
} | ||||||||||
// REMOVED: this.handleGreenbuttonClick() - This was causing infinite renders | ||||||||||
// The handleGreenbuttonClick was updating Redux state on every workspace metric change, | ||||||||||
// which triggered re-renders that caused more workspace metric changes. | ||||||||||
this.handleGreenbuttonClick() | ||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This line re-introduces a call to
Suggested change
|
||||||||||
} | ||||||||||
onScriptGlowOn(data) { | ||||||||||
this.workspace.glowStack(data.id, true) | ||||||||||
|
@@ -576,14 +574,10 @@ class Blocks extends React.Component { | |||||||||
/* eslint-disable no-unused-vars */ | ||||||||||
const { | ||||||||||
anyModalVisible, | ||||||||||
autoSave, | ||||||||||
canUseCloud, | ||||||||||
customProceduresVisible, | ||||||||||
extensionLibraryVisible, | ||||||||||
flagClicked, | ||||||||||
options, | ||||||||||
setAutoSaveState, | ||||||||||
setFlagClickedState, | ||||||||||
stageSize, | ||||||||||
vm, | ||||||||||
isRtl, | ||||||||||
|
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.
The
build
script no longer setsNODE_ENV=production
. This is risky as it could result in a non-optimized development build being deployed to production. Development builds are larger and less performant. It's safer to explicitly set the environment for the production build. Thebuild:dev
script was also removed, which was likely the intended script for development builds. Consider restoring the previous configuration for both scripts.