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

user page + permalink tweet page #66

Merged
merged 9 commits into from
Sep 13, 2024
Merged

user page + permalink tweet page #66

merged 9 commits into from
Sep 13, 2024

Conversation

OmarShehata
Copy link
Collaborator

Setting up an initial user page. Accessible at /user/exgenesis. Currently shows the top 20 tweets (sorted by retweet count & like count).

  • also added a permalink tweet page
  • Added a TweetRefactor component, which just moves the logic of extracting everything from the tweet object to inside the component, so that it's easy to re-use it without copy/pasting this logic
    • TODO: replace everywhere else that is using the old component with this new one
  • Added new favicon

chrome_A5t27AawFb

TODO:

  • what else do we want to show on the user page? Would be cool to see a list of "top mentions" (not 100% sure if this data is currently easy to pull)

Copy link

vercel bot commented Sep 10, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
community-archive ✅ Ready (Inspect) Visit Preview 💬 Add feedback Sep 12, 2024 4:31pm

@TheExGenesis
Copy link
Owner

I'd like a Search component that is filtered to my tweets

I'd also love a github-style activity overview

@OmarShehata OmarShehata marked this pull request as ready for review September 11, 2024 16:04
@TheExGenesis
Copy link
Owner

TheExGenesis commented Sep 12, 2024

deployment is failing, remember to pull from main and run pnpm build to check if everything is ok

[06:28:36.271] Running build in Washington, D.C., USA (East) – iad1
[06:28:36.473] Cloning github.com/TheExGenesis/community-archive (Branch: user-page, Commit: 4d7cb41)
[06:28:37.726] Cloning completed: 1.250s
[06:28:50.086] Restored build cache from previous deployment (QPZQ3a6k2GVWmoJTYLERdxnVsujL)
[06:28:50.174] Running "vercel build"
[06:28:50.900] Vercel CLI 37.4.1
[06:28:51.389] Detected `pnpm-lock.yaml` version 9 generated by [email protected]
[06:28:51.407] Installing dependencies...
[06:28:52.021] Lockfile is up to date, resolution step is skipped
[06:28:52.369] Progress: resolved 1, reused 0, downloaded 0, added 0
[06:28:52.494] Packages: +122 -355
[06:28:52.495] ++++++++++++++++++++------------------------------------------------------------
[06:28:53.379] Progress: resolved 122, reused 0, downloaded 42, added 32
[06:28:54.381] Progress: resolved 122, reused 0, downloaded 51, added 42
[06:28:55.433] Progress: resolved 122, reused 0, downloaded 56, added 42
[06:28:56.433] Progress: resolved 122, reused 0, downloaded 57, added 42
[06:28:57.433] Progress: resolved 122, reused 0, downloaded 58, added 46
[06:28:58.435] Progress: resolved 122, reused 0, downloaded 67, added 51
[06:28:59.436] Progress: resolved 122, reused 0, downloaded 74, added 58
[06:29:00.437] Progress: resolved 122, reused 0, downloaded 93, added 78
[06:29:01.438] Progress: resolved 122, reused 0, downloaded 118, added 105
[06:29:02.170] Progress: resolved 122, reused 0, downloaded 122, added 122, done
[06:29:02.671] .../node_modules/@swc/core postinstall$ node postinstall.js
[06:29:02.892]  WARN  Failed to create bin at /vercel/path0/node_modules/.pnpm/[email protected]/node_modules/supabase/node_modules/.bin/supabase. ENOENT: no such file or directory, open '/vercel/path0/node_modules/.pnpm/[email protected]/node_modules/supabase/bin/supabase'
[06:29:02.895] .../node_modules/supabase postinstall$ node scripts/postinstall.js
[06:29:02.997] .../node_modules/msw postinstall$ node -e "try{require('./config/scripts/postinstall')}catch(e){}"
[06:29:03.225] .../node_modules/supabase postinstall: Downloading https://github.com/supabase/cli/releases/download/v1.192.5/supabase_linux_amd64.tar.gz
[06:29:03.375] .../node_modules/supabase postinstall: Downloading https://github.com/supabase/cli/releases/download/v1.192.5/supabase_1.192.5_checksums.txt
[06:29:03.452] .../node_modules/@swc/core postinstall: Done
[06:29:03.633] .../node_modules/msw postinstall: Done
[06:29:03.951] .../node_modules/supabase postinstall: Checksum verified.
[06:29:03.955] .../node_modules/supabase postinstall: Installed Supabase CLI successfully
[06:29:03.966] .../node_modules/supabase postinstall: Done
[06:29:04.565] 
[06:29:04.569] dependencies:
[06:29:04.570] - @next/bundle-analyzer 14.0.4
[06:29:04.570] + @next/bundle-analyzer 14.2.9
[06:29:04.570] - @radix-ui/react-dropdown-menu 2.0.6
[06:29:04.570] + @radix-ui/react-dropdown-menu 2.1.1
[06:29:04.570] - @radix-ui/react-slot 1.0.2
[06:29:04.570] + @radix-ui/react-slot 1.1.0
[06:29:04.570] - @scalar/nextjs-api-reference 0.4.80
[06:29:04.570] + @scalar/nextjs-api-reference 0.4.85
[06:29:04.570] - @supabase/postgrest-js 1.15.8
[06:29:04.570] + @supabase/postgrest-js 1.16.1
[06:29:04.570] - @supabase/supabase-js 2.39.3
[06:29:04.570] + @supabase/supabase-js 2.45.4
[06:29:04.570] - @tanstack/react-query 5.17.15
[06:29:04.570] + @tanstack/react-query 5.55.4
[06:29:04.570] - @tanstack/react-query-devtools 5.17.15
[06:29:04.570] + @tanstack/react-query-devtools 5.55.4
[06:29:04.570] - @vercel/analytics 1.1.1
[06:29:04.570] + @vercel/analytics 1.3.1
[06:29:04.570] - @zip.js/zip.js 2.7.50
[06:29:04.570] + @zip.js/zip.js 2.7.52
[06:29:04.570] - axios 1.6.5
[06:29:04.570] + axios 1.7.7
[06:29:04.570] - clsx 2.1.0
[06:29:04.570] + clsx 2.1.1
[06:29:04.570] - geist 1.2.0
[06:29:04.570] + geist 1.3.1
[06:29:04.570] - next 14.1.0
[06:29:04.570] + next 14.2.9
[06:29:04.570] - nextjs-toploader 1.6.4
[06:29:04.570] + nextjs-toploader 1.6.12
[06:29:04.570] - react-icons 5.2.1
[06:29:04.570] + react-icons 5.3.0
[06:29:04.570] - supabase 1.187.10
[06:29:04.570] + supabase 1.192.5
[06:29:04.571] - tailwind-merge 2.2.0
[06:29:04.571] + tailwind-merge 2.5.2
[06:29:04.571] - undici 5.28.2
[06:29:04.571] + undici 5.28.4
[06:29:04.571] 
[06:29:04.571] devDependencies:
[06:29:04.571] - @swc/core 1.3.102
[06:29:04.571] + @swc/core 1.7.26
[06:29:04.571] - @swc/jest 0.2.29
[06:29:04.571] + @swc/jest 0.2.36
[06:29:04.571] - @testing-library/dom 9.3.3
[06:29:04.571] + @testing-library/dom 9.3.4
[06:29:04.571] - @testing-library/jest-dom 6.2.0
[06:29:04.571] + @testing-library/jest-dom 6.5.0
[06:29:04.571] - @testing-library/react 14.1.2
[06:29:04.571] + @testing-library/react 14.3.1
[06:29:04.571] - @types/jest 29.5.11
[06:29:04.571] + @types/jest 29.5.12
[06:29:04.571] - lint-staged 15.2.0
[06:29:04.571] + lint-staged 15.2.10
[06:29:04.571] - msw 2.1.1
[06:29:04.571] + msw 2.4.5
[06:29:04.571] - prettier 3.1.1
[06:29:04.571] + prettier 3.3.3
[06:29:04.571] - prettier-plugin-tailwindcss 0.5.10
[06:29:04.571] + prettier-plugin-tailwindcss 0.5.14
[06:29:04.571] 
[06:29:04.918] 
[06:29:04.919] > [email protected] prepare /vercel/path0
[06:29:04.919] > husky install
[06:29:04.919] 
[06:29:04.979] husky - Git hooks installed
[06:29:04.985] Done in 13.5s
[06:29:05.019] Detected Next.js version: 14.2.9
[06:29:05.031] Running "pnpm run build"
[06:29:05.499] 
[06:29:05.499] > [email protected] build /vercel/path0
[06:29:05.499] > set NODE_ENV=production & next build
[06:29:05.500] 
[06:29:06.951]   ▲ Next.js 14.2.9
[06:29:06.952] 
[06:29:07.023]    Creating an optimized production build ...
[06:29:37.336]  ✓ Compiled successfully
[06:29:37.337]    Linting and checking validity of types ...
[06:29:42.432] 
[06:29:42.432] ./src/components/AvatarList.tsx
[06:29:42.432] 39:17  Warning: Using `<img>` could result in slower LCP and higher bandwidth. Consider using `<Image />` from `next/image` to automatically optimize images. This may incur additional usage or cost from your provider. See: https://nextjs.org/docs/messages/no-img-element  @next/next/no-img-element
[06:29:42.432] 
[06:29:42.432] ./src/components/Tweet.tsx
[06:29:42.432] 30:9  Warning: Using `<img>` could result in slower LCP and higher bandwidth. Consider using `<Image />` from `next/image` to automatically optimize images. This may incur additional usage or cost from your provider. See: https://nextjs.org/docs/messages/no-img-element  @next/next/no-img-element
[06:29:42.432] 
[06:29:42.432] ./src/components/TweetRefactor.tsx
[06:29:42.432] 36:9  Warning: Using `<img>` could result in slower LCP and higher bandwidth. Consider using `<Image />` from `next/image` to automatically optimize images. This may incur additional usage or cost from your provider. See: https://nextjs.org/docs/messages/no-img-element  @next/next/no-img-element
[06:29:42.432] 
[06:29:42.432] info  - Need to disable some ESLint rules? Learn more here: https://nextjs.org/docs/basic-features/eslint#disabling-rules
[06:29:45.980] Failed to compile.
[06:29:45.981] 
[06:29:45.981] ./src/test/test-utils.tsx:17:19
[06:29:45.981] Type error: No overload matches this call.
[06:29:45.981]   Overload 1 of 2, '(ui: ReactNode, options: RenderOptions<typeof import("/vercel/path0/node_modules/.pnpm/@[email protected]/node_modules/@testing-library/dom/types/queries"), HTMLElement, HTMLElement>): RenderResult<...>', gave the following error.
[06:29:45.981]     Type '({ children }: { children: ReactElement; }) => JSX.Element' is not assignable to type 'JSXElementConstructor<{ children: ReactNode; }> | undefined'.
[06:29:45.982]       Type '({ children }: { children: ReactElement; }) => JSX.Element' is not assignable to type '(props: { children: ReactNode; }, deprecatedLegacyContext?: any) => ReactNode'.
[06:29:45.983]         Types of parameters '__0' and 'props' are incompatible.
[06:29:45.983]           Type '{ children: ReactNode; }' is not assignable to type '{ children: ReactElement<any, string | JSXElementConstructor<any>>; }'.
[06:29:45.983]             Types of property 'children' are incompatible.
[06:29:45.983]               Type 'ReactNode' is not assignable to type 'ReactElement<any, string | JSXElementConstructor<any>>'.
[06:29:45.983]                 Type 'undefined' is not assignable to type 'ReactElement<any, string | JSXElementConstructor<any>>'.
[06:29:45.983]   Overload 2 of 2, '(ui: ReactNode, options?: Omit<RenderOptions<typeof import("/vercel/path0/node_modules/.pnpm/@[email protected]/node_modules/@testing-library/dom/types/queries"), HTMLElement, HTMLElement>, "queries"> | undefined): RenderResult<...>', gave the following error.
[06:29:45.983]     Type '({ children }: { children: ReactElement; }) => JSX.Element' is not assignable to type 'JSXElementConstructor<{ children: ReactNode; }> | undefined'.
[06:29:45.983] 
[06:29:45.983] �[0m �[90m 15 |�[39m   ui�[33m:�[39m �[33mReactElement�[39m�[33m,�[39m�[0m
[06:29:45.983] �[0m �[90m 16 |�[39m   options�[33m?�[39m�[33m:�[39m �[33mOmit�[39m�[33m<�[39m�[33mRenderOptions�[39m�[33m,�[39m �[32m'wrapper'�[39m�[33m>�[39m�[33m,�[39m�[0m
[06:29:45.983] �[0m�[31m�[1m>�[22m�[39m�[90m 17 |�[39m ) �[33m=>�[39m render(ui�[33m,�[39m { wrapper�[33m:�[39m �[33mWrapper�[39m�[33m,�[39m �[33m...�[39moptions })�[0m
[06:29:45.983] �[0m �[90m    |�[39m                   �[31m�[1m^�[22m�[39m�[0m
[06:29:45.983] �[0m �[90m 18 |�[39m�[0m
[06:29:45.983] �[0m �[90m 19 |�[39m �[36mexport�[39m �[33m*�[39m �[36mfrom�[39m �[32m'@testing-library/react'�[39m�[0m
[06:29:45.983] �[0m �[90m 20 |�[39m �[36mexport�[39m { �[36mdefault�[39m �[36mas�[39m userEvent } �[36mfrom�[39m �[32m'@testing-library/user-event'�[39m�[0m
[06:29:46.183]  ELIFECYCLE  Command failed with exit code 1.
[06:29:46.202] Error: Command "pnpm run build" exited with 1
[06:29:46.619] 

@DefenderOfBasic
Copy link
Collaborator

@TheExGenesis should be working now! The issue was the pnpm-lock. I reverted it to the one from main and it worked.

https://community-archive-oyteiplay-theexgenesis-projects.vercel.app/

@TheExGenesis
Copy link
Owner

@DefenderOfBasic
Copy link
Collaborator

@TheExGenesis we changed the urls to be account IDs, not usernames. Also I can't access the deployed URLs to verify this, will check locally

chrome_BhnpX9NmKh

@DefenderOfBasic
Copy link
Collaborator

@TheExGenesis confirmed it works locally, but I guess you removed the list of users uploaded from the frontpage, that was the entry point for these user pages. Can merge this and do a follow up PR to link to your own page if you're logged in/have an archive uploaded? (and make the featured accounts link to user pages also?)

@TheExGenesis
Copy link
Owner

confirmed it works!

I'd also suggest making the style for user and tweet pages a central columns like the front page but you may choose to do that later

@DefenderOfBasic
Copy link
Collaborator

central columns like the front page but you may choose to do that later

yeah that makes sense, I'm still traveling/don't wanna hold this PR off longer, please merge if you're OK with it and we can keep iterating on it/maybe more contributors with better frontend skillz than me can make this page much nicer!

(like some fun stats here about tweets over time would be super nice!)

@TheExGenesis
Copy link
Owner

I'm doing a GitHub style activity tracker for user pages!

@TheExGenesis TheExGenesis merged commit 475db5b into main Sep 13, 2024
2 of 3 checks passed
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.

3 participants