web3.storage icon indicating copy to clipboard operation
web3.storage copied to clipboard

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

Open alexandrastoica opened this issue 2 years ago • 1 comments

Please also see https://github.com/web3-storage/web3.storage/issues/1947 for reference.

This PR:

  • avoids fetching pin requests when the user does not have PSA access enabled (see https://github.com/web3-storage/web3.storage/issues/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

alexandrastoica avatar Dec 05 '22 13:12 alexandrastoica

Website preview 🔗✨

  • 🙂 https://w3s.link/ipfs/bafybeiab33gi4ttojgvlllj2wl6ncwtjh4l25tn3yjul27l4cbm6kdtdpy
  • ⛅️ https://d7e76475.web3-storage-staging.pages.dev

build log

github-actions[bot] avatar Dec 05 '22 13:12 github-actions[bot]