Skip to content

Commit 5182ff4

Browse files
authored
feat(a2ui-playground): add logo for playground (#2670)
<!-- Thank you for submitting a pull request! We appreciate the time and effort you have invested in making these changes. Please ensure that you provide enough information to allow others to review your pull request. Upon submission, your pull request will be automatically assigned with reviewers. If you want to learn more about contributing to this project, please visit: https://github.com/lynx-family/lynx-stack/blob/main/CONTRIBUTING.md. --> <!-- The AI summary below will be auto-generated - feel free to replace it with your own. --> <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Added a themed logo to the app header with light and dark variants based on current theme selection. * **Style** * Added page favicon displayed in browser tabs. * Improved spacing and layout of the brand area header. <!-- review_stack_entry_start --> [![Review Change Stack](https://storage.googleapis.com/coderabbit_public_assets/review-stack-in-coderabbit-ui.svg)](https://app.coderabbit.ai/change-stack/lynx-family/lynx-stack/pull/2670?utm_source=github_walkthrough&utm_medium=github&utm_campaign=change_stack) <!-- review_stack_entry_end --> <!-- end of auto-generated comment: release notes by coderabbit.ai --> ## Checklist <!--- Check and mark with an "x" --> - [ ] Tests updated (or not required). - [ ] Documentation updated (or not required). - [ ] Changeset added, and when a BREAKING CHANGE occurs, it needs to be clearly marked (or not required).
1 parent 97e74b4 commit 5182ff4

3 files changed

Lines changed: 33 additions & 1 deletion

File tree

packages/genui/a2ui-playground/rsbuild.config.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,17 @@ export default defineConfig({
173173
},
174174
html: {
175175
title: 'Lynx A2UI Playground',
176+
tags: [
177+
{
178+
tag: 'link',
179+
attrs: {
180+
rel: 'icon',
181+
type: 'image/svg+xml',
182+
href:
183+
'https://lf-lynx.tiktok-cdns.com/obj/lynx-artifacts-oss-sg/lynx-website/assets/lynx-dark-logo.svg',
184+
},
185+
},
186+
],
176187
},
177188
output: {
178189
assetPrefix: process.env.ASSET_PREFIX,

packages/genui/a2ui-playground/src/App.tsx

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,11 @@ import { PlaybackPage } from './pages/PlaybackPage.js';
1919
import type { Protocol, ProtocolName } from './utils/protocol.js';
2020
import { DEFAULT_PROTOCOL, getProtocol } from './utils/protocol.js';
2121

22+
const LYNX_LIGHT_LOGO =
23+
'https://lf-lynx.tiktok-cdns.com/obj/lynx-artifacts-oss-sg/lynx-website/assets/lynx-dark-logo.svg';
24+
const LYNX_DARK_LOGO =
25+
'https://lf-lynx.tiktok-cdns.com/obj/lynx-artifacts-oss-sg/lynx-website/assets/lynx-light-logo.svg';
26+
2227
type Tab = 'create' | 'examples' | 'components' | 'playback';
2328

2429
interface TabDef {
@@ -191,7 +196,14 @@ export function App() {
191196
return (
192197
<div className='appShell'>
193198
<div className='topBar'>
194-
<span className='brand'>Lynx GenUI Playground</span>
199+
<div className='brandGroup'>
200+
<img
201+
className='brandLogo'
202+
src={theme === 'dark' ? LYNX_DARK_LOGO : LYNX_LIGHT_LOGO}
203+
alt='Lynx'
204+
/>
205+
<span className='brand'>Lynx GenUI Playground</span>
206+
</div>
195207

196208
<nav className='tabNav'>
197209
{tabs.map((t) => (

packages/genui/a2ui-playground/src/styles.css

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,9 +141,18 @@ a {
141141
.brandGroup {
142142
display: flex;
143143
align-items: center;
144+
gap: 10px;
144145
flex-shrink: 0;
145146
}
146147

148+
.brandLogo {
149+
width: 26px;
150+
height: 26px;
151+
display: block;
152+
flex: 0 0 auto;
153+
object-fit: contain;
154+
}
155+
147156
.protocolSelect {
148157
height: 30px;
149158
padding: 0 28px 0 10px;

0 commit comments

Comments
 (0)