rancher / dashboard

The Rancher UI
https://rancher.com
Apache License 2.0
450 stars 256 forks source link

[Epic] Rancher Component Library #5108

Open rak-phillip opened 2 years ago

rak-phillip commented 2 years ago

Detailed Description

Separate a group of Rancher Components that can be used as a component library.

These are the components & utils that have been identified as a good starting point for the first iteration:

Components
  |- BadgeState.vue
  |- Banner.vue
  |- Card.vue
  |- Form
    |- Checkbox.vue
    |- LabeledInput.vue
    |- LabeledTooltip.vue
    |- RadioButton.vue
    |- RadioGroup.vue
    |- TextAreaAutoGrow.vue
Utils
  |- array.js
  |- object.js
  |- platform.js
  |- position.js
  |- sort.js
  |- string.js
  |- unit.js 

Context

We have several projects that are starting to use shared components throughout Rancher. For example, Rancher Desktop is currently copying dashboard components into their repo. We can reduce code duplication a great deal with a component framework.

TODO

rak-phillip commented 2 years ago

ActionMenu.vue looks like it is a dependency of SortableTable will need to be extracted later, if at all, as it will require quite a bit of refactoring. Dealing with SortableTable will take a considerable amount of effort and time, removing from this initial pass.