About code quality
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 25.9k
- Forks
- 2.4k
- Avg merge
- 13h 10m
- Merged PRs (30d)
- 4
Description
Dear community,
I've been drafting some changes to the code, in order to add support for the notion of representations, and I must say that it was way more difficult that I expected. Not because the project is particularly complex - it is actually quite simple - but because the code quality is sub-optimal.
I had to make some very unexpected changes, like applying interface segregation to a lot of components (they all expect a complete model interface even when they only need a subset of such interface attributes), or duplicating styles because there is no way to compose them from mixins, or adding children-aware logic to components because some of them knows about their children (typically the MenuItem one but there are others) instead of honoring the rules of composition, or having to create an actual h3 heading because, well, the one included in the project is an h2.
In the end, I got the job done, but it was not a pleasing moment.
Would you accept some code quality proposals? I'd like to start be applying interface segregation.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The issue does not name files or tests; start by reviewing the component interfaces and composition patterns involved in the proposed representations work. Agree on a focused interface-segregation change and its completion criteria with maintainers before editing.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- react, typescript
- Domain
- frontend
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100