Skip to content

Replaced 'promote' with 'sticky' as the pinning sort in automated lists. - #290

Merged
AlexSkrypnyk merged 1 commit into
developfrom
feature/auto-list-sticky
Aug 5, 2026
Merged

Replaced 'promote' with 'sticky' as the pinning sort in automated lists.#290
AlexSkrypnyk merged 1 commit into
developfrom
feature/auto-list-sticky

Conversation

@AlexSkrypnyk

Copy link
Copy Markdown
Member

Checklist before requesting a review

  • Subject includes ticket number as [#123] Verb in past tense.
  • Ticket number #123 added to description
  • Added context in Changed section
  • Self-reviewed code and commented in commented complex areas.
  • Added tests for fix/feature.
  • Relevant tests run and passed locally.

Changed

  1. Swapped the promote sort for a sticky sort as the first (primary) sort in the civictheme_automated_list view (config/default/views.view.civictheme_automated_list.yml), keeping DESC order. The Authored on (created) DESC secondary sort is unchanged. promote controls front-page promotion, not list pinning, so editors could not pin an item to the top of an automated list without also promoting it to the front page; sticky (Sticky at top of lists) now drives the pinning instead.
  2. Added tests/behat/features/paragraph_civictheme_automated_list_sort.feature with two @api scenarios: one confirms a sticky item renders above a more recently authored, non-sticky item (and above a merely promoted item); the other confirms that, with nothing sticky, ordering still falls back to authored date. Both were verified locally against the fix (pass) and against the prior promote-based config (fail).

Screenshots

N/A - config-only change to a view's sort order, plus a Behat feature file. No template, styling, or layout changes.

Before / After

BEFORE - sort stack: promote DESC, then created DESC
┌─────────────────────────────────────────────┐
│ 1. Promoted Page    (promote=1)              │  <- pinned by accident
│ 2. Newest Page      (created -1 day)         │
│ 3. Sticky Page      (created -2 days)        │  <- meant to be pinned, buried
└─────────────────────────────────────────────┘

AFTER - sort stack: sticky DESC, then created DESC
┌─────────────────────────────────────────────┐
│ 1. Sticky Page      (sticky=1)               │  <- pinned as intended
│ 2. Newest Page      (created -1 day)         │
│ 3. Promoted Page    (created -3 days)        │  <- promotion no longer pins it
└─────────────────────────────────────────────┘

@AlexSkrypnyk AlexSkrypnyk added the AUTOMERGE Pull request has been approved and set to automerge label Aug 5, 2026
@coderabbitai

coderabbitai Bot commented Aug 5, 2026

Copy link
Copy Markdown

Warning

Review limit reached

You’ve reached a temporary PR review limit under our Fair Usage Limits Policy.

Your recent review volume is higher than typical usage, so adaptive limits are currently applied.

Next review available in: 27 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

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 configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: a2236605-99e1-434b-91ae-615d6a8c9589

📥 Commits

Reviewing files that changed from the base of the PR and between f9e2e93 and dcbe9b5.

📒 Files selected for processing (2)
  • config/default/views.view.civictheme_automated_list.yml
  • tests/behat/features/paragraph_civictheme_automated_list_sort.feature

Comment @coderabbitai help to get the list of available commands.

@github-actions

github-actions Bot commented Aug 5, 2026

Copy link
Copy Markdown

Code coverage (threshold: 80%)

  Classes: 50.00% (9/18)
  Methods: 72.50% (29/40)
  Lines:   90.36% (375/415)
Per-class coverage
Drupal\do_base\EventSubscriber\PreviewLinkCacheSubscriber
  Methods:  33.33% ( 1/ 3)   Lines:  11.11% (  1/  9)
Drupal\do_base\EventSubscriber\ThemeColorSubscriber
  Methods:  66.67% ( 2/ 3)   Lines:  40.00% (  4/ 10)
Drupal\do_content_api\EventSubscriber\JsonApiWriteGateSubscriber
  Methods:  66.67% ( 2/ 3)   Lines:  88.89% (  8/  9)
Drupal\do_content_api\Hook\EntityCreateAccessHook
  Methods: 100.00% ( 1/ 1)   Lines: 100.00% (  9/  9)
Drupal\do_content_api\Hook\ModerationPolicyHook
  Methods:  50.00% ( 1/ 2)   Lines:  93.75% ( 15/ 16)
Drupal\do_content_api\Routing\RouteSubscriber
  Methods: 100.00% ( 1/ 1)   Lines: 100.00% (  6/  6)
Drupal\do_feed\FeedUrlBuilder
  Methods: 100.00% ( 4/ 4)   Lines: 100.00% ( 18/ 18)
Drupal\do_feed\Form\FeedSettingsForm
  Methods: 100.00% ( 4/ 4)   Lines: 100.00% ( 15/ 15)
Drupal\do_feed\Hook\EntityDeleteHook
  Methods:  50.00% ( 1/ 2)   Lines:  92.31% ( 12/ 13)
Drupal\do_feed\Hook\EntityPresaveHook
  Methods: 100.00% ( 4/ 4)   Lines: 100.00% ( 54/ 54)
Drupal\do_feed\Hook\PreprocessParagraphHook
  Methods: 100.00% ( 2/ 2)   Lines: 100.00% ( 14/ 14)
Drupal\do_feed\Hook\PreprocessViewsViewRowRssHook
  Methods: 100.00% ( 1/ 1)   Lines: 100.00% (  3/  3)
Drupal\do_feed\Hook\ViewsPreViewHook
  Methods:  50.00% ( 1/ 2)   Lines:  96.43% ( 27/ 28)
Drupal\do_generated_content\Generator\CaseMatrix
  Methods: 100.00% ( 3/ 3)   Lines: 100.00% ( 12/ 12)
Drupal\do_generated_content\Generator\RelativeDate
  Methods: 100.00% ( 1/ 1)   Lines: 100.00% (  1/  1)

@codecov-commenter

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 84.68%. Comparing base (f9e2e93) to head (dcbe9b5).

Additional details and impacted files
@@           Coverage Diff            @@
##           develop     #290   +/-   ##
========================================
  Coverage    84.68%   84.68%           
========================================
  Files           19       19           
  Lines          235      235           
========================================
  Hits           199      199           
  Misses          36       36           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@AlexSkrypnyk AlexSkrypnyk added the Needs review Pull request needs a review from assigned developers label Aug 5, 2026
@AlexSkrypnyk
AlexSkrypnyk merged commit 16fd056 into develop Aug 5, 2026
10 checks passed
@AlexSkrypnyk
AlexSkrypnyk deleted the feature/auto-list-sticky branch August 5, 2026 04:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

AUTOMERGE Pull request has been approved and set to automerge Needs review Pull request needs a review from assigned developers

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants