forked from backstage/backstage
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request backstage#27912 from backstage/canon-layout-compon…
…ents Improve Canon layout components
- Loading branch information
Showing
36 changed files
with
990 additions
and
584 deletions.
There are no files selected for viewing
This file contains 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 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 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 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 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,53 @@ | ||
/* | ||
* Copyright 2024 The Backstage Authors | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
import React from 'react'; | ||
import { RoadmapItem } from './list'; | ||
|
||
export const Roadmap = ({ list }: { list: RoadmapItem[] }) => { | ||
const orderList = ['inProgress', 'notStarted', 'completed']; | ||
return ( | ||
<div className="roadmap"> | ||
{list | ||
.sort( | ||
(a, b) => orderList.indexOf(a.status) - orderList.indexOf(b.status), | ||
) | ||
.map(Item)} | ||
</div> | ||
); | ||
}; | ||
|
||
const Item = ({ | ||
title, | ||
status = 'notStarted', | ||
}: { | ||
title: string; | ||
status: 'notStarted' | 'inProgress' | 'inReview' | 'completed'; | ||
}) => { | ||
return ( | ||
<div className={['roadmap-item', status].join(' ')}> | ||
<div className="left"> | ||
<div className="dot" /> | ||
<div className="title">{title}</div> | ||
</div> | ||
<span className="pill"> | ||
{status === 'notStarted' && 'Not Started'} | ||
{status === 'inProgress' && 'In Progress'} | ||
{status === 'inReview' && 'Ready for Review'} | ||
{status === 'completed' && 'Completed'} | ||
</span> | ||
</div> | ||
); | ||
}; |
This file contains 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,62 @@ | ||
/* | ||
* Copyright 2024 The Backstage Authors | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
export type RoadmapItem = { | ||
title: string; | ||
status: 'notStarted' | 'inProgress' | 'inReview' | 'completed'; | ||
}; | ||
|
||
export const list: RoadmapItem[] = [ | ||
{ | ||
title: 'Remove Vanilla Extract and use pure CSS instead', | ||
status: 'inProgress', | ||
}, | ||
{ | ||
title: 'Add collapsing across breakpoints for the Inline component', | ||
status: 'notStarted', | ||
}, | ||
{ | ||
title: 'Add reversing the order for the Inline component', | ||
status: 'notStarted', | ||
}, | ||
{ | ||
title: 'Set up Storybook', | ||
status: 'completed', | ||
}, | ||
{ | ||
title: 'Set up iconography', | ||
status: 'completed', | ||
}, | ||
{ | ||
title: 'Set up global tokens', | ||
status: 'inProgress', | ||
}, | ||
{ | ||
title: 'Set up theming system', | ||
status: 'inProgress', | ||
}, | ||
{ | ||
title: 'Create first pass at box component', | ||
status: 'completed', | ||
}, | ||
{ | ||
title: 'Create first pass at stack component', | ||
status: 'completed', | ||
}, | ||
{ | ||
title: 'Create first pass at inline component', | ||
status: 'completed', | ||
}, | ||
]; |
This file contains 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,102 @@ | ||
.roadmap { | ||
display: flex; | ||
flex-direction: column; | ||
} | ||
|
||
.roadmap .roadmap-item { | ||
font-family: 'Geist', sans-serif; | ||
display: flex; | ||
align-items: center; | ||
justify-content: space-between; | ||
border-bottom: 1px solid #e0e0e0; | ||
padding: 8px 0px; | ||
} | ||
|
||
.roadmap .roadmap-item .left { | ||
display: flex; | ||
align-items: center; | ||
padding-left: 12px; | ||
gap: 12px; | ||
} | ||
|
||
.roadmap .roadmap-item .dot { | ||
width: 8px; | ||
height: 8px; | ||
border-radius: 50%; | ||
background-color: #e0e0e0; | ||
} | ||
|
||
.roadmap .roadmap-item.notStarted { | ||
color: #000; | ||
} | ||
|
||
.roadmap .roadmap-item.inProgress { | ||
color: #000; | ||
} | ||
|
||
.roadmap .roadmap-item.inReview { | ||
color: #000; | ||
} | ||
|
||
.roadmap .roadmap-item.completed .title { | ||
color: #a2a2a2; | ||
text-decoration: line-through; | ||
} | ||
|
||
.roadmap .roadmap-item.notStarted .dot { | ||
background-color: #d1d1d1; | ||
} | ||
|
||
.roadmap .roadmap-item.inProgress .dot { | ||
background-color: #ffd000; | ||
} | ||
|
||
.roadmap .roadmap-item.inReview .dot { | ||
background-color: #4ed14a; | ||
} | ||
|
||
.roadmap .roadmap-item.completed .dot { | ||
background-color: #4ed14a; | ||
} | ||
|
||
.roadmap .roadmap-item .title { | ||
font-weight: 300; | ||
font-size: 16px; | ||
} | ||
|
||
.roadmap .roadmap-item .pill { | ||
display: inline-flex; | ||
align-items: center; | ||
height: 24px; | ||
padding: 0px 8px; | ||
border-radius: 40px; | ||
font-size: 12px; | ||
font-weight: 600; | ||
margin-left: 8px; | ||
border-style: solid; | ||
border-width: 1px; | ||
} | ||
|
||
.roadmap .roadmap-item.notStarted .pill { | ||
background-color: #f2f2f2; | ||
border-color: #cdcdcd; | ||
color: #888888; | ||
} | ||
|
||
.roadmap .roadmap-item.inProgress .pill { | ||
background-color: #fff2b9; | ||
border-color: #ffd000; | ||
color: #d79927; | ||
} | ||
|
||
.roadmap .roadmap-item.inReview .pill { | ||
background-color: #d7f9d7; | ||
border-color: #4ed14a; | ||
color: #3a9837; | ||
} | ||
|
||
.roadmap .roadmap-item.completed .pill { | ||
background-color: #d7f9d7; | ||
border-color: #4ed14a; | ||
color: #3a9837; | ||
} |
This file contains 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 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 |
---|---|---|
@@ -1 +1,2 @@ | ||
@import './IconLibrary/styles.css'; | ||
@import './Roadmap/styles.css'; |
Oops, something went wrong.