-
Notifications
You must be signed in to change notification settings - Fork 3
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
Expandable content -block #1305
Conversation
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.
Lock the main blocks and add templateLock={false}
to the inner inner blocks.
editing={false} | ||
selectedBlockId={null} | ||
setEdits={function (): void { | ||
throw new Error("Function not implemented.") |
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.
Check out if this crashes the frontend
const InnerCardBlock: React.FC<React.PropsWithChildren<BlockRendererProps<FlipCardAttributes>>> = ( | ||
props, | ||
) => { | ||
if (isBlockImage(props.data.innerBlocks[0]) && props.data.innerBlocks.length == 1) { |
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.
Add a comment for explaining the if
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.
Does it crash if innerblocks is empty?
transition: transform 0.8s; | ||
transform-style: preserve-3d; | ||
${frontSideUp ? "transform: rotateY(180deg);" : "transform: rotateY(0);"} | ||
${currentIsImage ? "" : "border: 3px solid #bfbec6"}; |
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.
${currentIsImage ? "" : "border: 3px solid #bfbec6"}; | |
${!currentIsImage && "border: 3px solid #bfbec6;"} |
const frontCard = props.data.innerBlocks[0] as Block<FlipCardAttributes> | ||
const backCard = props.data.innerBlocks[1] as Block<FlipCardAttributes> | ||
|
||
let size = 0 |
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.
create a function in this file sizeStringToSizePx
const { t } = useTranslation() | ||
const frontCard = props.data.innerBlocks[0] as Block<FlipCardAttributes> | ||
const backCard = props.data.innerBlocks[1] as Block<FlipCardAttributes> | ||
|
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.
Check if frontCard and backcard are defined and return an error banner if they are not.
@@ -0,0 +1,56 @@ | |||
/* eslint-disable i18next/no-literal-string */ |
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.
Don't need to ignore the whole file
No description provided.