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

Implement about page #40

Merged
merged 26 commits into from
Nov 6, 2021
Merged

Implement about page #40

merged 26 commits into from
Nov 6, 2021

Conversation

DedsecKnight
Copy link
Member

@DedsecKnight DedsecKnight commented Oct 24, 2021

Changes made in this PR:

  • Basic implementation of About section based on Figma design.
  • Add more color variation to "My Answered Question" section.
  • Implement member cards for "Meet Our Team".
  • Implement "Expand all" feature of FAQ
  • Resolve issues regarding hardcoded data.
  • Add documentation for Prop types.
  • Resolve conflict with Update landing page styles #38.
  • Add generic description for Hackathon introduction.
  • Implement backend for About section.
  • Determine how data will be stored in the backend as of now, fake data is used to populate the front-end.
  • Integrate Next.js' Data-Fetching features to optimize process of fetching data from backend.
  • Implement Error Handling for form submission in /about/questions.

@vercel
Copy link

vercel bot commented Oct 24, 2021

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/acmutd/hackportal/5TLYbnAyfWaxtGBs7KTLRFFGJkzD
✅ Preview: https://hackportal-git-feature-about-section-acmutd.vercel.app

@DedsecKnight DedsecKnight linked an issue Oct 24, 2021 that may be closed by this pull request
@DedsecKnight DedsecKnight marked this pull request as draft October 24, 2021 03:33
@abdullah50053 abdullah50053 marked this pull request as ready for review October 24, 2021 03:48
@DedsecKnight DedsecKnight changed the title feat(aboutsection): Implemented UI of About Section feat(about): Implemented UI of About Section Oct 24, 2021
@abdullah50053
Copy link
Collaborator

I've reviewed the current code and everything looks good. Will come back to the PR once the "Next Steps" have been completed.

@WillieCubed WillieCubed changed the title feat(about): Implemented UI of About Section Implement about page Oct 24, 2021
@WillieCubed WillieCubed self-requested a review October 24, 2021 04:35
Copy link
Contributor

@WillieCubed WillieCubed left a comment

Choose a reason for hiding this comment

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

A valiant contribution. This PR is not close to ready for a merge because functionality - especially for the FAQ - has not been implemented. Anything merged into the develop branch needs to have working functionality, and the contributions far need to be closer to completion to warrant being merged. Additionally, there are some lingering documentation issues that need to be addressed.

pages/about/questions.tsx Outdated Show resolved Hide resolved
pages/about/index.tsx Outdated Show resolved Hide resolved
pages/about/index.tsx Outdated Show resolved Hide resolved
pages/about/index.tsx Outdated Show resolved Hide resolved
pages/about/faq.tsx Outdated Show resolved Hide resolved
components/FaqDisclosure.tsx Outdated Show resolved Hide resolved
components/PendingQuestion.tsx Outdated Show resolved Hide resolved
components/FaqDisclosure.tsx Outdated Show resolved Hide resolved
components/AnsweredQuestion.tsx Outdated Show resolved Hide resolved
components/AboutHeader.tsx Outdated Show resolved Hide resolved
@WillieCubed
Copy link
Contributor

I recommend marking this pull request as a draft until you have completed implementation of the features that this PR is supposed to address.

Moved color schemes list from utilities file to component file to make it local
to the component only
@DedsecKnight DedsecKnight marked this pull request as draft October 24, 2021 05:26
Reformat components from anonymous functions to standard named functional
component. Also renamed Props interface to use standard component properties
name
Moved hardcoded data to lib/data.ts. Setup flow such that hardcoded data can be
easily replaced with logic to fetch real data from backend
@WillieCubed
Copy link
Contributor

WillieCubed commented Oct 25, 2021

Here's the error:

