Refactor Process Flow Component Labels for Improved Clarity
- Updated HexagonShape.vue, RectangleShape.vue, SwimlaneHorizontal.vue, SwimlaneVertical.vue, and TrapezoidShape.vue to remove label text from shape components, enhancing visual clarity. - Modified index.vue to clarify node label and description input visibility, ensuring they only appear for process nodes and text annotations. - Adjusted processBuilder.js to set default label values to an empty string for new nodes, improving consistency in node creation.
This commit is contained in:
parent
ee91cd6c56
commit
4668abd062
@ -36,7 +36,7 @@ const displayDescription = computed(() => {
|
||||
:style="shapeStyle"
|
||||
>
|
||||
<div class="custom-node-content" v-if="displayLabel || displayDescription">
|
||||
<div class="custom-node-label" v-if="displayLabel">{{ displayLabel }}</div>
|
||||
<div class="custom-node-label" v-if="displayLabel"></div>
|
||||
<div class="shape-description" v-if="displayDescription">{{ displayDescription }}</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -45,7 +45,7 @@ const displayDescription = computed(() => {
|
||||
:style="shapeStyle"
|
||||
>
|
||||
<div class="shape-content" v-if="displayLabel || displayDescription">
|
||||
<div class="shape-label" v-if="displayLabel">{{ displayLabel }}</div>
|
||||
<div class="shape-label" v-if="displayLabel"></div>
|
||||
<div class="shape-description" v-if="displayDescription">{{ displayDescription }}</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -45,7 +45,7 @@ const displayDescription = computed(() => {
|
||||
:style="shapeStyle"
|
||||
>
|
||||
<div class="shape-content" v-if="displayLabel || displayDescription">
|
||||
<div class="shape-label" v-if="displayLabel">{{ displayLabel }}</div>
|
||||
<div class="shape-label" v-if="displayLabel"></div>
|
||||
<div class="shape-description" v-if="displayDescription">{{ displayDescription }}</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -47,7 +47,7 @@ const displayDescription = computed(() => {
|
||||
:style="shapeStyle"
|
||||
>
|
||||
<div class="shape-content" v-if="displayLabel || displayDescription">
|
||||
<div class="shape-label" v-if="displayLabel">{{ displayLabel }}</div>
|
||||
<div class="shape-label" v-if="displayLabel"></div>
|
||||
<div class="shape-description" v-if="displayDescription">{{ displayDescription }}</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -36,7 +36,7 @@ const displayDescription = computed(() => {
|
||||
:style="shapeStyle"
|
||||
>
|
||||
<div class="custom-node-content" v-if="displayLabel || displayDescription">
|
||||
<div class="custom-node-label" v-if="displayLabel">{{ displayLabel }}</div>
|
||||
<div class="custom-node-label" v-if="displayLabel"></div>
|
||||
<div class="shape-description" v-if="displayDescription">{{ displayDescription }}</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -3270,8 +3270,8 @@ const sendToBack = () => {
|
||||
Basic Properties
|
||||
</h4>
|
||||
|
||||
<!-- Node Label -->
|
||||
<div class="mb-3">
|
||||
<!-- Node Label (only for process nodes and text annotations, not other shapes) -->
|
||||
<div v-if="!selectedNodeData.data?.isShape || selectedNodeData.type === 'text-annotation'" class="mb-3">
|
||||
<label class="block text-xs font-medium text-gray-600 mb-1">Label</label>
|
||||
<input
|
||||
v-model="nodeLabel"
|
||||
@ -3281,8 +3281,8 @@ const sendToBack = () => {
|
||||
/>
|
||||
</div>
|
||||
|
||||
<!-- Node Description -->
|
||||
<div class="mb-3">
|
||||
<!-- Node Description (only for process nodes and text annotations, not other shapes) -->
|
||||
<div v-if="!selectedNodeData.data?.isShape || selectedNodeData.type === 'text-annotation'" class="mb-3">
|
||||
<label class="block text-xs font-medium text-gray-600 mb-1">Description</label>
|
||||
<textarea
|
||||
v-model="nodeDescription"
|
||||
|
@ -662,11 +662,11 @@ export const useProcessBuilderStore = defineStore('processBuilder', {
|
||||
const newNode = {
|
||||
id: node.id || uuidv4(),
|
||||
type: node.type,
|
||||
label: node.label || node.data?.label || 'New Node',
|
||||
label: node.label || node.data?.label || '',
|
||||
position: node.position || { x: 100, y: 100 },
|
||||
data: {
|
||||
...node.data,
|
||||
label: node.data?.label || node.label || 'New Node',
|
||||
label: node.data?.label || node.label || '',
|
||||
// Ensure shape is set for new nodes
|
||||
shape: node.data?.shape || (node.type === 'gateway' ? 'diamond' : 'rectangle'),
|
||||
// Ensure default colors are set for new nodes
|
||||
|
Loading…
x
Reference in New Issue
Block a user