-
Notifications
You must be signed in to change notification settings - Fork 17
Status light redesign #2175
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Status light redesign #2175
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
9de6465
Status light design updates
GomezIvann 489aefb
Updated test
GomezIvann b264fc5
Updated tests
GomezIvann 5d8ab71
Status light feedback updates
GomezIvann fe88e9a
Merge branch 'master' into gomezivann/status-light-redesign
GomezIvann 32f31cf
Status light documentation
GomezIvann File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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,17 @@ | ||
| import Head from "next/head"; | ||
| import type { ReactElement } from "react"; | ||
| import StatusLightPageLayout from "screens/components/status-light/StatusLightPageLayout"; | ||
| import StatusLightCodePage from "screens/components/status-light/code/StatusLightCodePage"; | ||
|
|
||
| const Code = () => ( | ||
| <> | ||
| <Head> | ||
| <title>Status light code — Halstack Design System</title> | ||
| </Head> | ||
| <StatusLightCodePage /> | ||
| </> | ||
| ); | ||
|
|
||
| Code.getLayout = (page: ReactElement) => <StatusLightPageLayout>{page}</StatusLightPageLayout>; | ||
|
|
||
| export default Code; |
This file contains hidden or 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 |
|---|---|---|
| @@ -1,21 +1,17 @@ | ||
| import Head from "next/head"; | ||
| import type { ReactElement } from "react"; | ||
| import StatusLightCodePage from "screens/components/status-light/code/StatusLightCodePage"; | ||
| import StatusLightOverviewPage from "screens/components/status-light/overview/StatusLightOverviewPage"; | ||
| import StatusLightPageLayout from "screens/components/status-light/StatusLightPageLayout"; | ||
|
|
||
| const Index = () => { | ||
| return ( | ||
| <> | ||
| <Head> | ||
| <title>Status Light — Halstack Design System</title> | ||
| </Head> | ||
| <StatusLightCodePage></StatusLightCodePage> | ||
| </> | ||
| ); | ||
| }; | ||
| const Index = () => ( | ||
| <> | ||
| <Head> | ||
| <title>Status light — Halstack Design System</title> | ||
| </Head> | ||
| <StatusLightOverviewPage /> | ||
| </> | ||
| ); | ||
|
|
||
| Index.getLayout = function getLayout(page: ReactElement) { | ||
| return <StatusLightPageLayout>{page}</StatusLightPageLayout>; | ||
| }; | ||
| Index.getLayout = (page: ReactElement) => <StatusLightPageLayout>{page}</StatusLightPageLayout>; | ||
|
|
||
| export default Index; |
21 changes: 0 additions & 21 deletions
21
apps/website/pages/components/status-light/specifications.tsx
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains hidden or 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 hidden or 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
137 changes: 137 additions & 0 deletions
137
apps/website/screens/components/status-light/overview/StatusLightOverviewPage.tsx
This file contains hidden or 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,137 @@ | ||
| import { DxcParagraph, DxcBulletedList, DxcFlex, DxcTable } from "@dxc-technology/halstack-react"; | ||
| import QuickNavContainer from "@/common/QuickNavContainer"; | ||
| import QuickNavContainerLayout from "@/common/QuickNavContainerLayout"; | ||
| import DocFooter from "@/common/DocFooter"; | ||
| import Example from "@/common/example/Example"; | ||
| import HeaderDescriptionCell from "@/common/HeaderDescriptionCell"; | ||
| import variants from "./example/variants"; | ||
| import anatomy from "./images/status_light_anatomy.png"; | ||
| import Image from "@/common/Image"; | ||
|
|
||
| const sections = [ | ||
| { | ||
| title: "Introduction", | ||
| content: ( | ||
| <DxcParagraph> | ||
| Being a <strong>non-clickable UI element</strong>, the status light is used to provide a quick, at-a-glance | ||
| indication of system states, alerts, or conditions within an interface. Designed for clarity and instant | ||
| recognition, it seamlessly integrates into various layouts without adding cognitive load. Status lights follow a | ||
| consistent color-coded system to ensure users can easily interpret their meaning. They are often used alongside | ||
| other components, such as tables, accordions, or dashboards, to enhance visibility and provide contextual | ||
| awareness. | ||
| </DxcParagraph> | ||
| ), | ||
| }, | ||
| { | ||
| title: "Anatomy", | ||
| content: ( | ||
| <> | ||
| <Image src={anatomy} alt="Status light's anatomy" /> | ||
| <DxcBulletedList type="number"> | ||
| <DxcBulletedList.Item> | ||
| <strong>Status light:</strong> the core visual element of a status light, designed as dot for clarity and | ||
| easy recognition. | ||
| </DxcBulletedList.Item> | ||
| <DxcBulletedList.Item> | ||
| <strong>Label:</strong> a short text description alongside the status light to provide additional context. | ||
| </DxcBulletedList.Item> | ||
| </DxcBulletedList> | ||
| </> | ||
| ), | ||
| }, | ||
| { | ||
| title: "Variants", | ||
| content: ( | ||
| <> | ||
| <DxcParagraph> | ||
| The status light component is available in five semantic variants, each represented by a distinct color. These | ||
| colors ensure clear communication of different states. | ||
| </DxcParagraph> | ||
| <DxcParagraph> | ||
| Additionally, the component comes in three different sizes, allowing for flexibility across various layouts | ||
| and screen sizes while maintaining readability and visual consistency. | ||
| </DxcParagraph> | ||
| <Example example={variants} /> | ||
| <DxcTable> | ||
| <thead> | ||
| <tr> | ||
| <th>Variant</th> | ||
| <HeaderDescriptionCell>Description</HeaderDescriptionCell> | ||
| </tr> | ||
| </thead> | ||
| <tbody> | ||
| <tr> | ||
| <td> | ||
| <strong>Default</strong> | ||
| </td> | ||
| <td>For neutral statuses, like archived, draft, paused...</td> | ||
| </tr> | ||
| <tr> | ||
| <td> | ||
| <strong>Info</strong> | ||
| </td> | ||
| <td>For live statuses, like active, in use, uploaded...</td> | ||
| </tr> | ||
| <tr> | ||
| <td> | ||
| <strong>Success</strong> | ||
| </td> | ||
| <td>For positive statuses, like finished, approved, completed...</td> | ||
| </tr> | ||
| <tr> | ||
| <td> | ||
| <strong>Warning</strong> | ||
| </td> | ||
| <td>For pending or critical statuses, like scheduled, in progress, processing...</td> | ||
| </tr> | ||
| <tr> | ||
| <td> | ||
| <strong>Error</strong> | ||
| </td> | ||
| <td>For negative statuses, like incomplete, rejected, failed...</td> | ||
| </tr> | ||
| </tbody> | ||
| </DxcTable> | ||
| </> | ||
| ), | ||
| }, | ||
| { | ||
| title: "Best practices", | ||
| content: ( | ||
| <DxcBulletedList> | ||
| <DxcBulletedList.Item> | ||
| <strong>Ensure semantic accuracy:</strong> always match each status light color with the correct meaning to | ||
| maintain clarity and avoid misinterpretation. | ||
| </DxcBulletedList.Item> | ||
| <DxcBulletedList.Item> | ||
| <strong>Optimize for different screen sizes:</strong> Select the appropriate size to ensure visibility and | ||
| legibility across various layouts. | ||
| </DxcBulletedList.Item> | ||
| <DxcBulletedList.Item> | ||
| <strong>Use clear and concise labels:</strong> Keep them brief and ensure they accurately describe the current | ||
| state. | ||
| </DxcBulletedList.Item> | ||
| <DxcBulletedList.Item> | ||
| <strong>Combine with badges carefully:</strong> status lights and semantic badges can only be used together if | ||
| one of them does not use a semantic color or if their semantic colors do not contradict each other. This | ||
| prevents misinterpretation and maintains clarity in data visualizations such as tables, charts, or grids. | ||
| </DxcBulletedList.Item> | ||
| <DxcBulletedList.Item> | ||
| <strong>Use strategically:</strong> overusing status lights in interfaces with high cognitive load can | ||
| overwhelm users and disrupt readability. Use them only where they add real value. | ||
| </DxcBulletedList.Item> | ||
| </DxcBulletedList> | ||
| ), | ||
| }, | ||
| ]; | ||
|
|
||
| const StatusLightOverviewPage = () => ( | ||
| <DxcFlex direction="column" gap="4rem"> | ||
| <QuickNavContainerLayout> | ||
| <QuickNavContainer sections={sections} startHeadingLevel={2} /> | ||
| </QuickNavContainerLayout> | ||
| <DocFooter githubLink="https://github.com/dxc-technology/halstack-react/blob/master/apps/website/screens/components/status-light/overview/StatusLightOverviewPage.tsx" /> | ||
| </DxcFlex> | ||
| ); | ||
|
|
||
| export default StatusLightOverviewPage; | ||
File renamed without changes.
Binary file added
BIN
+24.5 KB
...ebsite/screens/components/status-light/overview/images/status_light_anatomy.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
52 changes: 0 additions & 52 deletions
52
apps/website/screens/components/status-light/specs/StatusLightSpecsPage.tsx
This file was deleted.
Oops, something went wrong.
Binary file removed
BIN
-25.9 KB
apps/website/screens/components/status-light/specs/images/status-light_anatomy.jpg
Binary file not shown.
Binary file removed
BIN
-36.2 KB
apps/website/screens/components/status-light/specs/images/status-light_specs.jpg
Binary file not shown.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.