max-programming / easypastes

Use Easy Pastes to create, store, share code snippets by simply pasting them with syntax highlight.
https://easypastes.tk
MIT License
39 stars 9 forks source link

Codebase refactor. #25

Closed janaSunrise closed 8 months ago

janaSunrise commented 2 years ago

This PR is aimed towards cleaning up the whole codebase. Following changes are to be done:

vercel[bot] commented 2 years ago

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/max-programming/easypastes/9zjti4xCPuCjP9WWQqh1B7GHhvSb
✅ Preview: https://easypastes-git-chore-refactor-max-programming.vercel.app

[Deployment for d8107cd failed]

max-programming commented 2 years ago

image

@janaSunrise this is the error

janaSunrise commented 2 years ago

Thank you, I'll push a fix for that.

Also, is it possible for this page refactor (and are you good with it?

Maybe implement a landing page, and split the pages further.

This would enable to have a beautiful initial page for people to view, and they can use paste (without authentication, or with it, as the features support both). A public pastes page would be great, alongside the other features we have planned, and it could make searching for useful snippets easier (as we implement full-text search, tags for pastes and the feed for sharing your pastes next too.)

max-programming commented 2 years ago

Thank you, I'll push a fix for that.

Also, is it possible for this page refactor (and are you good with it?

Maybe implement a landing page, and split the pages further.

  • / will hold the landing page
  • /paste will have the paste editor (with public pastes, as we still do)
  • /public-pastes with all the public pastes (maybe infinite scrolling for optimizations?)

This would enable to have a beautiful initial page for people to view, and they can use paste (without authentication, or with it, as the features support both). A public pastes page would be great, alongside the other features we have planned, and it could make searching for useful snippets easier (as we implement full-text search, tags for pastes and the feed for sharing your pastes next too.)

Yes! We can do that, for the landing page I think it's better to add the public pastes directly. Because every time a user visits the landing page they might not want to see the page. If an un-authenticated user views /, they might see a landing page and if they are authenticated they will see the public pastes. How is that idea?

janaSunrise commented 2 years ago

Thank you, I'll push a fix for that. Also, is it possible for this page refactor (and are you good with it? Maybe implement a landing page, and split the pages further.

  • / will hold the landing page
  • /paste will have the paste editor (with public pastes, as we still do)
  • /public-pastes with all the public pastes (maybe infinite scrolling for optimizations?)

This would enable to have a beautiful initial page for people to view, and they can use paste (without authentication, or with it, as the features support both). A public pastes page would be great, alongside the other features we have planned, and it could make searching for useful snippets easier (as we implement full-text search, tags for pastes and the feed for sharing your pastes next too.)

Yes! We can do that, for the landing page I think it's better to add the public pastes directly. Because every time a user visits the landing page they might not want to see the page. If an un-authenticated user views /, they might see a landing page and if they are authenticated they will see the public pastes. How is that idea?

Yeah, that seems great! But, maybe would be better to keep / and /public-pastes separate? We can instead do this, / for landing page if unauthenticated, else a dashboard?

max-programming commented 2 years ago

Yeah, that seems great! But, maybe would be better to keep / and /public-pastes separate? We can instead do this, / for landing page if unauthenticated, else a dashboard?

That's a better idea. If the user is not authenticated then they will stay on / else they will be redirected. We can use getServerSideProps and Clerk SSR for that

janaSunrise commented 2 years ago

Yes! Sounds perfect :)

vercel[bot] commented 2 years ago

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

Name Status Preview Updated
easypastes ❌ Failed (Inspect) Jun 7, 2022 at 4:38PM (UTC)