Improve mobile responsiveness across the site#106
Conversation
…image overlay functionality with upload and opacity controls
…t, CacheManagement, StaffManagement): improve text clarity and responsiveness
…ing and interaction handling
…ross various components - Added contribution policy fetching and handling in ContributeDetails, ContributeMap, ContributeTest, XMLGenerator, and DivisionManagement components. - Introduced UI elements to display contribution status and disable contributions when necessary. - Created utility functions for fetching and managing contribution policies. - Enhanced user feedback with toast notifications for contribution status changes.
…on state - Changed navigation in ContributeNew to direct users to the contributions documentation. - Removed disabled state from the contribute button in ContributionDashboard for improved user interaction.
…ars/Website into design/responsive-overhaul
Greptile SummaryThis is a wide-ranging mobile responsiveness and UX polish PR. The core changes — responsive breakpoints across ~40 files, Toast migration in staff components, the Dropdown header/icon enhancement, and the mobile nav in Key changes:
Issues found:
Confidence Score: 4/5Mostly safe to merge; one P1 in ContributeDetails where a failing policy API silently breaks the airport page should be resolved first. The vast majority of changes are straightforward, low-risk responsive layout tweaks and Toast migrations. The single P1 (Promise.all coupling in ContributeDetails) is isolated and has a clear, simple fix. The remaining findings are P2 style/UX items that do not block functionality. src/pages/ContributeDetails.jsx — policy fetch must not break the airport data load on failure. Important Files Changed
Prompt To Fix All With AIThis is a comment left during a code review.
Path: src/pages/ContributeDetails.jsx
Line: 71-74
Comment:
**Policy API failure silently breaks the entire page**
`fetchContributionPolicy` throws on any non-`ok` response (404, 500, network error). Because it is inside `Promise.all`, a single failure from the policy endpoint causes the whole `Promise.all` to reject. The outer `catch` block only calls `console.error`, so neither the airport data nor any visible error message is shown to the user — they get a blank/loading page with no indication of what went wrong.
The policy fetch is a best-effort enhancement; the airport page should still work even if that endpoint is unavailable. Consider using `Promise.allSettled` so the airport fetch is independent:
```js
const [airportResult, policyResult] = await Promise.allSettled([
fetch(`https://v2.stopbars.com/airports?icao=${icao}`),
fetchContributionPolicy(icao),
]);
if (policyResult.status === 'fulfilled') {
setContributionPolicy(policyResult.value);
}
if (airportResult.status === 'fulfilled' && airportResult.value.ok) {
const data = await airportResult.value.json();
setAirport({ ... });
}
```
Alternatively, wrap `fetchContributionPolicy` in its own `try/catch` inside the existing block so a policy failure never propagates to the outer `catch`.
How can I resolve this? If you propose a fix, please make it concise.
---
This is a comment left during a code review.
Path: src/components/shared/Dropdown.jsx
Line: 76
Comment:
**Missing `overflow-hidden` after removing per-item rounded corners**
The original items carried `first:rounded-t-lg last:rounded-b-lg` so hover backgrounds clipped neatly to the container's `rounded-lg`. Those classes were removed (correctly, now that header `<div>`s can sit between items), but without `overflow-hidden` on the container, the `hover:bg-zinc-700` of the first/last `<button>` will visually bleed through the container's border-radius.
```suggestion
<div className="absolute z-50 w-full mt-1 bg-zinc-800 border border-zinc-700 rounded-lg shadow-lg overflow-hidden animate-in fade-in-0 zoom-in-95 duration-200">
```
How can I resolve this? If you propose a fix, please make it concise.
---
This is a comment left during a code review.
Path: src/components/staff/BanManagement.jsx
Line: 288-296
Comment:
**Reset button removed with no replacement**
The previous layout had a "Reset" button next to "Ban" that cleared all three form fields. This was dropped when the grid was tightened to `md:col-span-1`. Users must now manually clear the VATSIM CID, Reason, and Expires At fields after each ban action. Even a small icon-only button (e.g. `X`) would restore that convenience.
How can I resolve this? If you propose a fix, please make it concise.Reviews (1): Last reviewed commit: "Merge branch 'design/responsive-overhaul..." | Re-trigger Greptile |
… display for approved airports style(About): update hero banner height for improved responsiveness
…etching with Promise.allSettled for improved error handling
Summary
Wide-ranging mobile responsiveness improvements across the site, alongside standardising staff page feedback to use the Toast component and updated the Dropdown component with section headers and icon support.
Changes Made
Additional Information
Author Information
Discord Username:
VATSIM CID:
Checklist: