@@ -465,7 +465,19 @@ def _prop_value_table():
465465 ),
466466 key = "item_key" ,
467467 ):
468- html .Td (v_text = ("item_key" ,), classes = "text-center" )
468+ with html .Td (classes = "text-center" ):
469+ with vuetify .VTooltip (location = "bottom" ):
470+ with html .Template (v_slot_activator = "{ props }" ):
471+ html .P (v_text = ("item_key" ,), v_bind = "props" )
472+ html .P (
473+ v_text = (
474+ "json_schema['properties']?.[selected_section_name]?.['properties']?.[item_key]?.['description'] || 'no description'" ,
475+ ),
476+ v_if = (
477+ "json_schema['properties']?.[selected_section_name]?.['properties']?.[item_key]?.['description']" ,
478+ ),
479+ style = "max-width: 450px;" ,
480+ )
469481 html .Td (
470482 v_if = "edit_mode == all_edit_modes['view_mode']" ,
471483 v_text = ("item_val" ,),
@@ -507,7 +519,7 @@ def _materials_panel():
507519 items = ("Object.keys(materials_section)" ,),
508520 )
509521 # show material type
510- with html .Div (classes = "d-flex align-center ga-3 mb-5 pl-5 w-full" ):
522+ with html .Div (classes = "d-flex align-center ga-3 mb-1 pl-5 w-full" ):
511523 html .Span ("TYPE: " , classes = "text-h6" )
512524 # view mode: text
513525 html .Span (
@@ -527,8 +539,20 @@ def _materials_panel():
527539 dense = True ,
528540 hide_details = True ,
529541 )
542+ html .P (
543+ classes = "ga-3 mb-5 pl-5 pr-5 w-full" ,
544+ v_if = ("edit_mode == all_edit_modes['view_mode']" ,),
545+ v_text = (
546+ "json_schema?.properties?.MATERIALS?.items?.oneOf?"
547+ ".find(v => v.properties?.[materials_section[selected_material]?.TYPE])?.properties?"
548+ ".[materials_section[selected_material]?.TYPE]?.description || 'Error on material description'" ,
549+ ),
550+ style = "color: #999;" ,
551+ )
552+
530553 # show relationships to other materials (linked materials
531554 # and master material) -> only in view mode
555+
532556 with html .Div (
533557 v_if = ("edit_mode == all_edit_modes['view_mode']" ,),
534558 ):
@@ -569,6 +593,7 @@ def _materials_panel():
569593 html .Th (
570594 "Value" ,
571595 classes = "text-center font-weight-bold" ,
596+ style = "width: 50%;" ,
572597 )
573598 with html .Tbody ():
574599 with html .Tr (
@@ -577,7 +602,19 @@ def _materials_panel():
577602 ),
578603 classes = "text-center" ,
579604 ):
580- html .Td (v_text = ("param_key" ,))
605+ with html .Td (classes = "text-center" ):
606+ with vuetify .VTooltip (location = "bottom" ):
607+ with html .Template (v_slot_activator = "{ props }" ):
608+ html .P (v_text = ("param_key" ,), v_bind = "props" )
609+ html .P (
610+ v_text = (
611+ "json_schema?.properties?.MATERIALS?.items?.oneOf?"
612+ ".find(v => v.properties?.[materials_section[selected_material]?.TYPE])?"
613+ ".properties?.[materials_section[selected_material]?.TYPE]?.properties?"
614+ ".[param_key]?.description || 'Error on parameter description'" ,
615+ ),
616+ style = "max-width: 450px;" ,
617+ )
581618 html .Td (
582619 v_text = ("param_val" ,),
583620 )
0 commit comments