Skip to content

About code quality #2720

@ericmorand

Description

@ericmorand

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions