civictechindex / CTI-website-frontend

Join a worldwide movement to catalog 
every open source 
civic tech project.
https://civictechindex.org
MIT License
31 stars 29 forks source link

Civic Tech Organization Search - Open to lowest level when only 1 Organization shows #1230

Closed smsada closed 2 years ago

smsada commented 2 years ago

Overview

On the Civic Tech Organizations page, searches need to open to the lowest level if there is only one selection

Description

image

Intended Outcome ![image](https://user-images.githubusercontent.com/38507899/164567835-481bd4cf-cba0-4050-8809-a4b06785588a.png)

Action Items

Resources/Instructions

smsada commented 2 years ago

States to Discuss

Everything should open, except where described

  1. 1 child organization in 1 parent organization
    • Hack for LA
  2. 3 child organizations in 1 parent organization
    • Civic Tech Sweden
  3. 2 child organizations both with the same name, but with different parents
    • codeforparis.org and codeforparis.fr (Code for Paris is the display name)
  4. 3 or more parent organizations
    • 2 Grandparents and 5 or more results - don't open
    • 1 Grandparent and 4 parents, 1 or more grandchildren - don't open
    • 1 Grandparent and 3 parents and 7 or more grandchildren - don't open
    • 3+ grandparents - don't open
  5. 4 grandchild organizations, one in A, two in B, one in C
    • Code for All>Code for France>Open Heroines France
    • Code for All>Code for Canada>Open North
    • Code for All>Code for Canada>Open DataBC
    • Code for All>Code for Germany>Open Dresden
  6. 1 child with multiple parents
    • Open Knowledge Belgium (primary parent is Open Knowledge Foundation, secondary parent is Code for All)
  7. Search input refers to just parent organization
    • 1 grandparent and no grandchildren it opens
    • 2 grandparents and more than 4 results total - do not open