Skip to content

Sort the board by votes - #49

Merged
alexgarrettsmith merged 3 commits into
mainfrom
board-sorting
Sep 24, 2026
Merged

alexgarrettsmith merged 3 commits into
mainfrom
board-sorting

Conversation

@alexgarrettsmith

Copy link
Copy Markdown
Collaborator

The board was one long list, newest first. It now puts the most supported ideas at the top and shows twelve ideas per page, with previous and next links, so it stays quick to load as the list grows.

Two smaller changes came along with it:

  • Each idea on the board shows how many public comments it has. Internal notes aren't counted.
  • After posting feedback, people land on their new idea's page instead of the board, so they can see it and share the link straight away. With the board sorted by votes, a new idea starts near the bottom, so this saves people hunting for it.

The board and public pages docs are updated to match.

The most supported ideas now sit at the top of the board, and the board
shows twelve ideas per page with previous and next links, so it stays
quick to load as the list grows.
Each idea on the board now shows how many public comments it has.
Internal notes aren't counted.
Submitting feedback now lands on the new idea's page rather than the
board, so people can see what they posted and share the link straight
away.
@github-actions

Copy link
Copy Markdown
Contributor

⚠️ High Risk

Idea Submission Redirect
Reason: The change is inside the store action that creates ideas (it writes user data), and it now captures the new record and redirects to that idea's page instead of the dashboard.

  • app/Http/Controllers/IdeaController.php (modified)
  • tests/Feature/Ideas/SubmitIdeaTest.php (modified)
  • docs/feedback.md (modified)

Medium Risk

Public Board Listing
Reason: This public, unauthenticated page now sorts by votes, is paginated (the ideas prop changes from an array to a paginated object), and shows comment counts that depend on public vs. internal comment scoping.

  • app/Http/Controllers/DashboardController.php (modified)
  • resources/js/Pages/Dashboard.vue (modified)
  • tests/Feature/Ideas/ViewIdeaBoardTest.php (modified)
  • docs/public-pages.md (modified)

2 groups, 3 high-risk files to focus on

@github-actions

Copy link
Copy Markdown
Contributor

QA checklist: board sorted by votes and paginated, comment counts shown, redirect to the new idea after posting

Before you start: You need a test account that can sign in. The board needs more than 12 ideas so the page links show up. For the comment check, you need one idea with at least one public comment, and ideally a team account that can add an internal comment.

  • Sign in, click to submit new feedback, and fill in a title and description. Submit it. You should land on the page for the idea you just posted, not the dashboard, with the "Your feedback has been submitted!" message.
  • Submit the feedback form with the title or description left empty. You should stay on the form with an inline error, and no idea should be created.
  • Open the dashboard. Ideas should be listed with the most votes at the top, going down to the fewest. They should no longer be listed newest first.
  • Vote on an idea near the bottom of the first page until it has more votes than the ideas above it, then reload the dashboard. It should move up to its new position.
  • Count the ideas on the first page. There should be exactly 12, with "Page 1 of N" and a "Next" link below the list, and no "Previous" link.
  • Click "Next". You should see the next set of ideas, still in vote order, with nothing repeated from page 1. The label should read "Page 2 of N" and a "Previous" link should appear. On the last page there should be no "Next" link.
  • Click "Previous". You should be back on page 1 with the same ideas as before.
  • Look at the comment count on each idea card. An idea with one public comment should say "1 comment", one with none should say "0 comments", and one with several should say "N comments".
  • Add an internal comment to an idea as a team member, then reload the dashboard. That idea's count should not change, because only public comments are counted.
  • Sign out and open the dashboard. It should still load, with the vote ordering, comment counts and page links all working for a signed-out visitor.

@github-actions

Copy link
Copy Markdown
Contributor

Deployment
──────────
Required

  • Rebuild and publish the frontend assets (npm run build). The Dashboard now expects a paginated ideas object and shows comment counts and pagination links. Old cached JS will break against the new response. — resources/js/Pages/Dashboard.vue

Database
────────
Recommended

  • The board is now sorted by votes (orderByDesc('votes')->paginate(12)), but ideas.votes has no index. On a large ideas table, think about adding an index. No migration is included in this change. — app/Http/Controllers/DashboardController.php

Operational
───────────
Verify

  • Check that /dashboard shows the most-voted ideas first, 12 per page, with working Previous/Next links. ?page=N URLs should resolve correctly behind the production proxy/APP_URL. — app/Http/Controllers/DashboardController.php
  • Check that each card's comment count leaves out internal comments (publicComments). — app/Http/Controllers/DashboardController.php
  • Check that submitting feedback now goes to the new idea's page (feedback.show), not the dashboard. — app/Http/Controllers/IdeaController.php

@alexgarrettsmith
alexgarrettsmith merged commit 0ab302e into main Sep 24, 2026
4 checks passed
@alexgarrettsmith
alexgarrettsmith deleted the board-sorting branch September 24, 2026 07:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant