Skip to content

feat(certification): add verdict preview confirmation modal#552

Merged
dhamariT merged 5 commits into
hackclub:mainfrom
ObayM:feat/add-verdict-previews
Jun 23, 2026
Lines changed: 109 additions & 2 deletionsions
Merged

feat(certification): add verdict preview confirmation modal#552
dhamariT merged 5 commits into
hackclub:mainfrom
ObayM:feat/add-verdict-previews

Conversation

@ObayM

@ObayM ObayM commented Jun 15, 2026

Copy link
Copy Markdown
Contributor

what's this do?

Adds a verdict preview modal for ship reviews, so shipwrights can confirm their decisions (approve/return)

show it works

image

ai?

Claude

ObayM added ed 2 commits June 15, 2026 19:42
}
}

.verdict-preview {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

ngl this whole thing is reinventing stuff we already have. we got shared/_modal partial + the modal stimulus controller and it already does the dialog, backdrop click to close, esc, body scroll lock, all of it. ur new verdict_preview_controller.js is rewriting all that from scratch, and these ~175 lines of new css are basically redoing the .modal styles.

can u rip this out and reuse render "shared/modal" with the modal controller instead. stop writing new css for this, lean on the existing .modal class + the brand tokens for the verdict colors. should cut this PR down a ton. the only custom bit u actually need is the approve/reject preview content, not a whole new modal system

Drop the bespoke modal: reuse the shared .modal shell + modal controller
(backdrop, esc, scroll-lock), .status-pill for the verdict badge, and
.action-btn for the buttons. The verdict-preview controller now only builds
the preview and re-submits on confirm.

Removes ~163 lines of duplicate SCSS and ~60 lines of JS.f JS.
@dhamariT

Copy link
Copy Markdown
Collaborator

pushed a refactor to ur branch (6af38ac) doing what i said above. ripped out the custom modal + the ~175 lines of scss. now it reuses the shared .modal shell + the modal controller (backdrop, esc, scroll lock all free), .status-pill for the verdict badge, and .action-btn for the buttons. the verdict-preview controller is down to just intercept submit, build the preview, resubmit on confirm.

net like +52 / -276. rubocop + erb lint clean, js builds. give it a click to make sure the approve/reject preview still looks right on ur end and lmk

@ObayM

ObayM commented Jun 18, 2026

Copy link
Copy Markdown
Contributor Author

Everything looks great on my end
image

I actually considered this approach at first, but I wasn't completely happy with how it looked. yeah, it does use less CSS, which is a nice thing. I think we can go with this for now and continue refining the styling (for the dash as a whole) in a separate PR if needed.

@ObayM ObayM requested a review from rom dhamariT June 18, 2026 06:50
@dhamariT dhamariT added this pull request to the he merge queue Jun 23, 2026
Merged via the queue into hackclub:main with commit t 715fb59 Jun 23, 2026
9 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.

None yet

2 participants