Improve variation and variation idea views and promotion flow#1334
Open
Improve variation and variation idea views and promotion flow#1334
Conversation
985f8c8 to
d965b90
Compare
- Add windows_type_id column to workshop_variations table - Remove delegate :windows_type from WorkshopVariation (uses own column now) - Add windows type dropdown to variation form next to name field - Permit windows_type_id in workshop_variations controller - Move windows type to same row as name in variation idea form - Hide workshop dropdown unless params[:admin]=true on both forms - Show variation/idea name and parent workshop on edit page headings - Copy windows_type_id and organization_id when promoting idea to variation Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…onal Ensures admin users with ?admin=true can change the workshop even when @Workshop is set, rather than always hiding the dropdown. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The workshop_id dropdown now shows on new records so users can select a workshop. On edit, it remains hidden unless ?admin=true. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Reorders the form so workshop and organization appear first, followed by name and windows type below. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Lets both workshop and windows type labels use the same simple_form default styling. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Workshop dropdown is already above the name row. Adds the windows type dropdown next to the name field, matching the variation idea form layout. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Adds py-2 to windows type select inputs on both variation and variation idea forms. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Uses the same tailwind classes as the simple_form text input wrapper (rounded-lg, px-3 py-2, shadow-sm) on both windows type selects. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Fix controller bug where `&&` short-circuit set instance vars to `false` instead of `nil` - Add purple "Promoted from/to" banners on variation and idea show/edit/form pages - Add admin-only variation idea dropdown with searchable select on variation form - Default windows_type to Combined and author_credit_preference to full_name on form - Show windows type in variation title on show/index pages with Combined fallback - Consistent "Workshop:" button styling across all variation/idea pages - Variation index: name column first with linked title, workshop as grey text link - Show [UNPUBLISHED] badge and 80-char description with 500-char hover on index - Gate promote banners by policy: "Promoted to" visible if published, "Not promoted" admin-only - Seed most variations as published and link some to variation ideas Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Update factory to include required windows_type and author_credit_preference - Add model spec validation tests for all required fields - Add association tests for windows_type, created_by, workshop_variation_idea - Add request spec tests for show page promoted-from banner visibility - Add request spec test for edit page rendering without false instance vars - Fix promotion test params to include new required fields Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Unify both indexes with matching columns: image thumbnail, name (with workshop subtitle), description icon, author link, lineage cross-links (From idea / Promoted to), updated date. Add unpublished badge chip with eye-slash icon matching title_with_badges style. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1867867 to
f00f916
Compare
- Update page_bg_class_alignment_spec to expect "admin-or-auth" for ideas index after changing from "admin-only bg-blue-100" - Fix show view spec to use author_credit instead of user.name - Fix unpublished indicator check to match title_with_badges output Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…nsity Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
maebeale
commented
Mar 4, 2026
| workshop_variation: | ||
| rhino_body: "Details" | ||
| workshop_variation_idea: | ||
| rhino_body: "Details" |
Collaborator
Author
There was a problem hiding this comment.
the error was saying "Rhino body can't be blank" and people won't understand what that means. Went with "Details" so we know it's not referring to a field in the db.
maebeale
commented
Mar 4, 2026
| rhino_body: var_data[:rhino_body], | ||
| position: var_data[:position] | ||
| position: var_data[:position], | ||
| published: i != variations.length - 1 |
Collaborator
Author
There was a problem hiding this comment.
removed position (label was Ordering) from the UI in this pr, but still setting seeded variations w a position.
we may want to add in a way for admins to organize the variations on Workshop Show later, but we can wait until that bubbles up from the user.
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 is the goal of this PR and why is this important?
windows_typeto their parent workshop — this adds awindows_type_idcolumn so variations can have their own typewindows_type_idandorganization_idin the attribute copyHow did you approach the change?
Model & migration:
windows_type_idtoworkshop_variationstable with foreign keydelegate :windows_type, to: :workshop— variations now have their own windows typename,rhino_body,windows_type_id,author_credit_preferenceForms & edit pages:
params[:admin]=true; otherwise passesworkshop_idas hidden fieldset_form_variablesbug where&&short-circuit returnedfalseinstead ofnilPromote banners (purple):
Index page redesign (both variations and ideas):
title_with_badgesstyleSeeds & tests:
UI Testing Checklist
ai/db-migrate?admin=trueon both formsAnything else to add?
remote_search_labelmethod used in edit page headings and form dropdowns🤖 Generated with Claude Code