Collapse the pre-submission rules on contribution type pages - #989
Merged
Conversation
The pre-flight submission guidance is now a disclosure in every variant
rather than only on mobile. On a contribution type detail page it starts
collapsed to a single header row, so the rules no longer push the type's
missions and statistics down the page. The create form's sticky rail
still opens by default, since there the rules are guidance for a form the
user is actively filling in.
## Claude Implementation Notes
- frontend/src/components/portal/ContributionGuidelines.svelte: Desktop card
branch is a <details open={!detail}> with the header as <summary> plus a
rotating chevron; header margin collapses when closed.
- frontend/src/tests/ContributionGuidelines.test.js: Cover collapsed-on-detail
and open-on-create-form defaults.
- frontend/CLAUDE.md: Document the per-variant open/closed behavior.
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (4)
📝 WalkthroughWalkthroughContribution guidance now uses a collapsible desktop disclosure. Detail pages start collapsed, while submit forms remain open. Tests and documentation cover the route-specific behavior. ChangesContribution guidance disclosure
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related PRs
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
What
The pre-flight submission guidance card (
ContributionGuidelines) is now a<details>disclosure in every variant, not just on mobile./contribution-type/:id): starts collapsed to a single header row with a chevron. The rules no longer push the type's missions and statistics down the page.xland up): still open by default, since there the rules are guidance for a form the user is actively filling in.Note on mission submission limits
The other half of this workspace's brief — separating a mission's per-user submission counter from its contribution type's — was already delivered by #986 and is on
dev.Mission.has_independent_limits(default off) is the per-mission toggle: off means mission submissions consume the type's slots, on means the mission is budgeted separately. No further work was needed here.One deliberate limitation worth knowing: an independently-budgeted mission cannot be unlimited. The
mission_independent_limits_need_a_capcheck constraint requires at least one mission-level cap, since a mission that skipped its type's ceiling with no cap of its own would accept infinite submissions. Use a highmax_submissionsfor an effectively-unlimited mission.Testing
ContributionGuidelines.test.js: 13/13, including two new cases pinning collapsed-on-detail and open-on-create-form.SubmitContribution*suites: 18/18.dev(Profile,api,routes,AuthButton) and none render this component.Summary by CodeRabbit
New Features
Accessibility