From eb72cc41dbb8620d6a95a29875cb9d2dbfaeee1b Mon Sep 17 00:00:00 2001
From: Jenn Medellin <54321jenn@gmail.com>
Date: Thu, 25 Jan 2018 15:11:20 -0800
Subject: [PATCH] chore(): update patterns to use stackblitz (#1064)
* chore()/update cards pattern
- Add stackblitz example
- Modify layout to match new patterns
* chore()/update patterns
- Remove example logic from cards
- Rework alert pattern
* chore()/update mgmt list
- update management list example to stackblitz
- fix layout
* chore()/update mgmt list
- update ts
* chore()/update patterns
- update mgmt list & nav drawer pattern layouts & examples
* chore()/update layouts
- cleanup all layouts
* chore()/clean up
- Clean up guidance
* chore(docs): update patterns
- Add [inset]="true" on MatDividers
- Fix Do's and Don'ts (lost in code conflict)
* chore(docs)/update patterns to stackblitz
- make all typography divs include relative class
* chore(docs)/update to stackblitz
- remove unused css
* chore(patterns): fix dividers & lists
* chore(theme): fix link style
* chore(patterns): add missing dividers
---
.../alerts/alerts.component.html | 449 ++++---------
.../alerts/alerts.component.ts | 70 +-
.../cards/cards.component.html | 630 +++---------------
.../design-patterns/cards/cards.component.ts | 24 +-
.../empty-states/empty-states.component.html | 42 +-
.../management-list.component.html | 354 +++-------
.../management-list.component.ts | 102 +--
.../navigation-drawer.component.html | 235 +++----
.../navigation-drawer.component.scss | 17 -
.../navigation-drawer.component.ts | 46 +-
.../steppers/steppers.component.html | 53 +-
.../steppers/steppers.component.scss | 3 -
.../core/common/styles/core/_card.scss | 3 +
src/theme.scss | 3 +-
14 files changed, 485 insertions(+), 1546 deletions(-)
diff --git a/src/app/components/design-patterns/alerts/alerts.component.html b/src/app/components/design-patterns/alerts/alerts.component.html
index 4a9d809eef..85d8c23eed 100644
--- a/src/app/components/design-patterns/alerts/alerts.component.html
+++ b/src/app/components/design-patterns/alerts/alerts.component.html
@@ -1,327 +1,140 @@
-
-
+
+ Alert Patterns
-
-
Problem
-
Need to provide information or feedback to the user and potentially prompt them to take action.
-
Solution
-
Notifications have a signifigant impact on the user's overall impression of the application. This is how the app communicates directly with the user, so it is important to consider the form of notification. For exmaple, dialogs are most useful in situations where the user most take some action or the app needs to communicate critical information. On the other hand, toasts and snackbars are passive and do not require any user action or interruption to the user's workflow. Inline errors are useful for forms validation while guiding the user through the form.
+
+
When to use
+
Dialogs, toasts, and inline errors all provide a means to communicate with the user to provide feedback or a call to action.
Since dialogs are disruptive, reserve use to inform users about a specific task or critical information, such as
- a verbose/critical error, alert or a confirmation of an action.
- Toast
- Brief, floating notification with optional user interaction
-
-
Toasts & snackbars provide brief feedback about an operation through a message at the bottom of the screen. This information is transient and will go away momentarily.
Need to display item or set of content composed of different elements whose size or supported actions vary.
-
Solution
-
Cards are a convenient means of displaying content composed of different elements. They’re also well-suited for showcasing
- elements whose size or supported actions vary, like photos with captions of variable length.
+
+
When to use
+
Use a card layout when displaying collections of multiple data types such as images, movies, and text. Also useful when content has variable length and a grid list is not suitable.
In special cases, cards may contain form elements, like the login card. However, in most sitautions, we recommend using the Card Over full page layout for forms.
-
-
-
-
-
-
-
-
-
-
-
-
-
- Login
- Sign In with Your Credentials
-
-
-
-
The username or password is incorrect. Please try again.
-
-
-
-
-
-
-
-
- ]]>
-
-
-
-
-
-
- Login
-
- Sign In with Your Credentials
-
-
-
-
The username or password is incorrect. Please try again.
- Metadata List Card
- Card with metadata for an item detail
-
-
Cards support many rich components, including our management list. When adding multiple lists to a card, seperate them using mat-divider and consider adding matSubheader.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Item Info
- Info About This Item
-
-
-
Metadata
-
- account_box
-
John Jameson
-
Owner
-
-
-
- description
-
An Item Description
-
Description
-
-
-
- vpn_key
-
1141e8e8-8d24-4956-93c2
-
API Key
-
-
-
Dates
-
- access_time
-
Wed, July 6, 2016 11:13 AM
-
Last Updated
-
-
-
- today
-
Wed, July 4, 2016 09:11 AM
-
Created
-
-
-
-
-
-
-
- ]]>
-
-
-
-
-
- Item Info
- Info About This Item
-
-
-
Metadata
-
- account_box
-
John Jameson
-
Owner
-
-
-
- description
-
An Item Description
-
Description
-
-
-
- vpn_key
-
1141e8e8-8d24-4956-93c2
-
API Key
-
-
-
Dates
-
- access_time
-
Wed, July 6, 2016 11:13 AM
-
Last Updated
-
-
-
- today
-
Wed, July 4, 2016 09:11 AM
-
Created
-
-
-
-
-
-
-
-
+
+
-
-
- CRUD Manage List Card
- Card with faux-columns & search
-
-
In this example, notice the search component in the top left. Also, using the flex model, you can simulate columns by using the same layout on each row. See the management list for more implementation details.
- Card with Image Variations
- Card with sepcial image elements
-
-
Images displayed within cards inherit styling which removes margin and padding, depending on where the imgae is positioned within the card. Notice if the image is first it has proper rounded corners.
-
Examples are leveraging the following special image elements:
Need a means of navigation that is familiar and consistent.
-
Solution
-
The navigation drawer provides a familiar means of navigation along with access to additional account features, for example, the ability to switch accounts, access settings, and sign out.
The navigation drawer provides a familiar means of navigation along with access to additional account features, for example, the ability to switch accounts, access settings, and sign out.