Wednesday, June 2, 2021

Request For Comment At 99

One of the tasks this week for Junior Engineers Program was to look at RFCs (Request For Comment) that have been initiated in 99 repositories. The brief was specifically to discuss:

an RFC that you thought was good in a codebase owned by your team

The RFC I've chosen to look at is regarding 99d's UI Library and I'm analyzing it based on the rubric set in this help document.

  1. Identify who is involved in the change

This isn't really specified but I guess it's inferred that these changes effect everyone who is working within the spa.

  1. Summarize the change

Whilst I'm not really familiar with what an nx library is I understand the point of these changes based on the description.

move the core-components folder (currently apps/spa/src/libs/core-components) into a new Nx library @99designs/ui

  1. Explain the motivation for making the change now

The reason for making the change now is that the frontend is in a stable state and this kind of consolidation makes sense. It will clean up the code base and make it easier to import commonly used UI building components.

  1. Identify the friction point

Core components had funky import paths like this

import { SolidButton } from 'libs/core-components/SolidButton/SolidButton/SolidButton';

whereas now it's this.

import { SolidButton } from '@99designs/ui';

This is clearly documented.

  1. List implementation options and their various trade offs

The author went ahead and did a small spike documented in an issue comment. There's basically some stumbling blocks whereby certain components have missing dependencies.

  1. Recommend a solution

Solution was just implemented in a PR. Not sure if there was too much debate on different options.

  1. Call out any unknowns/uncertainty

This is addressed in the the trade offs and in issue comments.