Added an 'Our work' page listing projects and fixed generated card thumbnails. - #281
Conversation
|
Warning Review limit reachedYou’ve reached a temporary PR review limit under our Fair Usage Limits Policy. Next review available in: 48 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Plus Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (4)
Comment |
This comment has been minimized.
This comment has been minimized.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #281 +/- ##
========================================
Coverage 85.84% 85.84%
========================================
Files 18 18
Lines 226 226
========================================
Hits 194 194
Misses 32 32 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This comment has been minimized.
This comment has been minimized.
|
Code coverage (threshold: 80%) Per-class coverage |
Checklist before requesting a review
[#123] Verb in past tense.#123added to descriptionChangedsectionChanged
do_base_deploy_populate_our_work_page()deploy hook inweb/modules/custom/do_base/do_base.deploy.php, creating a publishedcivictheme_pagenode titled "Our work" and adding an "Our work" link ahead of every existing top-level item in thecivictheme-primary-navigationmenu./workrather than the/our-workpathauto would derive from its title, so the alias is set on the node'spathfield withPathautoState::SKIP. Without the skip, pathauto reclaims the alias the first time an author saves the page. The menu link needs no path of its own: it referencesentity:node/Nand follows the alias.soft-lightblend, title "Work you can go and look at.") with a lead paragraph and a/contactCTA, an introcivictheme_contentsection, and acivictheme_automated_listparagraph scoped to theprojectcontent type renderingcivictheme_promo_carditems in 3 columns withlimit_type: unlimitedandlimit: 12, giving 12 projects per page with the built-in pager; ordering reuses the automated-list view's existingpromote DESC, created DESCso no view change was needed._do_base_our_work_build_page()(assembles the paragraphs and node inside one transaction),_do_base_our_work_banner_media()(creates thecivictheme_imagemedia entity from the module-shipped asset with a fixed UUID so re-runs are no-ops, returningNULLrather than failing when the file is missing), and_do_base_menu_leading_weight()(reads the lowest existing top-level weight and returns one below it, rather than hard-coding a number that a menu reorder would silently invalidate).web/modules/custom/do_base/assets/our-work-banner.jpg.NodeGeneratorBase::commonValues()gatedfield_c_n_thumbnailonCaseMatrix::bit($index, 4), which over aCOUNTof 20 only turns on for indices 16 to 19 - the same indicesmoderationState()withholds from publication. Every bundle therefore ended up with exactly one published node carrying a thumbnail out of seventeen, so promo card grids rendered almost entirely imageless. The thumbnail now shares bit 0, which lifts that to eight of seventeen; it deliberately does not share bit 2, because a card with an image but no summary is a combination worth covering.tests/behat/features/our_work_page.featurewith two scenarios: the page opens the primary navigation and shows its copy, and 13 published + 1 draft project prove 12 cards per page, a pager, and that the draft is excluded. The card assertion counts the cards that fill page one rather than a site-wide total, so projects authored later cannot break it.docs/development.md.Production currently has no
projectnodes, so the list renders empty there until the first project is authored; the hook and the page do not depend on any existing content.Two related defects were found while diagnosing item 6 and left alone, since both are wider than this change:
field_c_n_banner_featured_imagesits on bit 4 inbannerValues()and has the identical problem, and the underlying cause is that aCOUNTof 20 under-provisions a five-bit matrix, which needs 32 indices to cover every combination.Screenshots
Before / After
Generated card thumbnails, per bundle over a 20-node run: