Skip to content

1648: Views Block Rework: Generalize directory grid into card grid options (cards-per-row + profile data pass-throughs) - #514

Open
dblanken-yale wants to merge 1 commit into
1318-views-reworkfrom
1648-card-grid-options
Open

1648: Views Block Rework: Generalize directory grid into card grid options (cards-per-row + profile data pass-throughs)#514
dblanken-yale wants to merge 1 commit into
1318-views-reworkfrom
1648-card-grid-options

Conversation

@dblanken-yale

@dblanken-yale dblanken-yale commented Sep 5, 2026

Copy link
Copy Markdown
Contributor

1648: Views Block Rework: Generalize directory grid into card grid options (cards-per-row + profile data pass-throughs)

Theme half of yalesites-org/YaleSites-Internal#1648: passes the profile contact fields
through to the shared reference card.

Description of work

Base branch is 1318-views-rework, not develop — this builds on the Views Block
Architectural Rework (yalesites-org/YaleSites-Internal#1161).

Functional testing steps:

  • Place a People - Card Grid View block, tick Show Department / Email / Phone / Pronouns, and confirm each renders on the card.
  • Confirm the email is a working mailto: link and the phone a working tel: link.
  • Repeat with a People - List View block — the same four options should work there.
  • Untick each option and confirm the corresponding line disappears.
  • Confirm a profile with those fields empty renders no empty rows or stray punctuation.
  • Confirm People - Directory View is visually unchanged.

References yalesites-org/YaleSites-Internal#1648

https://claude.ai/code/session_01Kdr7Qytn3hXDByx6nUXn3i

The card and list design options render profiles through the shared reference
card, which can now show department, email, phone and pronouns. Pass those
fields plus the matching toggles that hook_views_pre_render() sets on each
result node, so a people listing can carry the same detail the profile-only
directory card hardcoded.

Email and phone go through as raw field values rather than rendered field
output, because the component builds the mailto:/tel: links itself.

Only these two view modes: directory renders the separate directory-listing
card, which shows this data unconditionally and ignores the flags, and
condensed renders none of it.

The explanatory comment sits above the embed rather than inside its with{}
hash on purpose. Twig comments are not legal inside a tag — one in the hash
makes the template fail to compile with "Unclosed block", which takes every
page carrying a people card grid to an HTTP 500.

Claude-Session: https://claude.ai/code/session_01Kdr7Qytn3hXDByx6nUXn3i
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant