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

fix: improve pins vs uploads experience on account page #2117 #1947 #2147

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

alexandrastoica
Copy link
Contributor

@alexandrastoica alexandrastoica commented Dec 5, 2022

Please also see #1947 for reference.

This PR:

  • avoids fetching pin requests when the user does not have PSA access enabled (see Improve the handling of the PSA authorisation error in the FE #2117)
  • displays pinning table in the user account page if the user has PSA access, even though there's 0 pins currently, so that the user is aware they can access the pinning service
  • fixes bug where the table tab is selected based on the param ?table=pinned: the previous implementation was not waiting until the pin request was done, hence removing the param and not selecting the table. This PR fixes it by checking if the user has PSA access enabled and setting the tab accordingly.

Note: Will handle "I want to be able to see all my pins and their state" from #1947 separately

User stories:

  • User does not have PSA access -> only sees uploads table, no tabs, pins are not fetched, ?table=pinned is cleared up and does not do anything otherwise
  • User has PSA access but no pins -> sees both tabs with UPLOADED VIA PINNING API (0) and the empty table with the message You don't have any files pinned yet.
  • User has PSA access and has pins -> sees pinning table as usual
  • ?table=pinned selects the pins table tab unless the user does not have access

@github-actions
Copy link
Contributor

github-actions bot commented Dec 5, 2022

Copy link
Contributor

@adamalton adamalton left a comment

Choose a reason for hiding this comment

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

This looks great. I've tested it locally and it meets all the user story requirements.

@alexandrastoica alexandrastoica requested review from alanshaw and removed request for flea89, joshJarr and francois-potato December 7, 2022 09:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants