Change warning message on Chamfer for a more discreet note in tooltip (#7002)

This commit is contained in:
Pierre Jacquier
2025-05-16 10:00:31 -04:00
committed by GitHub
parent 203db79204
commit c7b086fa69
3 changed files with 16 additions and 3 deletions

View File

@ -552,6 +552,12 @@ const ToolbarItemTooltipRichContent = ({
)}
</div>
<p className="px-2 my-2 text-ch font-sans">{itemConfig.description}</p>
{itemConfig.extraNote && (
<p className="px-2 my-2 text-ch font-sans">
<span className="font-semibold">Note: </span>
{itemConfig.extraNote}
</p>
)}
{/* Add disabled reason if item is disabled */}
{itemConfig.disabled && itemConfig.disabledReason && (
<>

View File

@ -763,8 +763,6 @@ export const modelingMachineCommandConfig: StateMachineCommandSetConfig<
multiple: true,
required: true,
skip: false,
warningMessage:
'Chamfers cannot touch other chamfers yet. This is under development.',
hidden: (context) => Boolean(context.argumentsToSubmit.nodeToEdit),
},
length: {

View File

@ -46,6 +46,7 @@ export type ToolbarItem = {
| string
| ((state: StateFrom<typeof modelingMachine>) => string | string[])
description: string
extraNote?: string
links: { label: string; url: string }[]
isActive?: (state: StateFrom<typeof modelingMachine>) => boolean
disabledReason?:
@ -208,7 +209,15 @@ export const toolbarConfig: Record<ToolbarModeName, ToolbarMode> = {
title: 'Chamfer',
hotkey: 'C',
description: 'Bevel the edges of a 3D solid.',
links: [{ label: 'KCL docs', url: 'https://zoo.dev/docs/kcl/chamfer' }],
extraNote:
'Chamfers cannot touch other chamfers yet. This is under development, see issue tracker.',
links: [
{
label: 'issue tracker',
url: 'https://github.com/KittyCAD/modeling-app/issues/6617',
},
{ label: 'KCL docs', url: 'https://zoo.dev/docs/kcl/chamfer' },
],
},
{
id: 'shell',