Skip to content

mackenzie/proportionate-acceptances - #116

Merged
dymackenzie merged 8 commits into
devfrom
mackenzie/proportionate-acceptances
Jul 31, 2026
Merged

mackenzie/proportionate-acceptances#116
dymackenzie merged 8 commits into
devfrom
mackenzie/proportionate-acceptances

Conversation

@dymackenzie

Copy link
Copy Markdown
image

@github-actions

github-actions Bot commented Jul 24, 2026

Copy link
Copy Markdown

Visit the preview URL for this PR (updated for commit 92157a9):

https://dev-nwplus-admin--pr116-30591410945-up7l8va2.web.app

(expires Sun, 09 Aug 2026 23:59:25 GMT)

🔥 via Firebase Hosting GitHub Action 🌎

Sign: c290bf9e2fac0401389f751f415cce4267517b51

@dakshshahani

Copy link
Copy Markdown
Collaborator

hi - shannon here

Comment thread src/lib/acceptance.ts Outdated
exceedsRatioLimit:
hasOverflow &&
finalBeginnerPercentage !== null &&
Math.abs(finalBeginnerPercentage - beginnerPercentage) > MAX_RATIO_DEVIATION_POINTS,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After testing, I think it would be simpler to remove the exceedsRatioLimit restriction. If the ratio cannot be met, it should be shown as informational rather than blocking. The organizer can choose to tweak the configuration if it is not satisfactory.

Keep always showing the requested counts, selected counts, available counts, and resulting ratio, and only allow confirmation whenever at least one applicant is selected. Keep the overflow and underfilled warnings, but remove the ±5-point calculation, destructive alert state, and “Ratio out of range” button.

// only surface the preview while it still matches the current filters
const activePreview = preview?.signature === filterSignature ? preview : null;
const plan = activePreview?.plan;
const canAccept = !!plan && plan.ids.length > 0 && !plan.exceedsRatioLimit;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can remove the exceedsRatioLimit from here

</Confirm>
) : (
<Button type="button" variant="secondary" className="flex-grow" disabled>
{plan.exceedsRatioLimit ? "Ratio out of range" : "Nothing to accept"}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can remove the ratio out of range warning. This confirm section is so goated thank you for adding this

@dymackenzie
dymackenzie merged commit 647c6ec into dev Jul 31, 2026
5 of 6 checks passed
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.

3 participants