AutarkLabs / open-enterprise

A suite of apps that includes allocation, dot voting, issue curation, and other planning tools so organizations can collectively budget and design custom reward & bounty systems.
GNU General Public License v3.0
92 stars 54 forks source link

refactor(projects): mv Tabs & Header out of App.js #1894

Closed chadoh closed 4 years ago

chadoh commented 4 years ago

Soon, we will get rid of Issues from the Tabs bar, and when you tap on a project from Overview, you will see a ProjectDetail view. This ProjectDetail view will be very similar to the current Issues component, but will show a back button & filter bar instead of the tabs, and may have different header text.

Rather than adding more edge-case logic to App.js, I simplified it, moving this logic to the Content components. Here's what changed:

While testing this, I discovered a bug, triggered by these steps:

  1. add a project
  2. visit /issues
  3. refresh the page
  4. cached data loads initially
  5. aragonAPI replays info from the blockchain, since current data is not more than 100 blocks old and nothing is cached in its store
  6. data gets reset, so repos becomes empty
  7. we construct a nonsense GraphQL query for an empty set of repos

The fix for this required one line, so I included it here.

I recommend reading the changes with indentation changes hidden