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

Fixed[BluePrint]: Confirm Button Enabled Without Changes & Node Color Not Reflected in Color Picker #2557

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -420,7 +420,7 @@ export const Editor = ({
})

useEffect(() => {
if (selectedColor !== selectedSchema?.primary_color) {
if (isPopoverOpen && selectedColor !== selectedSchema?.primary_color) {
setSubmitDisabled(false)
}

Expand All @@ -443,7 +443,7 @@ export const Editor = ({
})

return () => subscription.unsubscribe()
}, [form, attributes, parsedData, selectedSchema, loading, displayParentError, selectedColor])
}, [form, attributes, parsedData, selectedSchema, loading, displayParentError, selectedColor, isPopoverOpen])

const resolvedParentValue = () => parentOptions?.find((i) => i.value === parent)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import { BoxGeometry, Mesh, Vector3 } from 'three'
import { SchemaExtended } from '~/components/ModalsContainer/BlueprintModal/types'
import { fontProps } from '~/components/Universe/Graph/Cubes/Text/constants'
import { useAppStore } from '~/stores/useAppStore'
import { useSchemaStore } from '~/stores/useSchemaStore'
import { truncateText } from '~/utils/truncateText'
import { NODE_RADIUS } from '../../constants'
Expand Down Expand Up @@ -43,8 +44,9 @@
const meshRef = useRef<Mesh | null>(null)
const [normalizedSchemasByType] = useSchemaStore((s) => [s.normalizedSchemasByType])
const [showTooltip, setShowTooltip] = useState(false)
const { setSelectedColor } = useAppStore((s) => s)

console.log(isSelected)

Check warning on line 49 in src/components/ModalsContainer/BlueprintModal/Body/Graph/Nodes/Node/index.tsx

View workflow job for this annotation

GitHub Actions / eslint-run

Unexpected console statement

const { size, camera } = useThree()

Expand Down Expand Up @@ -124,7 +126,7 @@
onPointerOver={handleMouseOver}
position={new Vector3(node.x, node.y, 0)}
>
<Circle args={[NODE_RADIUS, 30, 20]}>
<Circle args={[NODE_RADIUS, 30, 20]} onClick={() => setSelectedColor(color)}>
<meshStandardMaterial attach="material" color={color} />
</Circle>

Expand Down
Loading