Repository navigation
Load admin home action buttons in one lazy frame; Review badges skip counting #2847
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
e991ead
Start: load admin home badge counts in one request
maebeale 75b0243
Load admin home badge counts in one request
maebeale abd70a7
Badge Data health and Author credit with a yes/no check
maebeale ffeebd8
Label the yes/no badges Review
maebeale a515e6f
Answer the author credit badge in SQL
maebeale 6bd9071
Flag unsynced features from the newest 20 seeds
maebeale 67585b6
Label the Sync features badge Review too
maebeale b99acae
Admin home: one plain lazy frame for action buttons; document Turbo rβ¦
maebeale File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,27 @@ | ||
| <div class="mt-3 flex flex-wrap gap-2"> | ||
| <%= link_to profile_change_requests_path, class: button_classes(:primary_outline) do %> | ||
| <i class="fa-solid fa-user-pen"></i> Changes requested | ||
| <%= render "count_badge", count: local_assigns[:pending_change_requests_count] %> | ||
| <% end %> | ||
| <%= link_to admin_data_health_path, class: button_classes(:primary_outline) do %> | ||
| <i class="fa-solid fa-heart-pulse"></i> Data health | ||
| <%= render "badge", text: (Admin::HomeController::REVIEW_BADGE if local_assigns[:data_health_flagged]), title: Admin::HomeController::DATA_HEALTH_BADGE_TITLE %> | ||
| <% end %> | ||
| <% if allowed_to?(:import?, EventRegistration) %> | ||
| <%= link_to new_event_registration_import_path(return_to: "admin_home"), class: button_classes(:primary_outline) do %> | ||
| <i class="fa-solid fa-upload"></i> Import registrants | ||
| <% end %> | ||
| <% end %> | ||
| <%= link_to author_credit_divergences_path, class: button_classes(:primary_outline) do %> | ||
| <i class="fa-solid fa-pen-nib"></i> Author credit divergences | ||
| <%= render "badge", text: (Admin::HomeController::REVIEW_BADGE if local_assigns[:author_credit_flagged]) %> | ||
| <% end %> | ||
| <% if allowed_to?(:create?, Feature) %> | ||
| <%= button_to import_features_path, | ||
| class: button_classes(:primary_outline), | ||
| form: { data: { turbo_confirm: "Add any newly-shipped features and fill in missing details? Your existing edits are kept." } } do %> | ||
| <i class="fa-solid fa-arrows-rotate"></i> Sync features & tips | ||
| <%= render "badge", text: (Admin::HomeController::REVIEW_BADGE if local_assigns[:features_unsynced]) %> | ||
| <% end %> | ||
| <% end %> | ||
| </div> |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| <% if text.present? %> | ||
| <%= tag.span text, class: "bg-primary ms-1 rounded-full px-2 py-0.5 text-xs text-white ring-1 ring-white", title: local_assigns[:title] %> | ||
| <% end %> |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1 @@ | ||
| <% if count.to_i.positive? %> | ||
| <%= tag.span number_with_delimiter(count), class: "bg-primary ms-1 rounded-full px-2 py-0.5 text-xs text-white ring-1 ring-white", title: local_assigns[:title] %> | ||
| <% end %> | ||
| <%= render "badge", text: (number_with_delimiter(count) if count.to_i.positive?), title: local_assigns[:title] %> |
This file was deleted.
Oops, something went wrong.
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| <%= turbo_frame_tag :action_buttons, target: "_top" do %> | ||
| <%= render "action_buttons", | ||
| pending_change_requests_count: @pending_change_requests_count, | ||
| data_health_flagged: @data_health_flagged, | ||
| author_credit_flagged: @author_credit_flagged, | ||
| features_unsynced: @features_unsynced %> | ||
| <% end %> |
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
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
9 changes: 9 additions & 0 deletions
9
db/seeds/features/2026-10-25-admin-home-clicks-without-waiting-for-badges.yml
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| name: "Admin home links work while the action badges load" | ||
| area: reporting | ||
| display_status: admin_facing | ||
| released_on: 2026-10-25 | ||
| pr_number: 2847 | ||
| summary: >- | ||
| Admin home's action badges now load together in the background, so clicks | ||
| no longer wait for them. Data health, Author credit, and Sync features & tips | ||
| show "Review" when something needs attention. |
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
π€ From Claude: Only the newest 20 seed files are checked, so a seed with an older filename date merged after a sync won't light the badge until a newer seed does. Sync itself still imports everything.