Affiliation edit gear: standalone editor with comments + reassign - #2235
Merged
Conversation
maebeale
marked this pull request as ready for review
August 17, 2026 01:43
The nested affiliation rows on the org/person edit forms can't reassign the person/org (hidden once persisted) and have nowhere for comments. A per-row gear escapes to a standalone editor that can do both, and carries return_to so it comes back to the exact row it was opened from. Affiliation is now commentable (same polymorphic pattern as Person/Org), so edits are audit-tracked via the inherited AhoyTrackable concern. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Keeps the shipped-feature seed current per the Features & tips workflow. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Preserves the org/person edit form's unsaved state; the editor's eyebrow and Cancel handle the return since the browser back button is useless across a new tab. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Put the person/organization lookups in one row, move their hints into simple_form's hint slot so they sit tight under each field (the manual paragraph sat below the wrapper's mb-4, leaving a large gap), and add a hint clarifying what the "Facilitator" title means. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Give the title flex-1 and the date fields a fixed width so all three sit on one row on desktop and wrap only when space runs out (before, the date wrappers' full-width inputs forced End to wrap). Make paginated-fields honor a #row fragment on connect: the affiliation rows paginate at 10/page, so a returned-to row was hidden on a later page and the browser couldn't scroll to it. Now the controller jumps to that row's page and scrolls it into view. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
- Hide the nested-row "Remove" link on persisted affiliations; deletion now happens via the gear editor's Delete button (destroy honors return_to and lands back on the origin's affiliations section). - Compact the person/organization profile buttons in the nested rows (add a compact option to organization_profile_button) and raise the date inputs to the other fields' height. - Tighten vertical padding around the affiliation cards and the Add Affiliation button on both edit forms. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The person/organization column is the tallest, so pt-3/pb-2 left more space above the label than below the profile button; use py-2 so the gap above the label matches the gap below the button. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The two-line "Primary org<br>contact" label with the checkbox floating below it made that column stack taller than the input columns, leaving extra space in the card. Use a single-line label and center the checkbox in a 42px box so the column matches the inputs. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
maebeale
force-pushed
the
maebeale/affiliation-edit-gear
branch
from
August 17, 2026 05:49
f907e12 to
5726034
Compare
Dates, address, and non-facilitator titles now echo the person button: empty fields are transparent so the card tint shows through, filled fields take the pill colour for the row's state (grey inactive, purple facilitator, else white). The "Facilitator" title keeps its own darker purple. Server-rendered and kept in sync live via the inactive-toggle controller (new valueField targets + paintFields), with address-select dispatching a change so a picked address repaints too. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…server expired Filled dates/address on an inactive facilitator row now take the same light purple (purple-50) as the inactive facilitator title, instead of grey. Also pass the server-rendered `expired` to the controller so a flagged-inactive row with no end date renders consistently (the JS can't see the DB flag, so it now trusts the server for date-less rows instead of guessing active). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…purple Active non-facilitator rows now use a very light grey (gray-50, near white) instead of the sky/emerald theme tint. Inactive facilitator rows keep a light purple background + pill (new facilitator_inactive tint) to match their purple title/fields, rather than greying out like inactive non-facilitator rows. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…ansparent Inactive facilitator filled fields (and pill) now use the same bg-purple-100 as active — the person-button colour — instead of the lighter purple-50; the row's light-purple bg + softer title text + dimming still read it as inactive. Bump the inactive-row dimming from opacity-60 to opacity-80 so the page no longer bleeds through. Drop the now-unused facilitator_inactive pill tint. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…end date) Adopt option C from the prototype: colour now carries role only (facilitator = purple, else neutral) for both active and inactive rows, and inactive is a structural cue instead — a dashed row border plus a struck-through end date (.date-ended). This separates the role and status axes so all four states read clearly, and drops the opacity/shade juggling. Simplifies the controller (role- only fills, no isPast in the colour paths). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…fields Role is the hue (facilitator = purple, non-facilitator = blue) and status is the saturation (active = full -100 fills / -500 accent, inactive = super-light -50 fills / -300 accent + softer title). Add blue pill tints. Inactive rows also strike through every field value (.aff-ended, row-wide), replacing the earlier end-date-only strike. Drops the dashed-border / neutral-grey scheme. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Extend the .aff-ended strike to the pill's name/email (the .truncate spans in the profile-button link), leaving the avatar untouched. Server-rendered, so it applies on page load as well as live. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Show a comment icon (in the row's hue — purple/blue) beside the primary-contact toggle when the affiliation has comments; hovering reveals the count and the most recent comment. Add a request spec covering it. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
maebeale
added a commit
that referenced
this pull request
Aug 19, 2026
The person History card and activity timeline had nothing multi-year to render, so affiliation edits, trainings, memberships and comments couldn't be seen interleaved. Two gaps kept the seeded rows invisible: affiliation comments were missing from PersonCommentAggregator (Affiliation became commentable in #2235 without being added), and payment lifecycle events record the STI subclass ("CashPayment"), which the person's Payment filter never matched. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🤖 suggested review level: 3 Read 📖 mostly view restructuring (grid rows + editor layout) plus one strong-param addition; contained blast radius
Why
What
fa-geartop-right of each persisted affiliation row on both edit forms; opens the editor in a new tab.affiliations#edit/#update, admin-only) — reassign person, reassign organization, edit title/dates/primary-contact, plus the standard comment thread.Affiliationis now polymorphicallycommentable(same pattern as Person/Org); edits are audit-tracked via the inheritedAhoyTrackableconcern (update.affiliation).return_to+origin_id; save/cancel returns to the originating edit page, scrolled to the row (the editor's eyebrow + Cancel are the way back, since the new tab has no useful browser back).Layout & editor polish
Organization/Person, Title, Address, Start, End, Primary contact). Atxl+the rows align on a grid under the header; belowxlthey wrap and keep per-field labels; on mobile they stack. Uniform row height (Title textarea pinned +resize-none), symmetric padding.organization_address_idso the change saves. Top of the form is now Person + Primary contact on one row, then Organization + Address at 50/50. Org and address notes are amber warnings; title hint reworded.Notes
organization_address_idandevent_registration_id(done inbefore_validationso the address validation doesn't reject the change first).Tests
update.affiliationevent), page_bg_class mapping.