CouncilDataProject / cdp-frontend

Component library and web app used by CDP instances.
https://councildataproject.org/cdp-frontend
Mozilla Public License 2.0
17 stars 27 forks source link

Better Bios #151

Closed BrianL3 closed 2 years ago

BrianL3 commented 2 years ago

Biographies for People Could be Better

Biographies, as seen in the component are implemented in an unfinished state.

I think what we want to do is break down all possible Roles and have custom helper sentence constructors for each. The writeBiography function can then distinguish between roles that the Person has had in the past, is currently serving, etc, and be much more robust.

Perhaps the most important part of this feature is testing.

Use Case

Once we have a more robust writeBiography in place, every Person no matter their current or past role will have a biography generated that makes sense.

Solution

Done When:

tohuynh commented 2 years ago

However, there aren't any roles in the DB with title == COUNCILMEMBER (this is probably a backend issue).

I was wrong. There are COUNCILMEMBER roles in the DB. It was just that there was a bug in Role.ts. This code actually changes all role titles to Member.

The bug is fixed in #160 https://github.com/tohuynh/cdp-frontend/blob/fix/seat-person-image/src/models/Role.ts#L27

tohuynh commented 2 years ago

@JacksonMaxfield Should we include "This is their nth term" to specify how many terms the council member has served?

If yes, how would we calculate this information? Count the number of Councilmember roles for the person? This information could be inaccurate if the instance doesn't backfill the data. Maybe could write "this is their nth term since {datetime of when the instance was created}"?

evamaxfield commented 2 years ago

Hmmmm. I would include that information but with an asterisk or something that the user can hover over for "since datetime of furthest back event"

tohuynh commented 2 years ago

Do we need a design task for this biography section? It's a little underspecified in the design recommendations: https://docs.google.com/presentation/d/15rkic20QV6GU0_nL-8zHIgcw8-o1bCQIiYMsY2j6qFg/edit#slide=id.g8c29f09c95_0_95