generated from openmcp-project/repository-template
-
Notifications
You must be signed in to change notification settings - Fork 3
feat: add Bento style to MCP page #288
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
Lasserich
wants to merge
41
commits into
main
Choose a base branch
from
ft/bento
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 29 commits
Commits
Show all changes
41 commits
Select commit
Hold shift + click to select a range
d30f255
feat: try formatting
Lasserich f7678d6
feat: demo bento layout
Lasserich dbe7eb2
add white color background to graph
GenosseOtt fe8f24e
Merge branch 'main' into ft/bento
Lasserich 94661aa
fix: first bento layout
Lasserich 039ae27
fix: layout
Lasserich cfa2774
fix: show graph
Lasserich aecdc74
feat: style graph
Lasserich deb8cca
feat: some restructuring
Lasserich acc9f79
feat: maxWidth
Lasserich edc4c7d
feat: components fill Bento
Lasserich 1757143
Merge branch 'main' into ft/bento
Lasserich f6f3080
fix: zindex & shadow
Lasserich 3b5bcf0
feat: add expand button
Lasserich 646da2b
fix: move button
Lasserich 67a781c
feat: fix sizing
Lasserich f5cee53
feat: show flux graph
Lasserich 4bc3bec
fix: panning
Lasserich ae327e0
feat: add kyverno and eso
Lasserich 2e950b0
fix: length of charts
Lasserich e2fbf53
feat: providers distribution bar for crossplane
Lasserich bb3e5fe
fix: enable flux
Lasserich 2159066
fix: reduce shadows and doubled edges
Lasserich 34bd323
feat: fix graph view
Lasserich 4bd22eb
feat: member card
Lasserich f2f2aca
feat: some formatting
Lasserich d0bddfd
chore: cleanup
Lasserich e605b1f
Merge branch 'main' into ft/bento
Lasserich 3f089f0
fix: linting
Lasserich e0c0fb1
fix: linting
Lasserich 6aa5508
fix: unit tests
Lasserich 488cdde
Update public/locales/en.json
Lasserich c7912ae
reploace login image (light & dark)
GenosseOtt 3fb1ca1
adjust border radius
GenosseOtt a626b5c
adjust label
GenosseOtt 8d52c39
cleanup icon
GenosseOtt 7c0dfc5
favicon cleanups
GenosseOtt 7fd9475
feat: refactor code
Lasserich c8183a0
Merge branch 'ft/bento' of https://github.com/openmcp-project/ui-fron…
Lasserich b8931c7
feat: enable clean code structure, enable secondary labels
Lasserich 0573f8c
feat: leave fine tuning for now
Lasserich 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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
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,92 @@ | ||
| /* Bento Grid Layout - 12 columns x 6 rows */ | ||
| .bentoGrid { | ||
| display: grid; | ||
| grid-template-columns: repeat(12, 1fr); | ||
| grid-template-rows: repeat(6, 1fr); | ||
| gap: 24px; | ||
| width: 100%; | ||
| height: 600px; /* Fixed height for the entire grid */ | ||
| position: relative; | ||
| } | ||
|
|
||
| /* Base card styling */ | ||
| .bentoCard { | ||
| border-radius: 18px; /* Increased to match or slightly exceed ui5-card */ | ||
| overflow: hidden; | ||
| background: var(--sapTile_Background); | ||
| border: 1px solid var(--sapTile_BorderColor); | ||
| box-shadow: var(--sapContent_Shadow0); /* Reduced shadow intensity */ | ||
| transition: all 0.3s ease; | ||
| display: flex; | ||
| flex-direction: column; | ||
| position: relative; | ||
| } | ||
|
|
||
| .bentoCard:hover { | ||
| box-shadow: var(--sapContent_Shadow1); /* Reduced hover shadow intensity */ | ||
| transform: translateY(-2px); | ||
| } | ||
|
|
||
| /* Card sizes are explicitly positioned via gridColumn/gridRow props */ | ||
| /* Layout: | ||
| - Left: Extra large graph (8 cols x 4 rows) + Large crossplane (8 cols x 2 rows) | ||
| - Right: Two medium GitOps (4 cols x 2 rows each) + Two small underneath (2 cols x 2 rows each) | ||
| */ | ||
|
|
||
| /* Fallback positioning for cards in case the layout breaks */ | ||
| .card-small { | ||
| grid-column: span 2; | ||
| grid-row: span 2; | ||
| } | ||
|
|
||
| .card-medium { | ||
| grid-column: span 3; | ||
| grid-row: span 2; | ||
| } | ||
|
|
||
| /* Dark theme support */ | ||
| @media (prefers-color-scheme: dark) { | ||
| .bentoCard { | ||
| background: var(--sapTile_Background); | ||
| border-color: var(--sapTile_BorderColor); | ||
| } | ||
| } | ||
|
|
||
| /* Responsive behavior - simplified as requested */ | ||
| @media (max-width: 768px) { | ||
| .bentoGrid { | ||
| grid-template-columns: repeat(6, 1fr); | ||
| grid-template-rows: repeat(10, 1fr); | ||
| height: 1000px; | ||
| } | ||
|
|
||
| .card-extra-large { | ||
| grid-column: 1 / 7; | ||
| grid-row: 1 / 5; | ||
| } | ||
|
|
||
| .card-large { | ||
| grid-column: 1 / 7; | ||
| grid-row: 5 / 7; | ||
| } | ||
|
|
||
| .card-medium:nth-of-type(3) { | ||
| grid-column: 1 / 7; | ||
| grid-row: 7 / 9; | ||
| } | ||
|
|
||
| .card-medium:nth-of-type(4) { | ||
| grid-column: 1 / 7; | ||
| grid-row: 9 / 11; | ||
| } | ||
|
|
||
| .card-small:nth-of-type(5) { | ||
| grid-column: 1 / 4; | ||
| grid-row: 11 / 13; | ||
| } | ||
|
|
||
| .card-small:nth-of-type(6) { | ||
| grid-column: 4 / 7; | ||
| grid-row: 11 / 13; | ||
| } | ||
| } |
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,35 @@ | ||
| import React from 'react'; | ||
| import styles from './BentoGrid.module.css'; | ||
|
|
||
| export type CardSize = 'small' | 'medium' | 'large' | 'extra-large'; | ||
|
|
||
| export interface BentoCardProps { | ||
| size: CardSize; | ||
| children: React.ReactNode; | ||
| className?: string; | ||
| gridColumn?: string; | ||
| gridRow?: string; | ||
| } | ||
|
|
||
| export interface BentoGridProps { | ||
| children: React.ReactNode; | ||
| className?: string; | ||
| } | ||
|
|
||
| export const BentoCard: React.FC<BentoCardProps> = ({ size, children, className = '', gridColumn, gridRow }) => { | ||
| const cardClass = `${styles.bentoCard} ${styles[`card-${size}`]} ${className}`; | ||
|
|
||
| const style: React.CSSProperties = {}; | ||
| if (gridColumn) style.gridColumn = gridColumn; | ||
| if (gridRow) style.gridRow = gridRow; | ||
|
|
||
| return ( | ||
| <div className={cardClass} style={style}> | ||
| {children} | ||
| </div> | ||
| ); | ||
| }; | ||
|
|
||
| export const BentoGrid: React.FC<BentoGridProps> = ({ children, className = '' }) => { | ||
| return <div className={`${styles.bentoGrid} ${className}`}>{children}</div>; | ||
| }; |
131 changes: 131 additions & 0 deletions
131
src/components/BentoGrid/ComponentCard/ComponentCard.module.css
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,131 @@ | ||
| .container { | ||
| position: relative; | ||
| width: 100%; | ||
| height: 100%; | ||
| display: flex; | ||
| flex-direction: column; | ||
| } | ||
|
|
||
| .card { | ||
| height: 100%; | ||
| display: flex; | ||
| flex-direction: column; | ||
| } | ||
|
|
||
| .disabled { | ||
| opacity: 0.6; | ||
| user-select: none; | ||
| pointer-events: none; | ||
| } | ||
|
|
||
| .clickable { | ||
| cursor: pointer; | ||
| } | ||
|
|
||
| .disabledOverlay { | ||
| position: absolute; | ||
| top: 0; | ||
| left: 0; | ||
| right: 0; | ||
| bottom: 0; | ||
| background: rgba(0, 0, 0, 0.1); | ||
| z-index: 1; | ||
| pointer-events: none; | ||
| } | ||
|
|
||
| .avatar { | ||
| width: 50px; | ||
| height: 50px; | ||
| border-radius: 50%; | ||
| background: transparent; | ||
| object-fit: cover; | ||
| } | ||
|
|
||
| .contentContainer { | ||
| display: flex; | ||
| flex-direction: column; | ||
| align-items: center; | ||
| justify-content: center; | ||
| padding: 0.5rem 0; | ||
| flex: 1; | ||
| } | ||
|
|
||
| .contentContainerMultiple { | ||
| display: flex; | ||
| flex-direction: column; | ||
| align-items: center; | ||
| justify-content: center; | ||
| padding: 0.25rem 0; | ||
| flex: 1; | ||
| } | ||
|
|
||
| .progressBarContainer { | ||
| display: flex; | ||
| gap: 8px; | ||
| width: 100%; | ||
| max-width: 500px; | ||
| padding: 0 0.5rem; | ||
| } | ||
|
|
||
| .progressBarContainerSmall { | ||
| display: flex; | ||
| gap: 8px; | ||
| width: 100%; | ||
| max-width: 400px; | ||
| padding: 0 0.5rem; | ||
| } | ||
|
|
||
| .progressBarContainerMedium { | ||
| display: flex; | ||
| gap: 8px; | ||
| width: 100%; | ||
| max-width: 600px; | ||
| padding: 0 0.75rem; | ||
| } | ||
|
|
||
| .progressBarContainerLarge { | ||
| display: flex; | ||
| flex-direction: column; | ||
| gap: 6px; | ||
| width: 100%; | ||
| max-width: none; | ||
| padding: 0 1rem; | ||
| } | ||
|
|
||
| .progressBar { | ||
| width: 100%; | ||
| } | ||
|
|
||
| .activateButton { | ||
| position: absolute; | ||
| top: 16px; | ||
| right: 16px; | ||
| z-index: 2; | ||
| pointer-events: auto; | ||
| } | ||
|
|
||
| .activateButtonClickable { | ||
| cursor: pointer; | ||
| } | ||
|
|
||
| .activateButtonDefault { | ||
| cursor: default; | ||
| } | ||
|
|
||
| .expandButton { | ||
| position: absolute; | ||
| bottom: 8px; | ||
| right: 8px; | ||
| min-width: 32px; | ||
| height: 32px; | ||
| z-index: 10; | ||
| } | ||
|
|
||
| .expandButtonSmall { | ||
| position: absolute; | ||
| bottom: 8px; | ||
| right: 8px; | ||
| min-width: 24px; | ||
| height: 24px; | ||
| z-index: 10; | ||
| } |
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.
There's a typo in 'repsitories'. Should be 'repositories'.
Copilot uses AI. Check for mistakes.