OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub
Ruby agile-developmentangularbcfboardsbug-trackerganttgantt-chartifcissue-trackerjira-alternativekanbanopenprojectproduct-managementproject-managementproject-planningroadmaprubyscrumtimelineworkflows
Updates to Storybook
Parimal Satyale44d50c4b60c
diff --git a/docs/development/design-system/logo_openproject_spot.png b/docs/development/design-system/logo_openproject_spot.pngnew file mode 100644index 00000000000..65bad98ad4fBinary files /dev/null and b/docs/development/design-system/logo_openproject_spot.png differdiff --git a/frontend/.storybook/SpotTheme.js b/frontend/.storybook/SpotTheme.jsindex 8c468632553..d109593abb1 100644--- a/frontend/.storybook/SpotTheme.js+++ b/frontend/.storybook/SpotTheme.js@@ -5,6 +5,6 @@ export default create({brandTitle: 'SPOT - Single Point Of Truth',brandUrl: '/',- brandImage: '/assets/logo_openproject_spot.png',+ brandImage: 'https://www.openproject.org/docs/development/design-system/logo_openproject_spot.png',brandTarget: '_self',});diff --git a/frontend/src/app/spot/components/selector-field/stories/SelectorField.stories.mdx b/frontend/src/app/spot/components/selector-field/stories/SelectorField.stories.mdxindex 3637c53178a..196ca1d2ecf 100644--- a/frontend/src/app/spot/components/selector-field/stories/SelectorField.stories.mdx+++ b/frontend/src/app/spot/components/selector-field/stories/SelectorField.stories.mdx@@ -44,6 +44,12 @@ If the label text is particular long, it should wrap within the container, but b> Example: A checkbox wrapping around when the item label is very long+## Options++Selector labels can be **bold** or regular. However, these two styles should not be mixed in a single set of selector fields.++> Example: A selector field with a bold label and one that's regular+## StatesThe selector field itself only has two states, *enabled* and *disabled*.diff --git a/frontend/src/app/spot/components/tooltip/stories/Tooltip.stories.mdx b/frontend/src/app/spot/components/tooltip/stories/Tooltip.stories.mdxindex 2f2759360f3..1dcbe7cf44a 100644--- a/frontend/src/app/spot/components/tooltip/stories/Tooltip.stories.mdx+++ b/frontend/src/app/spot/components/tooltip/stories/Tooltip.stories.mdx@@ -23,9 +23,23 @@ import { SbTooltipComponent } from './Tooltip.component';}}/>-## Tooltip+# Tooltip-The include projects drop modal allows users to include projects other than the current one, so that the current view (be it table view, the team planner, boards view...) also displays work packages of these included projects.+> Example of a tooltip++Tooltips are used to provide additional information about an interactive element on mouse hover.++By default, they take 100% of the width of the containing element. However, max-width should be specified manually for each tooltip, depending on the circumstances and placement of the element.++Tooltips have a min-width of X rem.++Tooltips automatically align themselves to the top or the bottom of the element it is attached to, depending on the positioning of the element in the viewport.++## Options++Tooltips by default have a dark gray background (_Gray 1: #333_), but a lighter version is also available with a sky blue background in the default theme (_Feedback/Info/Light_).++> Example of a tooltip with a light backgroundexport const Template = (args) => ({parameters: {diff --git a/frontend/src/stories/Focus.stories.mdx b/frontend/src/stories/Focus.stories.mdxnew file mode 100644index 00000000000..40e64216a44--- /dev/null+++ b/frontend/src/stories/Focus.stories.mdx@@ -0,0 +1,13 @@+import { Meta, Story, Canvas } from '@storybook/addon-docs';+import tokens from '../app/spot/styles/tokens/dist/tokens.json';++<Meta title="Styles/Focus state" />++# Focus state++Focus state in OpenProject is represented by a 2-pixel outline around the focused element.++> Example of some elements with the focus state simulated++_Active_ is a similar state as focused, but not entirely the same. For example, in the date picker, the start date can be "active" (meaning that clicking on a date in the mini-calendar will change the start date) but not in focus (because the mouse has clicked outside of the field).+diff --git a/frontend/src/stories/HowToUse.stories.mdx b/frontend/src/stories/HowToUse.stories.mdxindex 731347bab57..086d7b0dd01 100644--- a/frontend/src/stories/HowToUse.stories.mdx+++ b/frontend/src/stories/HowToUse.stories.mdx@@ -1,20 +1,67 @@import { Meta } from '@storybook/addon-docs';-<Meta title="Using Storybook" />+<Meta title="Using this resource" />-# Using Storybook (WIP)+# Using this resource-We use [Storybook](https://storybook.js.org/) to document our design system.+We use [Storybook](https://storybook.js.org/) to document our design system. You will find defined styles, components and patterns in the relevant sections.++You will not find _all_ elements in Storybook yet. The design system at OpenProject is a work in progress; many parts of the software still use older elements that have not been standardised and defined.++As we work through defining and coumenting each new component, we will find them here.++## Other resources++All of the components described here also exist in our Figma libraries:++- [Foundation styles](https://www.figma.com/file/vOw6PEVIyzaQOIgf02VZFW/Foundations-Library?node-id=228%3A2)+- [Components](https://www.figma.com/file/XhCsrvs6rePifqbBpKYRWD/Components-Library?node-id=386%3A3606)++_You might find examples of some older elements in the older [Living Style Guide](http://spike.openproject-stage.com:4200/assets/styleguide.html#forms). This will eventually be replaced by Storybook, but this will require time._+++## Semantics++When describing components, we use certain words in very particular ways:++### Disabled++_Disabled_ is when no interaction is possible. A disabled element can itself have multiple states: a checkbox can be checked and disabled, a switch can be ON and disabled, a dropdown might have a value but but disabled.++The opposite of disabled is _enabled_. All elements are described in their enabled state unless explicitly mentioned.++### Focused and active++Focus simply refers to when an element has the current object in DOM that has the input focus. In OpenProject, elements that are focused generally have a blue outline.++The opposite of _in focus_ (or focused) is _not in focus_ (or focused).++_Active_ is a similar state as focused, but not entirely the same. For example, in the date picker, the start date can be "active" (meaning that clicking on a date in the mini-calendar will change the start date) but not in focus (because the mouse has clicked outside of the field).++The opposite of active is _inactive_.++### Checked and on++Checkboxes can be _checked_ (true) or _unchecked_ (false)++Radio options can also be "checked" (as in, in a set of three options, only one can be checked) despite this not being the technically correct word. This isi to to distinguish it from "selected" (which refers to selecting an element or an area with the cursor).++Switches can be _ON_ (true) or _OFF_ (false).## Browing through the docs-To be added:+This Storybook is divided in three sections:-- How styles, components and patterns are organised-- What the left-side menu includes (and does not include)-- How to find linked/dependent elements+**Styles** include foundational elements like typography, colour, spacing and shadows. All other elements are defined using these base styles.++**Components** are individual elements (like checkboxes, buttons or text fields), each of which has its own states, variants and behaviour.-## Contributing+**Patterns** are larger, recurring UI elements made up of a set of different components. Each component used in a pattern still retains its own specificities (options, variatns), but can also have certiain behaviour at the level of the pattern itself. (For example, an action bar can have two or three buttons, which can either be on the left side or the right side).-- As a developer-- As a designer\ No newline at end of file+## To be added:++- What the left-side menu includes (and does not include)+- How to find linked/dependent elements+- Contributing:+ - As a developer+ - As a designer\ No newline at end of filediff --git a/frontend/src/stories/Typography.stories.mdx b/frontend/src/stories/Typography.stories.mdxindex 847ee3fe479..5c271505b3e 100644--- a/frontend/src/stories/Typography.stories.mdx+++ b/frontend/src/stories/Typography.stories.mdx@@ -49,6 +49,10 @@ So far, zero recorded use. Might get removed if this style is not used in untilVery rarely used. Used if we need a header small than the regular header but still distinct from body text.+## Subheader Extra Small++This is really an alias of _Body Small/Bold_ when this style is used as a header (in some modals) instead of body text.+> Code example here## Body Big