fix: resolve content area height issue in StandardizedToolWrapper
- Remove conflicting height calc in contentStyle (was conflicting with flex:1) - Use minHeight:0 to allow proper flex shrinking - Add debug logging for pin toggle to diagnose pin button issues 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
1bd509de08
commit
9f2cc9267e
|
|
@ -277,14 +277,13 @@ export const StandardizedToolWrapper: React.FC<StandardizedToolWrapperProps> = (
|
||||||
|
|
||||||
const contentStyle: React.CSSProperties = {
|
const contentStyle: React.CSSProperties = {
|
||||||
width: '100%',
|
width: '100%',
|
||||||
height: isMinimized ? 0 : 'calc(100% - 40px)',
|
minHeight: 0, // Allow flex shrinking
|
||||||
overflow: 'auto',
|
overflow: 'auto',
|
||||||
position: 'relative',
|
position: 'relative',
|
||||||
pointerEvents: 'auto',
|
pointerEvents: 'auto',
|
||||||
transition: 'height 0.2s ease',
|
|
||||||
display: 'flex',
|
display: 'flex',
|
||||||
flexDirection: 'column',
|
flexDirection: 'column',
|
||||||
flex: 1,
|
flex: 1, // Take remaining space after header and tags
|
||||||
}
|
}
|
||||||
|
|
||||||
const tagsContainerStyle: React.CSSProperties = {
|
const tagsContainerStyle: React.CSSProperties = {
|
||||||
|
|
|
||||||
|
|
@ -79,6 +79,7 @@ export function usePinnedToView(
|
||||||
|
|
||||||
// If just became pinned (transition from false to true)
|
// If just became pinned (transition from false to true)
|
||||||
if (isPinned && !wasPinnedRef.current) {
|
if (isPinned && !wasPinnedRef.current) {
|
||||||
|
console.log('📌 usePinnedToView: Shape became PINNED', shapeId)
|
||||||
// Clear any leftover state from previous pin sessions
|
// Clear any leftover state from previous pin sessions
|
||||||
clearPinState()
|
clearPinState()
|
||||||
|
|
||||||
|
|
@ -151,6 +152,7 @@ export function usePinnedToView(
|
||||||
|
|
||||||
// If just became unpinned, animate back to original coordinates
|
// If just became unpinned, animate back to original coordinates
|
||||||
if (!isPinned && wasPinnedRef.current) {
|
if (!isPinned && wasPinnedRef.current) {
|
||||||
|
console.log('📌 usePinnedToView: Shape became UNPINNED', shapeId)
|
||||||
// Cancel any ongoing animations
|
// Cancel any ongoing animations
|
||||||
if (driftAnimationRef.current) {
|
if (driftAnimationRef.current) {
|
||||||
cancelAnimationFrame(driftAnimationRef.current)
|
cancelAnimationFrame(driftAnimationRef.current)
|
||||||
|
|
|
||||||
|
|
@ -392,6 +392,7 @@ export class PromptShape extends BaseBoxShapeUtil<IPrompt> {
|
||||||
}
|
}
|
||||||
|
|
||||||
const handlePinToggle = () => {
|
const handlePinToggle = () => {
|
||||||
|
console.log('📌 Pin toggle clicked, current state:', shape.props.pinnedToView, '-> new state:', !shape.props.pinnedToView)
|
||||||
this.editor.updateShape<IPrompt>({
|
this.editor.updateShape<IPrompt>({
|
||||||
id: shape.id,
|
id: shape.id,
|
||||||
type: shape.type,
|
type: shape.type,
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue