BuidlGuidl / hackathon-starter-kit

https://extensions-hackathon.vercel.app
MIT License
6 stars 1 forks source link

Add My Submissions page #83

Closed damianmarti closed 1 month ago

damianmarti commented 1 month ago

Added My Submissions item to the header (only shown when the user connects the wallet).

No submissions:

localhost_3000_my-submissions (1)

With submissions:

localhost_3000_my-submissions

closes #77

vercel[bot] commented 1 month ago

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

Name Status Preview Comments Updated (UTC)
extensions-hackathon ✅ Ready (Inspect) Visit Preview 💬 Add feedback Sep 17, 2024 10:50pm
damianmarti commented 1 month ago

Thanks for tackling it so fast @damianmarti !! I've pushed some small tweaks to:

  • Add some padding for small devices, tried to set same paddings as /submissions
  • "My Submissions" was jumping to 2 lines in some screen sizes + hamburger

I was having problems when trying to access /my-submissions in a new tab, or reloading /my-submissions when it was already loaded. It was redirecting me to homepage.

Tried to add a quick fix, but started fixing some other small issues I found (double notification when no connected account, flickering before showing your submissions, flickering when disconnecting after loading the submissions) so I probably ended up pushing some really dumb code.

So I'd love if you could review 46913d9 (feel free to undo and fix it properly if it's too messy)

Thanks @Pabl0cks !!

I took a different approach (I think it's simpler) showing a connect button instead of redirecting the user to the home.

Please, take a look at https://github.com/BuidlGuidl/extensions-hackathon/pull/83/commits/dd1041ce77a7a7ed5e7f0b69ed671758d1c5a844 and let me know what you think.

Pabl0cks commented 1 month ago

I took a different approach (I think it's simpler) showing a connect button instead of redirecting the user to the home.

I think this approach makes much more sense! 🙌 Even the /my-submissions header link could be always shown with this approach.

Did some testing, found some issues, mostly flickerings:

Suggestion: Maybe we could check if the submissions are open to show the "Submit an Extension" button normally, or show "Submissions closed" and disabled otherwise, like we do in /submit

damianmarti commented 1 month ago

I took a different approach (I think it's simpler) showing a connect button instead of redirecting the user to the home.

I think this approach makes much more sense! 🙌 Even the /my-submissions header link could be always shown with this approach.

Did some testing, found some issues, mostly flickerings:

  • When I go to /my-submissions manually, I get infinite loading (not normal use case but if it's easy I'd handle it, specially if we decide to show /my-submissions when disconnected)
  • When I connect with a wallet with submissions, I go to /my-submissions and it shows the "No submissions msg"+ submit button for a couple of seconds on the first access. If I reload, I get the "Connect" button for a second, then "No submissions" for another second, then the submissions load normally.
  • When I disconnect having the /my-submissions opened, I get some flickering with the Loading... and "Connect Wallet msg + button"

Suggestion: Maybe we could check if the submissions are open to show the "Submit an Extension" button normally, or show "Submissions closed" and disabled otherwise, like we do in /submit

@Pabl0cks thanks for the testing!

I added the submissionsEnabled check and I refactored to use useQuery.

It works much better now!

Pabl0cks commented 1 month ago

I added the submissionsEnabled check and I refactored to use useQuery.

It works much better now!

TYSM Damu! useQuery is handling the flickering muuch better ♥.

The only use case that has some flickering is disconnect while you are in /my-submissions, either with a user with submissions or without submissions.

If it's a PITA to fix, we could merge and document the flickering in issues. Not like it's going to be a very common use case (maybe some user that connected with the wrong address?)

damianmarti commented 1 month ago

I added the submissionsEnabled check and I refactored to use useQuery. It works much better now!

TYSM Damu! useQuery is handling the flickering muuch better ♥.

The only use case that has some flickering is disconnect while you are in /my-submissions, either with a user with submissions or without submissions.

If it's a PITA to fix, we could merge and document the flickering in issues. Not like it's going to be a very common use case (maybe some user that connected with the wrong address?)

Thanks!!

Yeah, there are some flickering issues when disconnecting, but I checked, and it's not so easy to fix. I think this can be left as a known bug for now.

Pabl0cks commented 1 month ago

Yeah, there are some flickering issues when disconnecting, but I checked, and it's not so easy to fix. I think this can be left as a known bug for now.

Ok! Merging