bug fixes and more responsive modals#39
Merged
iUnstable0 merged 8 commits intohackclub:mainfrom Apr 3, 2026
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
This PR improves InertiaUI modal interactions and mobile responsiveness across several pages, and adds a more resilient YouTube metadata fetch path (Data API with oEmbed fallback).
Changes:
- Add a shared frontend helper for modal-safe mutations (JSON/204-based) and wire it into project create/update/delete flows.
- Improve modal/mobile layouts by introducing optional “show border on mobile” rendering in
Frame/BookLayoutand updating multiple pages to use scroll-friendly flex layouts. - Update YouTube fetching to use a configurable API key with an oEmbed fallback and better error reporting.
Reviewed changes
Copilot reviewed 14 out of 16 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| package-lock.json | Lockfile updates from dependency/tooling changes. |
| app/services/you_tube_service.rb | Adds API key helper, split fetchers (Data API + oEmbed), timeouts, and improved error contexts. |
| app/frontend/types/inertia-modal.d.ts | Expands module typings (notably useModal and a richer modal context). |
| app/frontend/pages/projects/show.tsx | Uses useModal, adds modal-aware back/reload/delete behavior and modal events. |
| app/frontend/pages/projects/onboarding/index.tsx | Updates modal framing to support borders on mobile. |
| app/frontend/pages/projects/index.tsx | Adds modal-aware reload hooks and list layout improvements for responsiveness. |
| app/frontend/pages/projects/form.tsx | Reworks form submission to support modal JSON/204 flows via performModalMutation. |
| app/frontend/pages/path/index.tsx | Reloads path progress after project deletion from the projects modal. |
| app/frontend/pages/mails/show.tsx | Restructures layout for better mobile scrolling and adds mobile border option. |
| app/frontend/pages/mails/index.tsx | Restructures layout for better mobile scrolling and adds mobile border option. |
| app/frontend/pages/journal_entries/new.tsx | Uses useModal for back behavior and updates modal layout/border + overlay styling. |
| app/frontend/pages/collaboration_invites/show.tsx | Improves modal/mobile layout structure and enables mobile border framing. |
| app/frontend/lib/modalMutation.ts | New helper to execute Axios mutations for modals with proper headers and validation handling. |
| app/frontend/components/shared/Frame.tsx | Adds showBorderOnMobile option and changes inner layout to flex-based container. |
| app/frontend/components/shared/BookLayout.tsx | Adds showBorderOnMobile option and mobile padding/border rendering. |
| app/controllers/projects_controller.rb | Adds modal-aware responses (204/JSON 422) for create/update/destroy and adjusts redirects. |
Contributor
|
lgtm |
# Conflicts: # app/frontend/pages/projects/onboarding/index.tsx
9863288 to
a1ed328
Compare
Collaborator
Author
|
fixed merge conflict. can this be merged? |
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.
better modals handling, more responsive pages and fixed youtube api