Skip to content

Audit: ERB partials that have not been converted to ViewComponents #331

Description

@baonguyenNava

Overview

The SDK ships a number of UI elements as ERB partials (some with locals) that do not have a backing ViewComponent class. This issue tracks those partials, documents their current state, and serves as a decision point for whether any should be promoted to ViewComponents in the future.

Background

The SDK's architecture favors ViewComponents (Strata::Foo::BarComponent) for testability, slot-based extension, and API clarity. However, not every UI element warrants the overhead of a full component class — some partials are simple enough that a template with locals remains the right abstraction.

Current Partial Inventory

Shared partials (app/views/strata/shared/)

Partial Locals Notes
_form_buttons.html.erb back_path, f Renders Back + Save and Continue on every question page
_exit_link.html.erb exit_path, exit_text "Save and exit" link with arrow icon
_breadcrumbs.html.erb TBD Used in staff flows

Staff partials (app/views/strata/staff/)

Partial Notes
_header.html.erb Staff-facing header; no citizen equivalent shipped
_header_link.html.erb Individual nav link inside staff header

Cases partials (app/views/strata/cases/)

Partial Notes
_status_tag.html.erb Renders a status badge for a case
_sidenav.html.erb Left-hand navigation for staff case detail
_nav_tab.html.erb Individual tab within case nav

Tasks partials (app/views/strata/tasks/)

Partial Notes
_status_tag.html.erb Status badge for a task (parallel to cases status tag)
_no_tasks_alert.html.erb Info alert shown when task list is empty
_type_filter.html.erb Filter control for task type
_due_date_filter.html.erb Filter control for due date
_task_info.html.erb Displays metadata for a single task

Application Forms partials (app/views/strata/application_forms/)

Partial Notes
_row.html.erb Single row in a citizen applications table

Notes

  • _form_buttons and _exit_link appear on every question page and have a well-defined local interface — they are the strongest candidates for future ViewComponent promotion (tracked separately in Build ViewComponent class for Step Indicator #329 for the step indicator pattern).
  • The two _status_tag partials (cases and tasks) duplicate the same concept and could be unified into a single Strata::StatusTagComponent as part of a future consolidation effort.
  • Filter partials (_type_filter, _due_date_filter) are closely tied to server-rendered form state; their component value depends on how interactive filtering evolves.

Next Steps

This issue does not prescribe converting any of these to ViewComponents. Instead, use it to:

  • Confirm the inventory is complete (add any missing partials found during SDK development)
  • Label any partial that gains a component with a link to the new component PR
  • Decide whether the two _status_tag partials should be consolidated (#discussion)
  • Revisit _form_buttons and _exit_link after the Step Indicator component (Build ViewComponent class for Step Indicator #329) ships, to evaluate whether the same pattern applies

Related

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions