The Morningstar Design System team follows a well-defined process for designing, building, and documenting visual language, components, and other patterns.
The process to build components, visual language, and other concerns follows some or all of four steps. Typically, a system feature – a new card component, for example, or an additional button variation – involves pairing a designer and an engineer. While a designer completes DESIGN and an engineer completes BUILD, either may complete the DOC and PUBLISH steps.
Step | Complete When | Owner | Reviewers |
---|---|---|---|
DESIGN | Design has completed and sufficiently documented a range of variations, states, and other design properties. | Designer |
MD Design * Director Design * Paired Engineer * System Lead Other Designer |
BUILD | Front-end assets – HTML, CSS, and JS – are complete for all variations, states, and variables, and sink page(s) have passed Build QA. | Engineer |
Paired Designer * Other Engineer * System Lead |
DOC | Documentation copy, images, and code samples are complete and have passed Doc QA. | Designer OR Engineer |
Paired Designer OR Engineer * Other Designer OR Engineer * System Editor * System Lead |
PUBLISH | Documentation has been migrated into publishable pages, verified, and merged with built features from the feature branch into the release branch. | Engineer OR Designer | The other person |
* indicates required reviewer
The DESIGN task includes finalizing all design decisions of a UI element or other design consideration. This includes not just directional validation from the design community, but meticulously solving for variations, states, and other relevant design details.
To complete a DESIGN task, the designer must obtain approval from:
The BUILD task includes the development and QA of MDS code, including library items, visual language, and other tooling.
feature/MDS-###-[label]
, such as feature/MDS-219-Split Button
. /library/test/visual/components
directory, with a filename corresponding to the component, such as buttons.njk
. feature/MDS-###-[label]
branch against the develop branch and assign reviewers to the pull request. The MDS repository contains two primary local environments, the library
and the doc-site
. When building new components or updating existing components, the work will be done in library
. When publishing documentation the work will be done in doc-site
.
Refer to the README files in library and doc-site for specific instructions on how to run those projects locally for development.
When building a new component in library
there is a helper task that can generate the boilerplate files you'll need build the component.
From library
run gulp generate:new-component
. Follow the prompts by providing the singular name of the component, and answering "no" when asked if a JavaScript file should be generated.
If you enter "data table" when prompted for a component name, this helper task will generate the following files:
library/components/data_table/data_table.njk
library/components/data_table/data_table.scss
library/test/visual/test-pages/components/data-tables.njk
The helper task will automatically pluralize and hyphenate the test page since it becomes a URL path in the library
project. The .scss
and .njk
templates are kept singular and underscored.
Components are built using SCSS for the styles and Nunjucks as the HTML templating language.
In the components/**/*.njk
file you generated in the previous step you will author a Nunjucks macro that will allow the quick creation of multiple versions of your component.
The test/visual/test-pages/components/*.njk
file is the test area where you will call the nunjucks macro multiple times, exercising all the variations of your component.
The MDS development environment contains visual diffing tests built on the BackstopJS testing framework.
The visual diffing tests require Docker Community Edition (Free) version 17.12
or higher. You must install Docker prior to running the tests.
develop
branch to ensure that no components are unintentionally changed. To create a test, wrap sections of a component sink page with a special nunjucks component:
{% call test_row() %}
<h2 class="mds-doc-sink__header">Default</h2>
{{ library.list_group() }}
{% endcall %}
Everything within the test_row()
call will be captured as a new image and used to create a new test.
The testing functionality is exposed via two gulp commands:
gulp test:styles
— runs the tests. gulp test:styles-promote-differences
— promotes the latest test images as the new baseline for subsequent tests. Run gulp test:styles
from the command line to run tests. Testing can take 10–15 minutes depending on the speed of your computer. Once a test is complete, the results will display in your browser.
A visual diffing test can “fail” in two ways:
Run gulp test:styles-promote-differences
to promote the latest test’s screenshots as the new baseline screenshots for future tests. This tells the testing framework, “These changes are approved. Don’t flag them as failures anymore.”
Commit the new baseline images to the MDS repository along with the code changes that triggered the visual difference.
To complete a BUILD task, the engineer must:
The DOC task corresponds to authoring any content that communicates what the System provides and how it operates. This includes copy, imagery, and coded examples illustrating the System via component documentation, processes, and any other content useful within or beyond the MDS core team. The DOC task is typically completed by either the assigned designer or engineer for that item.
/Components/
shared drive location, where MDS-###
corresponds to the DOC JIRA task number. /Components/MDS-###/Images/
Google Docs shared drive location. doc-site/components/[plural-component-name].njk
that’s finalized in the PUBLISH step. To complete a DOC task, the author must obtain approval from:
The PUBLISH step migrates content – copy, imagery, code examples, etc. – authored during the DOC step to the system site.
doc-site/components/[plural-component-name].njk
. feature/MDS-###-[label]
branch into the current develop branch as well as JIRA subtasks for each assigned reviewer. To complete a PUBLISH task, the publisher must obtain approval from:
The Morningstar Design System will publish two main artifacts: the documentation site and the consumable library for application engineers.
MDS does not provide JavaScript with UI Components.
JavaScript examples in MDS documentation are for demonstration purposes only. The Morningstar Design System team cannot provide technical support for JavaScript-based issues.
All component markup and styles provided are intended for production use, and the MDS core team expects that any JavaScript necessary to create or manipulate components will be provided by product teams.
Bower is no longer supported as a dependency manager. We support NPM as a package manager.
doc_library
and library
namespaces when running the doc-site
environment. What's the difference between doc-library
and library
?The doc-site
uses the same UI Component library NPM dependency that other consumers of MDS rely on.
Because the doc-site
is built using Nunjucks the nunjucks macros from library
are referenced through the NPM package. All of those components are mapped to a namespace called library
in doc-site
's base template.
Whenever you see library.button()
or library.list_group()
macro call in doc-site
, it's referencing the components from the official MDS UI Component library.
doc_library
is the namespace for components that are built as part of the doc-site
that aren't part of the official MDS UI Component library. These components include things like code_snippet, component_explorer, and icon_swatch.
The doc_library
nunjucks macros are not published or intended for usage outside of the doc-site
.
You can find all the external dependencies with the corresponding versioning here.