skilld-labs / ui-patterns-kaizen

Development for https://www.drupal.org/project/ui_suite
3 stars 0 forks source link

Storybook integration #12

Open gaydabura opened 1 year ago

gaydabura commented 1 year ago

Described in #14

iberdinsky-skilld commented 1 year ago
  1. Could you please provide more possible use cases? Because form elements it is not main time-killer on projects.
  2. Form elements often use only one ATOM-INPUTTEXT.
  3. Why Atoms in storybook never must be a pattern ? Atoms need settings. For example Button or Title formatter will be very configurable. Atomic system shouldn't be broken because of Drupal requirements.
gaydabura commented 1 year ago

@iberdinsky-skilld yes,

  1. Next molecules may use hook_theme: menu, details, table, status, list, etc
  2. Form element needs label+element also may need additional items, like icon, description, etc
  3. Because atomits standalone item, first mistake - use it as pattern, second - atom similar to renderelement in drupal, its atomic item, with defined settings (from code), so no UI. You may change settings in case you are using render element from your custom code, so in case of atom (when it rewrite drupal renderelement) all possibilities will be available through native drupal render array 3.1. In case you need dynamic "settings" for atom, it stops being atom and become another level, eg molecul, whatever, smth which use atom with rewrited default settings.