-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #183 from omnifed/174-docs-use-pagetabs-in-field-m…
…essage-page docs: update Field Message to use PageTabs
- Loading branch information
Showing
7 changed files
with
115 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
--- | ||
--- | ||
|
||
import { | ||
WhenToUseAdmonition | ||
} from '@/app/components/Admonition' | ||
import OverviewList from '@/app/components/OverviewList' | ||
|
||
## Use Cases | ||
|
||
<OverviewList intro="Users should be able to:" rules={[ | ||
'Receive and understand supporting text and error messages', | ||
]} /> | ||
|
||
## Labeling Elements | ||
|
||
If the UI text is correctly linked, assistive tech (such as a screenreader) will read the UI text followed by the component's role. | ||
|
||
It can be useful to provide a descriptive identifier for the field message - like `help:first_name` - to help users navigate to the field message with assistive technology. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
--- | ||
--- | ||
|
||
import CodePreview from '@/app/components/CodePreview' | ||
import OverviewList from '@/app/components/OverviewList' | ||
import { | ||
WhenToUseAdmonition, | ||
WhenNotToUseAdmonition, | ||
} from '@/app/components/Admonition' | ||
import { | ||
FieldMessageBasicPreview, | ||
FieldMessageInvalidPreview | ||
} from '@/app/react/field-message/components/field-message-preview' | ||
|
||
## Usage | ||
|
||
<WhenToUseAdmonition description="Use a field message to provide more context of an associated input." /> | ||
|
||
## Standard Input | ||
|
||
<CodePreview preview={<FieldMessageBasicPreview />} /> | ||
|
||
<WhenToUseAdmonition description="When you need to add more context for the user." /> | ||
|
||
## Invalid Message | ||
|
||
<CodePreview preview={<FieldMessageInvalidPreview />} /> | ||
|
||
<WhenToUseAdmonition description="When you need to tell the user why the input used is invalid." /> | ||
|
||
## Responsive Layout | ||
|
||
As layouts adapt to larger screens and different window sizes, apply flexible container dimensions to text fields. Set minimum and maximum values for margins, padding, and container dimensions as layouts scale so that typography adjusts for better reading experiences. | ||
|
||
Text fields can span the full width of the display on compact window sizes, but should be bounded by flexible margins or other containers on medium and expanded window sizes. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
--- | ||
--- | ||
|
||
import CodePreview from '@/app/components/CodePreview' | ||
import OverviewList from '@/app/components/OverviewList' | ||
import { | ||
FieldMessageBasicPreview, | ||
FieldMessageInvalidPreview | ||
} from '@/app/react/field-message/components/field-message-preview' | ||
|
||
<OverviewList rules={[ | ||
'Make sure the field message is close to the input field', | ||
"The field message's state (standard or error) should be visible at a glance", | ||
'Keep descriptors and error messages brief and easy to act on' | ||
]} /> | ||
|
||
## Example | ||
|
||
<CodePreview preview={<FieldMessageBasicPreview />} /> | ||
<CodePreview preview={<FieldMessageInvalidPreview />} /> | ||
|
||
## Resources | ||
|
||
| Name | Resource | Status | | ||
| -------- | -------- | ---------------------------------------------------- | | ||
| Figma | [Design Kit (Figma)](https://www.figma.com/design/ducwqOCxoxcWc3ReV3FYd8/Digital-University-Component-Library?m=auto&node-id=0-1) | Private | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters