Skip to content

Self-hosted project management for devs and their clients: tickets, time tracking, docs and meetings, with an AI assistant that cites its sources. AGPL-3.0.

1.1 KB
Raw Blame
<%# First sub-task: the page only showed the compact empty-state input (no list yet), so swap the
    whole section for the populated layout (heading + list with the new child + the always-visible
    quick-add). autofocus: true keeps the cursor in the input so the next one can be typed right away. %>
<%= turbo_stream.replace "subtasks-#{@parent.id}" do %>
  <%# expanded: true keeps the list open even for "compact" users, so the quick-add input is visible
      to add the next sub-task right after the first. %>
  <%= render 'organisations/tickets/subtasks_section', ticket: @parent, autofocus: true, expanded: true %>
<% end %>

<%# The parent's Subs cell in the list counts its sub-tickets (TicketListColumns). %>
<%= safe_join(ticket_list_parent_streams(@child)) %>

<%# The new sub-task is a row of the list too. Its place, and whether the filter shows it, only
    the list's query knows, so the frame reloads from the page's live address. No frame on this
    page (the inbox, a standalone ticket): the action does nothing. The quick-add sits outside
    the frame and keeps its focus. %>
<%= turbo_stream.action(:reloadFrame, 'tickets_list_frame') %>