Skip to content

Commit 305b430

Browse files
committed
fix dropdown menus for actions
1 parent 23df755 commit 305b430

File tree

1 file changed

+16
-3
lines changed

1 file changed

+16
-3
lines changed

app/templates/components/workspace_actions.html

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,12 +70,13 @@ <h4 class="text-sm font-bold text-black mb-2">Actions</h4>
7070
data-rule-type="{{ rule.type }}"
7171
data-rule-slug="{{ rule.slug }}">
7272
{% if rule.type == 'ruleset' %}
73-
<span class="dropdown-item-icon ruleset-expand"></span>
7473
<span class="dropdown-item-checkbox" onclick="toggleRulesetItems(event, '{{ rule.slug }}')">+</span>
74+
<span class="flex-1">{{ rule.display_name or rule.name }}</span>
75+
<span class="ruleset-expand"></span>
7576
{% else %}
7677
<span class="dropdown-item-icon">+</span>
77-
{% endif %}
7878
<span>{{ rule.display_name or rule.name }}</span>
79+
{% endif %}
7980
</div>
8081
{% if rule.type == 'ruleset' and rule.children %}
8182
<div class="ruleset-children" id="children-{{ rule.slug }}" style="display: none; margin-left: 20px;">
@@ -367,15 +368,27 @@ <h4 class="text-sm font-bold text-black mb-2">Actions</h4>
367368
.ruleset-item {
368369
font-weight: 600;
369370
gap: 4px;
371+
justify-content: space-between;
370372
}
371373

372374
.ruleset-expand {
373375
transition: transform 150ms ease;
374376
flex-shrink: 0;
377+
margin-left: auto;
378+
font-size: 10px;
379+
width: 12px;
380+
height: 12px;
381+
display: flex;
382+
align-items: center;
383+
justify-content: center;
384+
}
385+
386+
.ruleset-item:not(.expanded) .ruleset-expand {
387+
transform: rotate(180deg); /* ▲ becomes ▼ */
375388
}
376389

377390
.ruleset-item.expanded .ruleset-expand {
378-
transform: rotate(90deg);
391+
transform: rotate(0deg); /* ▲ stays as ▲ */
379392
}
380393

381394
.dropdown-item-checkbox {

0 commit comments

Comments
 (0)