react-devui icon indicating copy to clipboard operation
react-devui copied to clipboard

[Feature]: Remove the encoding "D" prefix in component

Open katesroad opened this issue 3 years ago • 1 comments

⭐ Remove the "D" prefix in component names

Thrilled to see Huawei has open-source projects in the frontend field.

One thing that is confusing is why we have a prefix "D" in all our components?

If I am an end developer user and as the author of some codebase, my future codebase reader can be confused with

  1. what is "D" there?
  2. Also, the "D" doesn't convey any meaning at all
  3. it is a mental burden to developers.

📃 Motivating Example

My concerns arise from reading Clean Code, at the first chapter, Avoid Encodings.

katesroad avatar Mar 27 '22 23:03 katesroad

We add the prefix every component, because we hope the component name is special enough that we know it's component of devui and avoid same name with other components. And I think the design of codes is complex, no one pattern can use everywhere.

xiejay97 avatar Mar 28 '22 05:03 xiejay97

⭐ Remove the "D" prefix in component names

Thrilled to see Huawei has open-source projects in the frontend field.

One thing that is confusing is why we have a prefix "D" in all our components?

If I am an end developer user and as the author of some codebase, my future codebase reader can be confused with

  1. what is "D" there?
  2. Also, the "D" doesn't convey any meaning at all
  3. it is a mental burden to developers.

📃 Motivating Example

My concerns arise from reading Clean Code, at the first chapter, Avoid Encodings.

I remove the "D" prefix in laser-ui. I hope prop keep same as the pure element, as <Input placeholder="Basic" /> instead of <Input dPlaceholder="Basic" />

xiejay97 avatar Sep 18 '23 08:09 xiejay97