-
Notifications
You must be signed in to change notification settings - Fork 1.1k
feat(composer): v0.9 theater, gallery fixes, and renderer improvements #1144
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
Open
GeneralJerel
wants to merge
16
commits into
google:main
Choose a base branch
from
GeneralJerel:feat/composer-v09-theater-and-cleanup
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
f6d1d04
feat(composer): v0.9 theater data, JSON Pretty tab, drop v0.8 support
GeneralJerel 01c8cd6
fix(composer): rename sidebar nav entry and set v0.9 primary color
GeneralJerel d1ad6dd
fix(renderer): prevent card right-edge clipping in v0.9 React renderer
GeneralJerel bd8e46b
feat(renderer): implement weight property and improve card layout
GeneralJerel 84bb2f8
fix(renderer): replace <caption> with <span> for Text caption variant
GeneralJerel fcc14fb
fix(renderer): convert camelCase icon names to snake_case and add mar…
GeneralJerel 12f0cb8
feat(composer): replace favicon with CopilotKit logo mark
GeneralJerel 40b89ec
fix(gallery): simplify financial data grid and reduce recipe card height
GeneralJerel 994b65e
fix(gallery): prevent card content overflow in gallery previews
GeneralJerel 682d257
fix(renderer): add overflow hidden to Card component
GeneralJerel 4e12a1d
fix(renderer,composer): address PR #1144 code review findings
GeneralJerel 8e64c42
fix(gallery): improve invitation builder layout and add heading styles
GeneralJerel 9fcb685
fix(renderer): address ditman review — ICON_MAP, CHANGELOG, restore d…
GeneralJerel 3bd5c98
refactor(renderer): move weight handling from adapter into basic cata…
GeneralJerel d7e989f
fix(gallery): scope CSS layout fixes to financial-data-grid and invit…
GeneralJerel a0cad0b
refactor(composer): rename Basic Components to Basic Catalog
GeneralJerel 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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -17,7 +17,7 @@ | |
| import React from 'react'; | ||
| import {createComponentImplementation} from '../../../adapter'; | ||
| import {ImageApi} from '@a2ui/web_core/v0_9/basic_catalog'; | ||
| import {getBaseLeafStyle} from '../utils'; | ||
| import {getBaseLeafStyle, withWeight} from '../utils'; | ||
|
|
||
| export const Image = createComponentImplementation(ImageApi, ({props}) => { | ||
| const mapFit = (fit?: string): React.CSSProperties['objectFit'] => { | ||
|
|
@@ -28,7 +28,9 @@ export const Image = createComponentImplementation(ImageApi, ({props}) => { | |
| const style: React.CSSProperties = { | ||
| ...getBaseLeafStyle(), | ||
| objectFit: mapFit(props.fit), | ||
| width: '100%', | ||
| // Subtract left + right LEAF_MARGIN (8px each) so the image doesn't overflow its parent. | ||
| width: `calc(100% - ${2 * 8}px)`, | ||
|
Collaborator
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. What are these 8px? Is this to offset the margin from the base leaf style? |
||
| minWidth: 0, | ||
| height: 'auto', | ||
| display: 'block', | ||
| }; | ||
|
|
@@ -47,7 +49,8 @@ export const Image = createComponentImplementation(ImageApi, ({props}) => { | |
| } else if (props.variant === 'header') { | ||
| style.height = '200px'; | ||
| style.objectFit = 'cover'; | ||
| style.borderRadius = '8px'; | ||
| } | ||
|
|
||
| return <img src={props.url} alt={props.description || ''} style={style} />; | ||
| return withWeight(<img src={props.url} alt={props.description || ''} style={style} />, props.weight); | ||
| }); | ||
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.
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.
Isn't this the default?