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

Add My Submissions page #83

Merged
merged 9 commits into from
Sep 17, 2024
Merged

Add My Submissions page #83

merged 9 commits into from
Sep 17, 2024

Conversation

damianmarti
Copy link
Member

@damianmarti damianmarti commented Sep 12, 2024

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

Copy link

vercel bot commented Sep 12, 2024

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

Copy link
Member

@Pabl0cks Pabl0cks left a comment

Choose a reason for hiding this comment

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

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)

@damianmarti
Copy link
Member Author

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 dd1041c and let me know what you think.

@Pabl0cks
Copy link
Member

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

@damianmarti
Copy link
Member Author

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
Copy link
Member

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
Copy link
Member Author

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 Pabl0cks merged commit b6517b3 into main Sep 17, 2024
3 checks passed
@Pabl0cks Pabl0cks deleted the my-submissions branch September 17, 2024 22:57
@Pabl0cks
Copy link
Member

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

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.

/my-submissions page
2 participants