Skip to content

feat(sidequest): Add Minequest sidequest#2180

Open
adhyys07 wants to merge 61 commits intohackclub:mainfrom
aryan6673:merge
Open

feat(sidequest): Add Minequest sidequest#2180
adhyys07 wants to merge 61 commits intohackclub:mainfrom
aryan6673:merge

Conversation

@adhyys07
Copy link
Copy Markdown
Member

This pull request introduces several new features and improvements focused on enhancing the "Minequest" sidequest experience, accessibility, and code maintainability. The most significant changes include new Stimulus controllers for Minequest-specific UI behaviors, improvements to the Sidequests controller to better handle Minequest-related logic and idea generation, and some general developer experience tweaks.

Minequest Feature Additions:

  • Added new Stimulus controllers for Minequest: minecraft_tabs_controller, sidequests/minequest/accessibility_controller, sidequests/minequest/ideas_controller, and sidequests/minequest/modal_controller to support custom tab navigation, accessibility toggling for animations, idea generation, and modal interactions on Minequest-related pages. (app/javascript/controllers/minecraft_tabs_controller.js, app/javascript/controllers/sidequests/minequest/accessibility_controller.js, and related imports/registrations) [1] [2] [3]

  • Updated app/controllers/sidequests_controller.rb to improve handling of the "minequest" slug and related titles, provide custom prize logic, render a dedicated Minequest view, and expose a new generate_ideas action that calls the Gemini API to generate Minecraft sidequest ideas. [1] [2]

Accessibility Improvements:

  • Implemented an accessibility toggle for animated images in Minequest via the new sidequests/minequest/accessibility_controller, allowing users to switch between GIF and PNG representations, with state persisted in local storage.

JavaScript Controller Refactoring:

  • Refactored app/javascript/controllers/index.js to use consistent import and registration style, and registered the new Minequest-related controllers.

Developer Experience:

  • Updated the Procfile.dev to ensure the JS build process runs persistently by changing the watch command to yarn build --watch=forever.

aryan6673 and others added 24 commits April 15, 2026 21:44
…d update UI styles for better responsiveness
@adhyys07
Copy link
Copy Markdown
Member Author

image

…nd enhance UI styles for better responsiveness
Copy link
Copy Markdown
Contributor

@anirudh12032008 anirudh12032008 left a comment

Choose a reason for hiding this comment

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

a lot of changes needed

Comment thread app/assets/images/sidequests/minequest/animated-title.gif Outdated
Comment thread app/assets/images/sidequests/minequest/bg.png Outdated
Comment thread app/assets/images/sidequests/art.png Outdated
Comment thread app/controllers/sidequests_controller.rb Outdated
Comment thread app/controllers/sidequests_controller.rb Outdated
Comment thread app/views/sidequests/show.html.erb
Comment thread db/schema.rb Outdated
Comment thread docker-compose.yml Outdated
Comment thread patch_view.diff Outdated
Comment thread Procfile.dev Outdated
@aryan6673
Copy link
Copy Markdown
Member

what i worked on

i knocked out a bunch of small but annoying ci issues that were blocking checks.

nothing super huge, but all of them were needed to make the pr clean and pass properly.

1. removed trailing spaces in show.html.erb

erb lint was complaining because of random trailing spaces at the end of lines.

just cleaned those up so the file stops failing for something dumb and passes lint normally.

2. fixed missing end in sidequests_controller.rb

there was a missing end inside the if is_minequest block.

ruby absolutely hates that, so rails could not parse the controller correctly and checks like zeitwerk:check would fail.

added the missing end and fixed it.

3. added rel="noopener" for security

there was a link using target="_blank" in show.html.erb but without rel="noopener".

that is a small security issue because the new tab can sometimes mess with the original page, and brakeman flags it.

added it so the warning is gone and the page is safer.

4. fixed prettier formatting issues

prettier was failing on these files:

  • index.js
  • minecraft_tabs_controller.js
  • accessibility_controller.js
  • ideas_controller.js
  • modal_controller.js
  • ui.css

just formatted them properly and reran prettier after that.

all checks passed and ci stopped being dramatic.

5. fixed stimulus manifest issues in index.js

this one was mostly cleanup but it was breaking lint.

  • removed duplicate RadioOptionController
  • removed duplicate WelcomeOverlayController
  • added the missing TutorialVideoModalController for tutorial-video-modal
  • kept registrations in proper alphabetical order so the manifest stays clean

the html was already using data-controller="tutorial-video-modal" but the controller was not registered, so it was basically missing in action.

fixing this resolved the lint-stimulus-manifest failure and made controller loading normal again.

muhehehehehe

most of these were small fixes, but they were the kind of stuff that blocks ci for no reason and wastes time.

@hackclub hackclub deleted a comment from anirudh12032008 Apr 23, 2026
@hackclub hackclub deleted a comment from anirudh12032008 Apr 23, 2026
@hackclub hackclub deleted a comment from anirudh12032008 Apr 23, 2026
@hackclub hackclub deleted a comment from anirudh12032008 Apr 23, 2026
@sidequest = Sidequest.find_by!(slug: params[:id])
requested_slug = params[:id].to_s
@sidequest = Sidequest.find_by(slug: requested_slug)
minequest_alias_slugs = [ "minequest", "minequests", "minecraft-art" ]
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.

I still don't understand why do we need minequest_alias_slugs?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

we need this trust me

Comment thread db/migrate/20260415231444_add_minecraft_art_sidequest.rb Outdated
Comment thread db/migrate/20260422183848_add_minequest_sidequest.rb Outdated
Copy link
Copy Markdown
Contributor

@anirudh12032008 anirudh12032008 left a comment

Choose a reason for hiding this comment

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

Everything looks good now

Copy link
Copy Markdown
Member

@NeonGamerBot-QK NeonGamerBot-QK left a comment

Choose a reason for hiding this comment

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

checks failing

Comment thread db/schema.rb
add_foreign_key "votes", "projects"
add_foreign_key "votes", "users"
end
end No newline at end of file
Copy link
Copy Markdown
Contributor

@penguinencounter penguinencounter Apr 24, 2026

Choose a reason for hiding this comment

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

this needs an EOF newline to pass. not sure where it went.

also not sure if this suggestion will work. might be easier to just put the newline in there yourself. (or run bin/rails db:migrate, which will do it for you, despite saying Model files unchanged.)

Suggested change
end
end

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.

6 participants