• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

MushroomObserver / mushroom-observer / 25927778268
96%
main: 96%

Build:
Build:
LAST BUILD BRANCH: nimmo-species-lists-write-in-phlex
DEFAULT BRANCH: main
Ran 15 May 2026 04:04PM UTC
Jobs 1
Files 995
Run time 2min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

15 May 2026 04:00PM UTC coverage: 96.451%. First build
25927778268

Pull #4269

github

nimmolo
Extract Components::FormNotes (Panel + notes textareas)

`Components::ObservationFormNotes` was a Phlex re-implementation of
the inner half of `shared/_notes_fields.html.erb` (used by the
field-slip ERB form). The inner content was nearly identical between
the two; the differences were:
  - How each part's key/value/label gets resolved (observation: via
    `@observation.notes_normalized_key` / `notes_part_value` and a
    NOTES/`part` label; field-slip: via the part's own `.name`,
    `.value`, `.label`).
  - The indent class on the inner div (observation: none; field-slip:
    `ml-5`).
  - Currently, only observation wraps the whole thing in a Bootstrap
    Panel; field-slip emits a bare div. We're standardizing on
    "every notes section is in a collapsible Panel" so the new
    component owns that.

`Components::FormNotes`:
  - Owns the Panel wrap (collapsible card, NOTES heading).
  - Takes uniform `FormNotes::Part` structs (`Data` class with
    `:key, :value, :label`) — callers normalize their native parts
    before passing.
  - Panel id, expanded state, indent, single-part-mode, and
    single-part help block are all props.

`Components::ObservationFormNotes` is deleted. `ObservationForm` now
calls `FormNotes(...)` directly, with the observation-specific glue
(parts adapter, single-part detection, expanded-state check, textile
help block) extracted into a private `ObservationForm::NotesPanel`
mixin in `app/components/observation_form/notes_panel.rb`. That keeps
the `ObservationForm` class under Metrics/ClassLength without
disabling the cop.

The ERB `shared/_notes_fields.html.erb` partial (still used by the
field-slip ERB form) is untouched; the field-slip Phlex conversion
will use `Components::FormNotes` directly, after which the ERB
partial can be deleted.

Tests:
- New `test/components/form_notes_test.rb` covers:
  - The collapsible Panel wrap (panel id, collapse target, NOTES heading)
  - Multi-part mode (general-help paragraph + per-par... (continued)
Pull Request #4269: Extract Components::FormNotes (shared Panel + notes textareas)

63 of 63 new or added lines in 4 files covered. (100.0%)

38370 of 39782 relevant lines covered (96.45%)

657.64 hits per line

Jobs
ID Job ID Ran Files Coverage
1 25927778268.1 15 May 2026 04:04PM UTC 995
96.45
GitHub Action Run
Source Files on build 25927778268
  • Tree
  • List 995
  • Changed 0
  • Source Changed 0
  • Coverage Changed 0
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #25927778268
  • Pull Request #4269
  • Next Build on nimmo-extract-notes-fields-component (#25928527606)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc