-
Notifications
You must be signed in to change notification settings - Fork 105
docs: introduce (UXC) "patterns" section & add design examples for ShellBar
#7411
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
Changes from all commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
36d5cf3
wip
Lukas742 ec5a3dd
before cleanup
Lukas742 154bfcb
eslint
Lukas742 2973c2e
revert changes in ObjectPage story
Lukas742 f10baec
renovate
Lukas742 d253703
docs
Lukas742 7bac931
update StackBlitz
Lukas742 3b4be7c
Update UXCIntegration.tsx
Lukas742 79bb5eb
Update eslint.config.mjs
Lukas742 ead9958
ci
Lukas742 f3e0280
Update examples.yml
Lukas742 dc4ac55
Update NotificationsPopover.tsx
Lukas742 9768eb4
Update NotificationsPopover.tsx
Lukas742 aed9c17
Update NLShellBar.tsx
Lukas742 d22b115
move `stackblitz/sdk` to `dependencies`
Lukas742 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
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 | ||||
---|---|---|---|---|---|---|
|
@@ -7,10 +7,12 @@ on: | |||||
paths: | ||||||
- 'examples/**/*' | ||||||
- 'templates/**/*' | ||||||
- 'patterns/navigation-layout/**/*' | ||||||
pull_request: | ||||||
paths: | ||||||
- 'examples/**/*' | ||||||
- 'templates/**/*' | ||||||
- 'patterns/navigation-layout/**/*' | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. can be shortened:
Suggested change
|
||||||
|
||||||
jobs: | ||||||
examples: | ||||||
|
@@ -77,3 +79,33 @@ jobs: | |||||
- name: ESLint | ||||||
run: npm run lint --if-present | ||||||
working-directory: templates/${{ matrix.path }} | ||||||
|
||||||
patterns: | ||||||
runs-on: ubuntu-latest | ||||||
strategy: | ||||||
matrix: | ||||||
path: | ||||||
- navigation-layout | ||||||
fail-fast: false | ||||||
steps: | ||||||
- uses: actions/checkout@v4 | ||||||
|
||||||
- uses: actions/setup-node@v4.4.0 | ||||||
with: | ||||||
node-version-file: '.nvmrc' | ||||||
|
||||||
- name: Install | ||||||
run: npm ci | ||||||
working-directory: patterns/${{ matrix.path }} | ||||||
|
||||||
- name: Build | ||||||
run: npm run build | ||||||
working-directory: patterns/${{ matrix.path }} | ||||||
|
||||||
- name: Test | ||||||
run: npm run test --if-present | ||||||
working-directory: patterns/${{ matrix.path }} | ||||||
|
||||||
- name: ESLint | ||||||
run: npm run lint --if-present | ||||||
working-directory: patterns/${{ matrix.path }} |
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,3 @@ | ||
## Design-Compliant Examples | ||
|
||
These examples demonstrate the implementation of design specifications. They primarily illustrate design concepts and mostly do not provide additional functionality. You can reference them to select the appropriate design patterns. |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
import sdk from '@stackblitz/sdk'; | ||
import { useEffect, useRef } from 'react'; | ||
|
||
interface EmbeddedStackBlitzProps { | ||
repoPath: string; | ||
} | ||
|
||
export function EmbeddedStackBlitz({ repoPath }: EmbeddedStackBlitzProps) { | ||
const containerRef = useRef<HTMLDivElement | null>(null); | ||
|
||
useEffect(() => { | ||
const container = containerRef.current; | ||
if (!container) { | ||
return; | ||
} | ||
sdk.embedGithubProject(container, repoPath, { | ||
openFile: 'src/App.tsx', | ||
view: 'editor', | ||
height: '90%', | ||
hideDevTools: true, | ||
terminalHeight: 0, | ||
}); | ||
|
||
return () => { | ||
if (container) { | ||
container.innerHTML = ''; | ||
} | ||
}; | ||
}, [repoPath]); | ||
|
||
return <div ref={containerRef} />; | ||
} | ||
|
||
EmbeddedStackBlitz.displayName = 'EmbeddedStackBlitz'; |
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,11 @@ | ||
import {Footer} from '@sb/components'; | ||
import {Meta} from '@storybook/blocks'; | ||
import UXCIntegration from "./UXCIntegration.js" | ||
|
||
<Meta title="Patterns / UXC Integration"/> | ||
|
||
# UXC Integration | ||
|
||
<UXCIntegration/> | ||
|
||
<Footer/> |
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,26 @@ | ||
import { MessageStrip, ThemeProvider } from '@ui5/webcomponents-react'; | ||
import UXCIntegrationApp from '../patterns/navigation-layout/src/App.js'; | ||
import '../patterns/navigation-layout/src/index.css'; | ||
import { EmbeddedStackBlitz } from '@/docs/EmbeddedStackBlitz.js'; | ||
|
||
function UXCIntegration() { | ||
return ( | ||
<div style={{ height: '80vh', position: 'relative' }}> | ||
<ThemeProvider> | ||
<UXCIntegrationApp | ||
content={ | ||
<> | ||
<MessageStrip hideCloseButton style={{ marginBlockEnd: '0.25rem' }}> | ||
For a full-page view of this pattern, click <b>"Fork on StackBlitz"</b> below to open it in the | ||
standalone StackBlitz editor. | ||
</MessageStrip> | ||
<EmbeddedStackBlitz repoPath="SAP/ui5-webcomponents-react/tree/main/patterns/navigation-layout" /> | ||
</> | ||
} | ||
/> | ||
</ThemeProvider> | ||
</div> | ||
); | ||
} | ||
|
||
export default UXCIntegration; |
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
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
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
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can be shortened to