@@ -448,7 +448,19 @@ def _prop_value_table():
448448 ),
449449 key = "item_key" ,
450450 ):
451- html .Td (v_text = ("item_key" ,), classes = "text-center" )
451+ with html .Td (classes = "text-center" ):
452+ with vuetify .VTooltip (location = "bottom" ):
453+ with html .Template (v_slot_activator = "{ props }" ):
454+ html .P (v_text = ("item_key" ,), v_bind = "props" )
455+ html .P (
456+ v_text = (
457+ "json_schema['properties']?.[selected_section_name]?.['properties']?.[item_key]?.['description'] || 'no description'" ,
458+ ),
459+ v_if = (
460+ "json_schema['properties']?.[selected_section_name]?.['properties']?.[item_key]?.['description']" ,
461+ ),
462+ style = "max-width: 450px;" ,
463+ )
452464 html .Td (
453465 v_if = "edit_mode == all_edit_modes['view_mode']" ,
454466 v_text = ("item_val" ,),
@@ -490,7 +502,7 @@ def _materials_panel():
490502 items = ("Object.keys(materials_section)" ,),
491503 )
492504 # show material type
493- with html .Div (classes = "d-flex align-center ga-3 mb-5 pl-5 w-full" ):
505+ with html .Div (classes = "d-flex align-center ga-3 mb-1 pl-5 w-full" ):
494506 html .Span ("TYPE: " , classes = "text-h6" )
495507 # view mode: text
496508 html .Span (
@@ -510,8 +522,20 @@ def _materials_panel():
510522 dense = True ,
511523 hide_details = True ,
512524 )
525+ html .P (
526+ classes = "ga-3 mb-5 pl-5 pr-5 w-full" ,
527+ v_if = ("edit_mode == all_edit_modes['view_mode']" ,),
528+ v_text = (
529+ "json_schema?.properties?.MATERIALS?.items?.oneOf?"
530+ ".find(v => v.properties?.[materials_section[selected_material]?.TYPE])?.properties?"
531+ ".[materials_section[selected_material]?.TYPE]?.description || 'Error on material description'" ,
532+ ),
533+ style = "color: #999;" ,
534+ )
535+
513536 # show relationships to other materials (linked materials
514537 # and master material) -> only in view mode
538+
515539 with html .Div (
516540 v_if = ("edit_mode == all_edit_modes['view_mode']" ,),
517541 ):
@@ -552,6 +576,7 @@ def _materials_panel():
552576 html .Th (
553577 "Value" ,
554578 classes = "text-center font-weight-bold" ,
579+ style = "width: 50%;" ,
555580 )
556581 with html .Tbody ():
557582 with html .Tr (
@@ -560,7 +585,19 @@ def _materials_panel():
560585 ),
561586 classes = "text-center" ,
562587 ):
563- html .Td (v_text = ("param_key" ,))
588+ with html .Td (classes = "text-center" ):
589+ with vuetify .VTooltip (location = "bottom" ):
590+ with html .Template (v_slot_activator = "{ props }" ):
591+ html .P (v_text = ("param_key" ,), v_bind = "props" )
592+ html .P (
593+ v_text = (
594+ "json_schema?.properties?.MATERIALS?.items?.oneOf?"
595+ ".find(v => v.properties?.[materials_section[selected_material]?.TYPE])?"
596+ ".properties?.[materials_section[selected_material]?.TYPE]?.properties?"
597+ ".[param_key]?.description || 'Error on parameter description'" ,
598+ ),
599+ style = "max-width: 450px;" ,
600+ )
564601 html .Td (
565602 v_text = ("param_val" ,),
566603 )
0 commit comments