Skip to content

Commit

Permalink
Fix missing placeholders
Browse files Browse the repository at this point in the history
Show placeholder for any argument that doesn't have a default value, including
collapsed function args.

Cf. #11347.
  • Loading branch information
kazcw committed Dec 17, 2024
1 parent 30075d2 commit cbac355
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions app/gui/src/project-view/util/callTree.ts
Original file line number Diff line number Diff line change
Expand Up @@ -120,9 +120,13 @@ export class ArgumentPlaceholder extends Argument {
return this.argInfo.defaultValue
}

/** TODO: Add docs */
/** Whether the argument should be hidden when the component isn't currently focused for editing. */
override get hideByDefault(): boolean {
return !isRequiredArgument(this.argInfo) && this.dynamicConfig?.display !== DisplayMode.Always
return (
this.argInfo.hasDefault &&
!isRequiredArgument(this.argInfo) &&
this.dynamicConfig?.display !== DisplayMode.Always
)
}
}

Expand Down

0 comments on commit cbac355

Please sign in to comment.