More content can go here as needed for the functional area.
Use action hubs to present prescriptive calls to action for things users must, should, or could do within an area of the system. They are often appropriate as landing pages for main navigation items but can also be descendant pages.
Don't use action hubs to present information that is not actionable. Analyze information for users to provide context and make it actionable.
You can include up to three secondary buttons to provide quick access to common tasks, such as adding a record. If you need to group multiple related actions, use a menu button.
Display actions that users must perform based on business requirements or best practices, and link users to the place where they can complete the action, such as a modal, split view page, or record page.
Start each item in the list with a verb that communicates the action to perform. After the verb, include the number of items that require attention and a succinct description.
Order the items by workflow order, or by importance if they are not part of the same workflow.
Consider ways to operationalize strategic tasks by breaking them down into smaller, achievable chunks of work.
Additional content should reflect one of the following sets of principles.
Content that is operational but optional should:
Content that is strategic and prescriptive should:
Content that is strategic and tied to a needs attention item should:
Use key information calls to action when the condition for prescribing an action can be distilled to a single piece of information.
Action hubs are not intended for analytical tasks. If you include charts, scope the data set to the appropriate strategic or operational view for the user. You can use one filter if necessary to swap between relevant contexts.
Groups of links to include and display in the following order.
Display up to 10 links to related pages in alphabetical order.
Display up to five items in reverse chronological order to indicate what users accessed most recently.
Optionally include links to the settings applicable to functionality within the action hub and its descendant pages.
Link needs attention items to the place where users can complete the action, such as a modal, split view page, or record page.
When no needs attention items are available, an empty state message indicates that users are caught up.
When more than six needs attention items are available in a viewpoint that is 768 pixels or larger, the content splits into two columns.
Open settings forms in modals.
Action hubs reflow content in small viewports.
@skyux/pages
View in NPM | View in GitHub None found. npm install --save-exact @skyux/pages
None found. import { SkyActionHubModule } from '@skyux/pages';
Selector: sky-action-hub
Creates an action hub to direct user attention to important actions and provide quick access to common tasks.
needsAttention: SkyActionHubNeedsAttentionInput | undefined
The list of actions that users must perform based on business requirements or best practices, or "loading"
to display a wait indicator.
parentLink: SkyPageLink | undefined
Links back to a parent page.
recentLinks: SkyRecentLinksInput
The list of recently accessed links, or "loading"
to display a wait indicator.
Default: []
relatedLinks: SkyPageLinksInput
The list of related links, or "loading"
to display a wait indicator.
Default: []
settingsLinks: SkyPageModalLinksInput
The list of settings with modal parameters, or "loading"
to display a wait indicator.
Default: []
title: string
The page title.
Default: ""
Selector: sky-action-hub-content
Displays additional content after the action items.
Selector: sky-action-hub-buttons
Displays buttons after the page title.
<a class="sky-btn sky-btn-default" href="path/to/new">New</a>
interface SkyActionHubNeedsAttentionClickHandlerArgs {
item: unknown;
}
item: unknown
type SkyActionHubNeedsAttentionClickHandler = (_: SkyActionHubNeedsAttentionClickHandlerArgs) => void
A list of actions that users must perform based on business requirements or best practices.
type SkyActionHubNeedsAttentionInput = SkyActionHubNeedsAttention[] | "loading"
Specifies action items that require attention and directs users to pages where they can resolve them.
interface SkyActionHubNeedsAttention {
click?: SkyActionHubNeedsAttentionClickHandler;
message?: string;
permalink?: { route?: { commands: any[]; extras?: NavigationExtras }; url?: string };
title: string;
}
The click handler for the action item.
message?: string
title
instead.
Text to display after the title.
permalink?: { route?: { commands: any[]; extras?: NavigationExtras }; url?: string }
The link to resolve the action item.
title: string
The title of the action item.
Displays links to related information or recently accessed items.
interface SkyPageLink {
label: string;
permalink: { route?: { commands: any[]; extras?: NavigationExtras }; url?: string };
}
label: string
The link text.
permalink: { route?: { commands: any[]; extras?: NavigationExtras }; url?: string }
The link destination.
type SkyPageLinksInput = SkyPageLink[] | "loading" | undefined
Displays links to related information or recently accessed items.
interface SkyPageModalLink {
label: string;
modal?: { component: any; config?: SkyModalConfigurationInterface };
permalink?: { route?: { commands: any[]; extras?: NavigationExtras }; url?: string };
}
label: string
The link text.
modal?: { component: any; config?: SkyModalConfigurationInterface }
The modal parameters.
permalink?: { route?: { commands: any[]; extras?: NavigationExtras }; url?: string }
The link destination.
type SkyPageModalLinksInput = SkyPageModalLink[] | "loading" | undefined
Link that also has a date field to sort by.
interface SkyRecentLink {
label: string;
lastAccessed: string | Date;
permalink: { route?: { commands: any[]; extras?: NavigationExtras }; url?: string };
}
label: string
The link text.
lastAccessed: string | Date
The date when the link was last accessed. Valid types are a Date object or ISO-8601 string.
permalink: { route?: { commands: any[]; extras?: NavigationExtras }; url?: string }
The link destination.
Recently accessed links to display in a link list component.
type SkyRecentLinksInput = SkyRecentLink[] | "loading" | SkyRecentlyAccessedGetLinksArgs | undefined
Parameters for retrieving a list of recently accessed links.
interface SkyRecentlyAccessedGetLinksArgs {
requestedRoutes: { app: string; route: string }[];
}
requestedRoutes: { app: string; route: string }[]
The links to retrieve.
SKY UX test harnesses are built upon Angular CDK component harnesses. For more information see the Angular CDK component harness documentation.
import { SkyActionHubHarness } from '@skyux/pages/testing';
Harness for interacting with an action hub component in tests.
getNeedsAttentionBlock(): Promise<SkyNeedsAttentionHarness>
getNeedsAttentionItems(filter = {}): Promise<SkyNeedsAttentionItemHarness[]>
Get the testing harnesses for items within the needs attention block.
filter = {}
Promise<SkyNeedsAttentionItemHarness[]>
getRecentLinks(): Promise<SkyLinkListHarness>
getRelatedLinks(): Promise<SkyLinkListHarness>
getSettingsLinks(): Promise<SkyLinkListHarness>
getTitle(): Promise<undefined | string>
Gets the title of the action hub.
Promise<undefined | string>
SkyActionHubHarness.with(filters: SkyActionHubHarnessFilters): HarnessPredicate<SkyActionHubHarness>
Gets a HarnessPredicate
that can be used to search for a
SkyLinkListHarness
that meets certain criteria.
filters: SkyActionHubHarnessFilters
HarnessPredicate<SkyActionHubHarness>
A set of criteria that can be used to filter a list of SkyActionHubHarness instances.
interface SkyActionHubHarnessFilters {
dataSkyId?: string | RegExp;
}
dataSkyId?: string | RegExp
Only find instances whose data-sky-id
attribute matches the given value.
import { SkyNeedsAttentionHarness } from '@skyux/pages/testing';
Harness for interacting with the needs-attention component in tests.
getEmptyListText(): Promise<undefined | string>
Gets the text from an empty list. If there are items in the list, this will return undefined
.
Promise<undefined | string>
getTitle(): Promise<undefined | string>
Gets the component's heading text. If there are no links, this will return undefined
.
Promise<undefined | string>
hasItems(): Promise<boolean>
Whether the link list is showing a list of links.
Promise<boolean>
SkyNeedsAttentionHarness.with(filters: SkyNeedsAttentionHarnessFilters): HarnessPredicate<SkyNeedsAttentionHarness>
Gets a HarnessPredicate
that can be used to search for a
SkyNeedsAttentionHarness
that meets certain criteria.
filters: SkyNeedsAttentionHarnessFilters
HarnessPredicate<SkyNeedsAttentionHarness>
A set of criteria that can be used to filter a list of SkyNeedsAttentionHarness instances.
interface SkyNeedsAttentionHarnessFilters {
dataSkyId?: string | RegExp;
}
dataSkyId?: string | RegExp
Only find instances whose data-sky-id
attribute matches the given value.
import { SkyNeedsAttentionItemHarness } from '@skyux/pages/testing';
Harness for interacting with a needs attention item in tests.
click(): Promise<void>
Clicks the item.
Promise<void>
getText(): Promise<string>
Gets the text content of the item.
Promise<string>
SkyNeedsAttentionItemHarness.with(filters: SkyNeedsAttentionItemHarnessFilters): HarnessPredicate<SkyNeedsAttentionItemHarness>
Gets a HarnessPredicate
that can be used to search for a
SkyNeedsAttentionItemHarness
that meets certain criteria.
filters: SkyNeedsAttentionItemHarnessFilters
HarnessPredicate<SkyNeedsAttentionItemHarness>
A set of criteria that can be used to filter a list of SkyNeedsAttentionItemHarness instances.
interface SkyNeedsAttentionItemHarnessFilters {
dataSkyId?: string | RegExp;
text?: string;
}
dataSkyId?: string | RegExp
Only find instances whose data-sky-id
attribute matches the given value.
text?: string
Only find instances whose text content matches the given value.
import { SkyLinkListHarness } from '@skyux/pages/testing';
Harness for interacting with a link list component in tests.
getHeadingText(): Promise<undefined | string>
Gets the link list's heading text. If there are no links, this will return undefined
.
Promise<undefined | string>
getListItems(filter = {}): Promise<SkyLinkListItemHarness[]>
isVisible(): Promise<boolean>
Whether the link list is showing a list of links.
Promise<boolean>
isWaiting(): Promise<boolean>
Gets the status of the wait indicator.
Promise<boolean>
SkyLinkListHarness.with(filters: SkyLinkListHarnessFilters): HarnessPredicate<SkyLinkListHarness>
Gets a HarnessPredicate
that can be used to search for a
SkyLinkListHarness
that meets certain criteria.
filters: SkyLinkListHarnessFilters
HarnessPredicate<SkyLinkListHarness>
A set of criteria that can be used to filter a list of SkyLinkListHarness instances.
interface SkyLinkListHarnessFilters {
dataSkyId?: string | RegExp;
}
dataSkyId?: string | RegExp
Only find instances whose data-sky-id
attribute matches the given value.
import { SkyLinkListItemHarness } from '@skyux/pages/testing';
Harness for interacting with a linked list item in tests.
click(): Promise<void>
Clicks the item.
Promise<void>
getText(): Promise<string>
Gets the text content of the item.
Promise<string>
SkyLinkListItemHarness.with(filters: SkyLinkListItemHarnessFilters): HarnessPredicate<SkyLinkListItemHarness>
Gets a HarnessPredicate
that can be used to search for a
SkyLinkListItemHarness
that meets certain criteria.
filters: SkyLinkListItemHarnessFilters
HarnessPredicate<SkyLinkListItemHarness>
A set of criteria that can be used to filter a list of SkyLinkListItemHarness instances.
interface SkyLinkListItemHarnessFilters {
dataSkyId?: string | RegExp;
text?: string;
}
dataSkyId?: string | RegExp
Only find instances whose data-sky-id
attribute matches the given value.
text?: string
Only find instances whose text content matches the given value.
Loading...