11:55:15.141 Cloning github.com/acmutd/hackportal (Branch: feature/about-section, Commit: 16133b2)
11:55:15.678 Cloning completed: 536.905ms
11:55:15.701 Analyzing source code...
11:55:17.128 Installing build runtime...
11:55:20.028 Build runtime installed: 2.899s
11:55:23.136 Looking up build cache...
11:55:27.196 Build cache downloaded [62.29 MB]: 3700.307ms
11:55:28.398 Installing dependencies...
11:55:28.405 Detected package-lock.json generated by npm 7...
11:55:30.834 > hackportal@0.1.0 prepare
11:55:30.834 > husky install
11:55:30.905 husky - Git hooks installed
11:55:30.915 up to date in 2s
11:55:30.915 131 packages are looking for funding
11:55:30.915 run npm fund for details
11:55:30.925 Detected Next.js version: 11.1.0
11:55:30.934 Running "npm run build"
11:55:31.220 > hackportal@0.1.0 build
11:55:31.220 > next build
11:55:33.187 info - Using webpack 5. Reason: Enabled by default https://nextjs.org/docs/messages/webpack5
11:55:34.598 info - Checking validity of types...
11:55:44.063 ./pages/about/faq.tsx
11:55:44.064 31:6 Warning: React Hook useEffect has a missing dependency: 'getFaqs'. Either include it or remove the dependency array. react-hooks/exhaustive-deps
11:55:44.064 ./pages/about/index.tsx
11:55:44.065 37:6 Warning: React Hook useEffect has a missing dependency: 'getMembersData'. Either include it or remove the dependency array. react-hooks/exhaustive-deps
11:55:44.065 ./pages/about/questions.tsx
11:55:44.066 111:6 Warning: React Hook useEffect has a missing dependency: 'getAllQuestions'. Either include it or remove the dependency array. react-hooks/exhaustive-deps
11:55:44.066 ./pages/auth/signOut.tsx
11:55:44.067 21:6 Warning: React Hook React.useEffect has a missing dependency: 'signOut'. Either include it or remove the dependency array. react-hooks/exhaustive-deps
11:55:44.067 info - Need to disable some ESLint rules? Learn more here: https://nextjs.org/docs/basic-features/eslint#disabling-rules
11:55:44.067 info - Creating an optimized production build...
11:55:44.148 > [PWA] Compile client (static)
11:55:44.148 > [PWA] Auto register service worker with: /vercel/path0/node_modules/next-pwa/register.js
11:55:44.148 > [PWA] Service worker: /vercel/path0/public/sw.js
11:55:44.148 > [PWA] url: /sw.js
11:55:44.148 > [PWA] scope: /
11:55:44.343 > [PWA] Compile server
11:55:46.441 warn - You have enabled the JIT engine which is currently in preview.
11:55:46.441 warn - Preview features are not covered by semver, may introduce breaking changes, and can change at any time.
11:55:59.914 info - Compiled successfully
11:55:59.915 info - Collecting page data...
11:56:01.004 info - Generating static pages (0/16)
11:56:01.522 info - Generating static pages (4/16)
11:56:01.535 info - Generating static pages (8/16)
11:56:01.583 Error occurred prerendering page "/about". Read more: https://nextjs.org/docs/messages/prerender-error
11:56:01.583 FetchError: request to http://localhost:3000/api/members failed, reason: connect ECONNREFUSED 127.0.0.1:3000
11:56:01.583 at ClientRequest. (/vercel/path0/node_modules/node-fetch/lib/index.js:1461:11)
11:56:01.583 at ClientRequest.emit (events.js:400:28)
11:56:01.584 at Socket.socketErrorListener (_http_client.js:475:9)
11:56:01.584 at Socket.emit (events.js:400:28)
11:56:01.584 at emitErrorNT (internal/streams/destroy.js:106:8)
11:56:01.584 at emitErrorCloseNT (internal/streams/destroy.js:74:3)
11:56:01.584 at processTicksAndRejections (internal/process/task_queues.js:82:21)
11:56:01.591 info - Generating static pages (12/16)
11:56:01.598 Error occurred prerendering page "/about/faq". Read more: https://nextjs.org/docs/messages/prerender-error
11:56:01.598 FetchError: request to http://localhost:3000/api/questions/faq failed, reason: connect ECONNREFUSED 127.0.0.1:3000
11:56:01.598 at ClientRequest. (/vercel/path0/node_modules/node-fetch/lib/index.js:1461:11)
11:56:01.598 at ClientRequest.emit (events.js:400:28)
11:56:01.598 at Socket.socketErrorListener (_http_client.js:475:9)
11:56:01.599 at Socket.emit (events.js:400:28)
11:56:01.599 at emitErrorNT (internal/streams/destroy.js:106:8)
11:56:01.599 at emitErrorCloseNT (internal/streams/destroy.js:74:3)
11:56:01.599 at processTicksAndRejections (internal/process/task_queues.js:82:21)
11:56:02.149 info - Generating static pages (16/16)
11:56:02.149 > Build error occurred
11:56:02.151 Error: Export encountered errors on following paths:
11:56:02.151 /about
11:56:02.151 /about/faq
11:56:02.151 at /vercel/path0/node_modules/next/dist/export/index.js:474:19
11:56:02.152 at runMicrotasks ()
11:56:02.152 at processTicksAndRejections (internal/process/task_queues.js:95:5)
11:56:02.152 at async Span.traceAsyncFn (/vercel/path0/node_modules/next/dist/telemetry/trace/trace.js:60:20)
11:56:02.152 at async /vercel/path0/node_modules/next/dist/build/index.js:752:17
11:56:02.152 at async Span.traceAsyncFn (/vercel/path0/node_modules/next/dist/telemetry/trace/trace.js:60:20)
11:56:02.152 at async /vercel/path0/node_modules/next/dist/build/index.js:630:13
11:56:02.153 at async Span.traceAsyncFn (/vercel/path0/node_modules/next/dist/telemetry/trace/trace.js:60:20)
11:56:02.235 Error: Command "npm run build" exited with 1

It appears that you're explicitly making a request to https://localhost:3000 when that value should not be hardcoded. You can also reproduce this error by running npm run build locally.

Resolve error regarding attempting to make request to localhost:3000 on staging
environment
Resolves warnings came from React when using useEffect hook
When user fails to submit question, appropriate error message will be shown in a
user-friendly way.
abdullah50053
abdullah50053 previously approved these changes Oct 29, 2021
Copy link
Collaborator

@abdullah50053 abdullah50053 left a comment

Choose a reason for hiding this comment

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

Vercel-specific issues will be identified by @WillieCubed
Everything else looks good.

Copy link
Contributor

@WillieCubed WillieCubed left a comment

Choose a reason for hiding this comment

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

This is incredibly Gucci!

For a future release, I will recommend updating the answered questions in realtime by using the relevant Cloud Firestore API or telling the user that they will have to refresh to see the answered questions. However, the only major change to make is showing the expanded answered questions by default as it's not clear to the user they need to click on the answers to expand them as that's an important part of UX that will likely get overlooked by the user.

Copy link
Contributor

@WillieCubed WillieCubed left a comment

Choose a reason for hiding this comment

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

LGTM!

@WillieCubed WillieCubed merged commit ae74886 into develop Nov 6, 2021
@WillieCubed WillieCubed deleted the feature/about-section branch November 6, 2021 04:52
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.

[Feature Request] Add About section
3 participants