JoinColony / colonyCDapp

An iteration of the Colony Dapp sporting both a fully decentralized operating mode, as well as a mode enhanced by a metadata caching layer
5 stars 14 forks source link

Feat: Colony-wide team filter persistence #3204

Closed rumzledz closed 1 month ago

rumzledz commented 1 month ago

Description

This PR enables a selected team filter to persist across Colony pages that uses the <TeamFilter /> component.

However, it will not persist the selected team filter for a Colony if you:

team filters

Testing

[!NOTE]

  1. No, we specifically do not want to persist the selected team filter in between tab sessions. If you open a new tab and you visit the Planex colony, do not expect the filtered team value to persist
  2. Yes, I also thought about persisting the selected team on a per-Colony basis i.e. Persist Team Andromeda for the Planex Colony & Team Research and Development for the Wayne Colony. It's very doable with what's done on this PR, just have to slightly tweak things around. But that's up to Product to decide if they want it or not

Soft Navigation Scenario

  1. Visit the Planex Colony

  2. Visit the Dashboard page

  3. Select team Andromeda using the Teams Filter component

  4. Verify that the URL is: http://localhost:9091/planex?team=2 and the Team Filter is component is correctly set

  5. Click the "View all" button on the Recent Activity table

    Screenshot 2024-09-30 at 17 24 05
  6. Verify that the URL is http://localhost:9091/planex/activity?team=2 and the Team Filter is component is correctly set

  7. Click Teams on the left Colony sidebar

  8. Verify that the URL is http://localhost:9091/planex/teams?team=2 and the Team Filter is component is correctly set

  9. Click Extensions on the left Colony sidebar

  10. Verify that the URL is http://localhost:9091/planex/extensions because this page does not have a Teams Filter

  11. Click Permissions on the left Colony sidebar

  12. Verify that the URL is http://localhost:9091/planex/permissions?team=2 and the Team Filter is component is correctly set

  13. Visit the account page

    Screenshot 2024-09-30 at 17 17 38
  14. Verify that URL doesn't have a team param and that the Teams Filter component doesn't have a pre-selected value

  15. Head back to the Planex Colony

  16. Verify that the URL doesn't have a team param

  17. Select team Serenity using the Teams Filter component

  18. Verify that the URL is http://localhost:9091/planex?team=3

  19. Visit the Wayne colony

    Screenshot 2024-09-30 at 17 19 37
  20. Verify that the URL doesn't have a team param

Hard Navigation Scenario

  1. Visit http://localhost:9091/planex/activity?team=2
  2. Verify that the Team Filter component is correctly set
  3. Click Teams on the left Colony sidebar
  4. Verify that the URL still has the team query param and that the Team Filters component is still correctly set

Diffs

New stuff

Resolves #3203

rumzledz commented 1 month ago

~Actually hang on @iamsamgibbs , product has updated that spec this morning actually, I forgot to update when Mel messaged me this morning. The team should be cleared on refresh too. Bear with me!~

UPDATE: After speaking to Arren, the team param should definitely persist after a reload and it should continuously persist in other pages within the Colony as long as that page has a Team Filters component