Function View
Overview
Responsive UI applications display a header at the top, a navigation bar to the left, with the content taking the rest of the screen.
As the user navigates to new endpoints in your application, the content area updates to reflect that, while the header and nav bar stay the same. We use the term function view to refer to these individual navigation endpoints since each provides a specific set of business functionality for your application.
Within the content area, each function view displays a title and an optional subtitle at the top. Breadcrumbs and a function toolbar are optional. The function-specific content displays below all of that.
![Function view example](./FunctionView.png?v=2)
Data Density
We support two different spacing modes for your function views:
- The default mode is what we call data sparse. Data sparse views typically display fewer elements in the screen. These views often correspond to the “mobile first” approach, where the view is designed primarily for tablet and/or mobile use.
- The other mode is what we call data dense. Data dense views typically display more elements in the screen. Desktop apps typically use data dense mode.
Your app may be all data sparse, all data dense, or a mix of both data sparse and data dense views, depending on the app’s needs. For example, an app may be data sparse for most users, with some data dense views reserved for administrative users who are (presumably) using a desktop system.
Layout Options
Responsive UI apps typically use responsive layout, where display blocks take as much height as needed, with their width set by the layout grid. There’s one vertical scrollbar for the entire page.
Responsive UI also supports fixed layout, where all display blocks fit fully within the visible viewport. Each display block in turn displays an internal scrollbar for its content, as needed.
Development
Web component development
Component reference
rui-function-view
Displays a title, optional subtitle, optional toolbar, and hosts content for the current content view.
Name | Type | Default | Description |
---|---|---|---|
titleText | string | '' | Title displayed at top of the function |
subtitleText | string | '' | Optional subtitle displayed at top-right of the function |
isDataDense | boolean | false | Bind this to a value of true if the function is data dense. Omit this property if the function is data sparse. |
isBusy | boolean | false | Displays a busy indicator for the entire function view when set to true. Set this to true if all data within the function view is currently being loaded, false otherwise. If the data is loaded separately for an individual display block, set jhaIsBusy at the display block level instead. |
busyText | string | '' | Text displayed below the spinning busy indicator when isBusy is true. |
isFixedLayout | boolean | false | Set this property to true if the view uses fixed layout. Leave this property at its default value of false if the view uses responsive layout. |
fixedLayoutThresholdWidth | number | 0 | Specifies the screen width below which the function should switch from fixed layout to a vertically scrolling list of display blocks. |
fixedLayoutThresholdHeight | number | 0 | Specifies the screen height below which the function should switch from fixed layout to a vertically scrolling list of display blocks. |
trackScrolling | boolean | false | Set this to a value of true if you want your application to track scrolling updates for infinite scrolling. |
rui-scrolled-to-bottom | event | This event fires when the user scrolls to the bottom of the page if you’ve set trackScrolling to true. This event is essential for infinite scrolling. |
Implementation
Begin by importing the rui-layout
module into your application.
Nest the function content and (optional function toolbar) within a rui-function-view
tag.
See Toolbar for more information on setting up toolbars in your function view.
Angular wrapper development
Wrapper reference
jha-function-view
Displays a title, optional subtitle, optional toolbar, and hosts content for the current content view.
Name | Type | Default | Description |
---|---|---|---|
jhaTitle | string | '' | Title displayed at top of the function |
jhaSubtitle | string | '' | Optional subtitle displayed at top-right of the function |
jhaDataDense | boolean | false | Pass a value of true if the function is data dense or omit this attribute if the function is data sparse. |
jhaIsBusy | boolean | false | Displays a busy indicator for the entire function view when set to true. Set this to true if all data within the function view is currently being loaded, false otherwise. If the data is loaded separately for an individual display block, set jhaIsBusy at the display block level instead. |
jhaBusyText | string | '' | Text displayed below the spinning busy indicator when isBusy is true. |
Implementation
Begin by importing the JhaLayoutModule
into your application.
Nest the function content and (optional function toolbar) within a jha-function-view
tag.
See Toolbar for more information on setting up toolbars in your function view.
Component playground
Design
Figma design
Dev Component | Design Component Name |
---|---|
Function view | RUI / Layout / Function View Switch on the “Has Breadcrumbs” property if the function view displays breadcrumbs. |
Function subtitle | Add text, then apply rui/toolbar as the Text Style and rui-pacific/function-title as the Color Style. |
Resize the function view to fit your artboard.
Change the function view title to an appropriate value.
Adobe XD design
- Layout - Header, Expanded Nav, Function View
- Layout - Header, Collapsed Nav, Function View
- Layout - Nav Elements - Expanded Nav Bar
- Layout - Nav Elements - Collapsed Nav Bar
- Layout - Nav Mega Menu
- Layout - Header Elements – Basics
- Layout - Header Menu Buttons
- Layout - Header Mega Menu
- Layout - Mobile Application
- Layout - Tablet Application – Portrait
- Layout - Tablet Application - Landscape
Dev Component | Design Component Name |
---|---|
Function view | JHA / Layout / Function View |
Function view with space for breadcrumbs | JHA / Layout / Function View for Breadcrumbs |
Function subtitle | Add text and apply the “JHA / Text / Function Toolbar” character style. |
Resize the function view to fit your artboard.
Change the function view title to an appropriate value.