feat(workflowengine): add name, description and collapsible UI to flow rules#60981
Conversation
…w rules Rules were always rendered expanded, making the list unmanageable when more than a handful of rules were configured. Users had to scroll through all editors just to locate a specific rule. Each rule now shows a collapsible header with its name, falling back to "Unnamed flow". Saved rules collapse by default; new unsaved rules expand automatically. A description field is available inside the expanded rule editor. Signed-off-by: Dominic Blaß <letmefixthis.code@gmail.com>
artonge
left a comment
There was a problem hiding this comment.
cc @nextcloud/designers to review whether this need changes.
and cc @salmart-dev for awareness.
|
|
||
| $table = $schema->getTable('flow_operations'); | ||
| if (!$table->hasColumn('description')) { | ||
| $table->addColumn('description', Types::TEXT, [ |
There was a problem hiding this comment.
As the description is limited in length, shouldn't it be a Types::STRING with a 'length' => 4000 like the name column?
There was a problem hiding this comment.
look here:
server/lib/private/DB/Migrator.php
Line 69 in 732c234
There was a problem hiding this comment.
Maybe @Altahrim has an idea of what's the best solution
| :model-value="inputValue" | ||
| @update:model-value="updateOperationByEvent" /> |
| @input="updateOperation" /> | ||
| </Operation> | ||
| <div class="buttons"> | ||
| <NcButton v-if="rule.id < -1 || dirty" @click="cancelRule"> |
There was a problem hiding this comment.
for me its way more clear to check rule.id < 1 (because in the database we have 1..n) the code was not checking for 0 .. or -1 - also in the old code had rule.id < -1 and rule.id < 0 checks
| <component :is="expanded ? 'MenuUp' : 'MenuDown'" :size="20" /> | ||
| </span> | ||
| </button> | ||
| <div v-show="expanded" :id="bodyId" class="rule__body"> |
There was a problem hiding this comment.
Would the <details> HTML component reduce the custom logic and improve accessibility?
| nameMaxLength: NAME_MAX_LENGTH, | ||
| descriptionMaxLength: DESCRIPTION_MAX_LENGTH, |
There was a problem hiding this comment.
As it is used in only one location, we can skip creating global variables and use the value directly in the HTML template.
Summary
Checklist
3. to review, feature component)stable32)AI