Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature 248 storybook folder structure #266

Merged

Conversation

ThePhisch
Copy link
Contributor

What was done

A long-scheduled cleanup of the storybook folder structure, i.e. src/component-library

  • Removed unused components
  • Added the Misc folder and added components there
  • Cleaned up the Pages folder and enforced the hierarchy that was initialised earlier
  • Flattened the hierarchy by moving component-library/components/ into component-library/
  • Defined rules for future components
  • (Fixed the imports later)

Rules going forward

The folder shall be structured into the following subfolders:

  • Button: UI components which can be clicked and do not store a react state
  • Helpers: UI components which do NOT have a renderable story (i.e. {component name}.stories.tsx file does not exist), such as Metatable, ResponsiveHook, Collapsible.
  • Input: UI components used to input a value, they should store a react state.
  • Misc: UI components with an attached renderable story, such as Alert, Tabs, Progressbar
  • Pages
    • Dashboard
      • Dashboard.tsx
      • Widgets folder, contents such as WidgetOngoinrules.tsx
    • Helpers: should probably be merged with top-level Helpers or Misc
    • Layout
    • Login
    • DID
      • ListDID.tsx
      • PageDID.tsx
      • extracted components, naming scheme e.g. ListDIDTable.tsx or PageDIDFilereplicas.tsx
    • RSE
      • as in DID
    • Rule
      • as in DID
    • Subscription
      • as in DID
    • ... if any other should come up
  • StreamedTables
    • StreamedTable.tsx
    • ... related components, naming scheme Table{PascalCaseDescription}.tsx, e.g. TableBreakout.tsx or TableInternalLink.tsx
  • Tags
  • Text
    • Content
    • Headings

Anton Schwarz added 5 commits July 19, 2023 16:43
Removed components and files that were unused
- `components.d.ts`
- `Box`
- `Streamable`
- `StateTable`

Components: removed unused `StateTable`
- Flattened `Tabs` folder
- Moved Tabs to new `Misc` folder
- Changed `Alert.stories` to flatten and have name `Alert`
- Moved Alert to Misc
- Flattened `Timeline`, removed `TimelineLiSpan` story
- Moved `Timeline` to `Misc`
- Moved Accordion to `Misc`
- Moved (unused) `ProgressBar` component to `Misc`

- Moved `pageRule` to `Rule` folder
- Moved `PageDID` to `DID`
- Moved `ListDID` to `DID`
- Move `CreateRule` to `Rule`
thus flattening the folder structure
Fixed imports including tests
@ThePhisch ThePhisch merged commit da7ad5f into rucio:master Jul 19, 2023
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant