Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add dtr open house 25W #93

Merged
merged 6 commits into from
Feb 10, 2025
Merged

feat: add dtr open house 25W #93

merged 6 commits into from
Feb 10, 2025

Conversation

ZL-Asica
Copy link
Member

@ZL-Asica ZL-Asica commented Feb 10, 2025

Bug Fix & Feature Update

📌 Description

This update introduces a new announcement popup system, improves API fetching issues, improves ARIA compliance, and optimizes image loading performance while addressing several bugs.

🔍 Feature Changes

  • New component or page: src/components/shared/PopupAnnouncement.tsx for the announcement popup window.
  • UI/UX improvement:
    • Enhanced RouterTransition.tsx by setting aria-hidden="true", improving screen reader behavior.
    • Mobile header menu now hides from screen readers when closed to prevent unnecessary navigation interruptions.
    • First page carousel (Slides.tsx) alt text now has the number to indicate which is the current image.
  • Other: Utilize Next.js's Image priority property. Only the first 4 people's images and 2 SIG banners are preloaded, reducing initial render blocking.

🛠 Bug Fixes

  • Fixed issue: airtable image urls expire after 2 hours #69, by implementing manual image caching in src/utils/image.ts
  • Improved error handling: Removed an unnecessary console.warn() in the "project not found" error handling.
  • Performance fix:
  • Addressed a mobile header visibility issue:
    • The header may disappear at the top of the page due to scrollY bouncing behavior.
    • Clicking "DTR" on the top left now properly closes the mobile menu.

✅ Checklist

  • Code follows project coding style.
  • Tested in a Next.js environment.
  • Relevant comments/JSDoc is updated.
  • Bug has been reproduced and verified.
  • Fix does not introduce new issues.

📜 Dependency Changes

Dependency Name Old Version New Version
@zl-asica/react 0.3.10 0.3.13
@antfu/eslint-config 4.1.1 4.2.0
@eslint-react/eslint-plugin 1.26.1 1.26.2
@tailwindcss/postcss 4.0.3 4.0.6
eslint 9.19.0 9.20.0
eslint-plugin-react-refresh 0.4.18 0.4.19
prettier 3.4.2 3.5.0
tailwindcss 4.0.3 4.0.6

💬 Additional Notes

  • TODO: Create auto-workflow for announcements. Let people could request a new announcement and auto-update it into the website without manually update.

📸 Screenshots

image

Fix issue #69

- Images will be cached locally in `public/cachecached-images` directory.
- Every time an image is requested, the server will check if the image is already cached.
- If the image is cached, the server will serve the cached image.
- If the image is not cached, the server will download the image from the Airtable url and cache it.

- Auto delete images that are not used for 7 days.
- Everytime a image is requested, the server will update the last accessed time of the image (by a touch equivilant append).
Addressing the issue #59

Now sig page will fetch all projects and people at once, instead of fetching them separately. This will reduce the number of requests made to the api.
Add a popup announcement component to display events and other important information to users.

Utilize the session storage to store the last time the user viewd the announcement (once per day), and only show the announcement if is not expired yet.
- Some dependencies patch/minor updates.
- Remove tag-pr-path workflow due to wired bug.
- Remove dependabot, do it manually.
- Fix mobile header event within height (directly use package function)
- Fix mobile header not close when click on DTR (left top)
- Add aria-hidden for RouterTransition and mobile header (when not visible)
- Remove console output from project.ts for 404.
prevent load all images before user scolled to there
Copy link

🚀 Build Successful!

🎨 Lint Check

Lint: No linting issues found!

@ZL-Asica ZL-Asica linked an issue Feb 10, 2025 that may be closed by this pull request
@ZL-Asica ZL-Asica added bug general issues with the website enhancement general tag for new features to add optimization code changes that enhance performance labels Feb 10, 2025
@ZL-Asica ZL-Asica changed the title feat/add dtr open house 25w feat: add dtr open house 25w Feb 10, 2025
@ZL-Asica ZL-Asica changed the title feat: add dtr open house 25w feat: add dtr open house 25W Feb 10, 2025
@ZL-Asica ZL-Asica marked this pull request as ready for review February 10, 2025 17:11
@ZL-Asica ZL-Asica merged commit 2a3e78f into main Feb 10, 2025
2 of 3 checks passed
@ZL-Asica ZL-Asica deleted the feat/add-dtr-open-house-25w branch February 10, 2025 17:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug general issues with the website enhancement general tag for new features to add optimization code changes that enhance performance size/M
Projects
None yet
Development

Successfully merging this pull request may close these issues.

airtable image urls expire after 2 hours
1 participant