-
Notifications
You must be signed in to change notification settings - Fork 178
chore: VR improvements #3374
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
chore: VR improvements #3374
Changes from 7 commits
Commits
Show all changes
54 commits
Select commit
Hold shift + click to select a range
dd9f9bc
apply second direction for vr improvements
at-susie 565c282
Merge branch 'main' into implement-vr-improvements
at-susie 8d93a35
Merge branch 'main' into implement-vr-improvements
at-susie 647d7c8
update with consolidated tech strategy
at-susie eabd377
move visual context to inner part
at-susie 99adad6
Merge branch 'main' into implement-vr-improvements
at-susie 565543a
update snapshot
at-susie c5080e1
fix inlineLabelText background issue
at-susie 76db14b
resolve conflicts
at-susie 9f92b3e
Merge branch 'main' into implement-vr-improvements
at-susie 680940e
fix inline label background issue
at-susie f5257fa
Merge branch 'implement-vr-improvements' of https://github.com/clouds…
at-susie 988d047
update snapshots
at-susie ccabeae
Temporarly increase package size limit for exploration
at-susie c4ba38b
apply second direction for vr improvements
at-susie c20087a
update with consolidated tech strategy
at-susie 2b9a4a4
move visual context to inner part
at-susie 6ba6839
fix inlineLabelText background issue
at-susie d2fd93e
fix inline label background issue
at-susie e9e2bdb
update snapshots
at-susie 24552e6
Temporarly increase package size limit for exploration
at-susie 116e903
chore: Stroke adjustment
at-susie 543b59a
update snapshot
at-susie 122ab5c
resolve conflicts
at-susie a2de946
update snapshots
at-susie a8f4d36
Merge branch 'main' into implement-vr-improvements
at-susie 495dead
update snapshot
at-susie beb3451
update design-tokens.test.ts.snap
at-susie 680ac68
Merge branch 'main' into implement-vr-improvements
at-susie b8e5314
update snapshot
at-susie 6e13301
replace a border width constant with new border tokens
at-susie 141daa6
Merge branch 'main' into implement-vr-improvements
at-susie efbffe4
Merge branch 'main' into implement-vr-improvements
at-susie ee17b6e
update borderWidthField value to 1px
at-susie 20b0bc3
Merge branch 'main' into implement-vr-improvements
at-susie 250e35f
update integration tests with main
at-susie 8a8f57c
update snapshot tests
at-susie 545ef5f
Merge branch 'main' into implement-vr-improvements
at-susie 552b4dd
Merge branch 'main' into implement-vr-improvements
at-susie b196c47
Merge branch 'main' into implement-vr-improvements
at-susie 944a8bf
make segmented control stroke width 1px too
at-susie cca119b
update to have pixel perfect radio stroke width
at-susie da710ca
clean up demo pages and added a default one
at-susie 212202c
Merge branch 'main' into implement-vr-improvements
at-susie ba3c6be
Merge branch 'implement-vr-improvements' of https://github.com/clouds…
at-susie 15d30b8
update the token stroke width for property filter
at-susie d52ab09
Merge branch 'main' into implement-vr-improvements
at-susie c89743d
update a value that was hard-coded
at-susie 197287f
remove parentTokens from toolbar visual context definition and adjust…
at-susie 34944f3
update the expected value based on the prompt-input border width change
at-susie c2e9d6c
fix issues found in bug-bash - code editor border width and striped r…
at-susie d052874
Merge branch 'main' into implement-vr-improvements
at-susie c409a91
add an additional :not pseudo to striped divider for last-row
at-susie b02f890
Merge branch 'implement-vr-improvements' of https://github.com/clouds…
at-susie 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,110 @@ | ||
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. | ||
// SPDX-License-Identifier: Apache-2.0 | ||
import React, { useState } from 'react'; | ||
import range from 'lodash/range'; | ||
|
||
import { AppLayoutToolbar } from '~components'; | ||
import Button from '~components/button'; | ||
import Cards, { CardsProps } from '~components/cards'; | ||
import Header from '~components/header'; | ||
import Link from '~components/link'; | ||
|
||
import * as toolsContent from '../app-layout//utils/tools-content'; | ||
import { Breadcrumbs, Footer, Navigation, Notifications, Tools } from '../app-layout/utils/content-blocks'; | ||
import labels from '../app-layout/utils/labels'; | ||
import ScreenshotArea from '../utils/screenshot-area'; | ||
|
||
interface Item { | ||
number: number; | ||
text: string; | ||
} | ||
|
||
function createSimpleItems(count: number) { | ||
const texts = ['One', 'Two', 'Three', 'Four', 'Five']; | ||
return range(count).map(number => ({ number, text: texts[number % texts.length] })); | ||
} | ||
|
||
const cardDefinition: CardsProps.CardDefinition<Item> = { | ||
header: item => item.text, | ||
sections: [ | ||
{ | ||
id: 'description', | ||
header: 'Number', | ||
content: item => item.number, | ||
}, | ||
{ | ||
id: 'type', | ||
header: 'Text', | ||
content: item => item.text, | ||
}, | ||
], | ||
}; | ||
|
||
const config: CardsProps['cardsPerRow'] = [ | ||
{ | ||
cards: 1, | ||
}, | ||
{ | ||
minWidth: 400, | ||
cards: 2, | ||
}, | ||
{ | ||
cards: 3, | ||
minWidth: 700, | ||
}, | ||
{ | ||
cards: 4, | ||
minWidth: 1000, | ||
}, | ||
]; | ||
|
||
const items = createSimpleItems(16); | ||
|
||
export default function () { | ||
const [toolsOpen, setToolsOpen] = useState(false); | ||
const [selectedTool, setSelectedTool] = useState<keyof typeof toolsContent>('long'); | ||
|
||
function openHelp(article: keyof typeof toolsContent) { | ||
setToolsOpen(true); | ||
setSelectedTool(article); | ||
} | ||
|
||
return ( | ||
<ScreenshotArea gutters={false}> | ||
<AppLayoutToolbar | ||
ariaLabels={labels} | ||
breadcrumbs={<Breadcrumbs />} | ||
navigation={<Navigation />} | ||
contentType="cards" | ||
tools={<Tools>{toolsContent[selectedTool]}</Tools>} | ||
toolsOpen={toolsOpen} | ||
onToolsChange={({ detail }) => setToolsOpen(detail.open)} | ||
notifications={<Notifications />} | ||
content={ | ||
<Cards<Item> | ||
items={items} | ||
cardDefinition={cardDefinition} | ||
stickyHeader={true} | ||
variant="full-page" | ||
header={ | ||
<Header | ||
variant="awsui-h1-sticky" | ||
description="Demo page with footer" | ||
info={ | ||
<Link variant="info" onFollow={() => openHelp('long')}> | ||
Long help text | ||
</Link> | ||
} | ||
actions={<Button variant="primary">Create</Button>} | ||
> | ||
Sticky Scrollbar Example | ||
</Header> | ||
} | ||
cardsPerRow={config} | ||
/> | ||
} | ||
/> | ||
<Footer legacyConsoleNav={false} /> | ||
</ScreenshotArea> | ||
); | ||
} |
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,68 @@ | ||
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. | ||
// SPDX-License-Identifier: Apache-2.0 | ||
import React, { useContext, useState } from 'react'; | ||
|
||
import { AppLayoutToolbar, Button, Header, Link, Table } from '~components'; | ||
|
||
import AppContext, { AppContextType } from '../app/app-context'; | ||
import { Breadcrumbs, Footer, Navigation, Notifications, Tools } from '../app-layout/utils/content-blocks'; | ||
import labels from '../app-layout/utils/labels'; | ||
import * as toolsContent from '../app-layout/utils/tools-content'; | ||
import { generateItems, Instance } from '../table/generate-data'; | ||
import { columnsConfig } from '../table/shared-configs'; | ||
import ScreenshotArea from '../utils/screenshot-area'; | ||
|
||
type PageContext = React.Context<AppContextType<{ stickyNotifications: boolean }>>; | ||
|
||
const items = generateItems(20); | ||
|
||
export default function () { | ||
const [toolsOpen, setToolsOpen] = useState(false); | ||
const [selectedTool, setSelectedTool] = useState<keyof typeof toolsContent>('long'); | ||
const { urlParams } = useContext(AppContext as PageContext); | ||
|
||
function openHelp(article: keyof typeof toolsContent) { | ||
setToolsOpen(true); | ||
setSelectedTool(article); | ||
} | ||
|
||
return ( | ||
<ScreenshotArea gutters={false}> | ||
<AppLayoutToolbar | ||
ariaLabels={labels} | ||
breadcrumbs={<Breadcrumbs />} | ||
navigation={<Navigation />} | ||
contentType="table" | ||
tools={<Tools>{toolsContent[selectedTool]}</Tools>} | ||
toolsOpen={toolsOpen} | ||
onToolsChange={({ detail }) => setToolsOpen(detail.open)} | ||
notifications={<Notifications />} | ||
stickyNotifications={urlParams.stickyNotifications} | ||
content={ | ||
<Table<Instance> | ||
header={ | ||
<Header | ||
variant="awsui-h1-sticky" | ||
description="Demo page with footer" | ||
info={ | ||
<Link variant="info" onFollow={() => openHelp('long')}> | ||
Long help text | ||
</Link> | ||
} | ||
actions={<Button variant="primary">Create</Button>} | ||
> | ||
Sticky Scrollbar Example | ||
</Header> | ||
} | ||
stickyHeader={true} | ||
variant="full-page" | ||
columnDefinitions={columnsConfig} | ||
items={items} | ||
stripedRows={true} | ||
/> | ||
} | ||
/> | ||
<Footer legacyConsoleNav={false} /> | ||
</ScreenshotArea> | ||
); | ||
} |
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,107 @@ | ||
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. | ||
// SPDX-License-Identifier: Apache-2.0 | ||
import React, { useContext, useState } from 'react'; | ||
|
||
import { | ||
AppLayoutToolbar, | ||
Box, | ||
Button, | ||
ColumnLayout, | ||
Container, | ||
Header, | ||
SpaceBetween, | ||
Table, | ||
Wizard, | ||
} from '~components'; | ||
|
||
import AppContext, { AppContextType } from '../app/app-context'; | ||
import { Breadcrumbs } from '../app-layout/utils/content-blocks'; | ||
import labels from '../app-layout/utils/labels'; | ||
import { generateItems, Instance } from '../table/generate-data'; | ||
import { columnsConfig } from '../table/shared-configs'; | ||
import ScreenshotArea from '../utils/screenshot-area'; | ||
|
||
type DemoContext = React.Context< | ||
AppContextType<{ hasBreadcrumbs: boolean; hasNotifications: boolean; disableOverlap: boolean }> | ||
>; | ||
|
||
const items = generateItems(20); | ||
|
||
export default function () { | ||
const { urlParams } = useContext(AppContext as DemoContext); | ||
const [activeStepIndex, setActiveStepIndex] = useState(0); | ||
|
||
return ( | ||
<ScreenshotArea gutters={false}> | ||
<AppLayoutToolbar | ||
ariaLabels={labels} | ||
navigationHide={false} | ||
breadcrumbs={urlParams.hasBreadcrumbs && <Breadcrumbs />} | ||
content={ | ||
<Wizard | ||
i18nStrings={{ | ||
stepNumberLabel: stepNumber => `Step ${stepNumber}`, | ||
collapsedStepsLabel: (stepNumber, stepsCount) => `Step ${stepNumber} of ${stepsCount}`, | ||
skipToButtonLabel: step => `Skip to ${step.title}`, | ||
navigationAriaLabel: 'Steps', | ||
cancelButton: 'Cancel', | ||
previousButton: 'Previous', | ||
nextButton: 'Next', | ||
submitButton: 'Launch instance', | ||
optional: 'optional', | ||
}} | ||
connorlanigan marked this conversation as resolved.
Show resolved
Hide resolved
|
||
onNavigate={({ detail }) => setActiveStepIndex(detail.requestedStepIndex)} | ||
activeStepIndex={activeStepIndex} | ||
allowSkipTo={true} | ||
steps={[ | ||
{ | ||
title: 'Add storage', | ||
content: ( | ||
<Box> | ||
<Table<Instance> | ||
header={ | ||
<Header | ||
variant="awsui-h1-sticky" | ||
description="Demo page with footer" | ||
actions={<Button variant="primary">Create</Button>} | ||
> | ||
Sticky Scrollbar Example | ||
</Header> | ||
} | ||
columnDefinitions={columnsConfig} | ||
items={items} | ||
/> | ||
</Box> | ||
), | ||
isOptional: true, | ||
}, | ||
{ | ||
title: 'Review and launch', | ||
content: ( | ||
<SpaceBetween size="xs"> | ||
<Header variant="h3" actions={<Button onClick={() => setActiveStepIndex(0)}>Edit</Button>}> | ||
Step 1: Instance type | ||
</Header> | ||
<Container header={<Header variant="h2">Container title</Header>}> | ||
<ColumnLayout columns={2} variant="text-grid"> | ||
<div> | ||
<Box variant="awsui-key-label">First field</Box> | ||
<div>Value</div> | ||
</div> | ||
<div> | ||
<Box variant="awsui-key-label">Second Field</Box> | ||
<div>Value</div> | ||
</div> | ||
</ColumnLayout> | ||
</Container> | ||
</SpaceBetween> | ||
), | ||
}, | ||
]} | ||
/> | ||
} | ||
contentType="wizard" | ||
connorlanigan marked this conversation as resolved.
Show resolved
Hide resolved
|
||
/> | ||
</ScreenshotArea> | ||
); | ||
} |
Oops, something went wrong.
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.