| |
@@ -1,5 +1,8 @@
|
| |
import React, { Component } from "react"
|
| |
- import SourceLink from './SourceLink'
|
| |
+ import SourceLink from '../SourceLinks'
|
| |
+ import { get_title } from "./utils";
|
| |
+ import Line from "../Line";
|
| |
+
|
| |
|
| |
class Timeline extends Component {
|
| |
constructor(props) {
|
| |
@@ -7,28 +10,17 @@
|
| |
this.state = { schedule: [] }
|
| |
}
|
| |
|
| |
- get_title(summary) {
|
| |
- summary = summary.toLowerCase()
|
| |
- if (summary.includes("freeze"))
|
| |
- return "At the milestone freeze, pushes from the updates-testing to the stable repository are suspended until the release candidate is accepted."
|
| |
- if (summary === "rawhide")
|
| |
- return "Next Fedora release hasn't been branched yet from rolling release branch."
|
| |
- if (summary.includes("branch"))
|
| |
- return "Next version of Fedora that was 'branched' from the rolling Rawhide tree and in the future will become the next stable Fedora release."
|
| |
- if (summary.includes("release"))
|
| |
- return "Release candidate was accepted (violating no milestone criteria) and was released."
|
| |
- }
|
| |
-
|
| |
render() {
|
| |
- const line = this.props.data.map((milestone) => {
|
| |
+ const { data } = this.props;
|
| |
+ const line = data.map((milestone) => {
|
| |
return (
|
| |
<td key={"line" + milestone.summary}>
|
| |
- <Line color={milestone.current ? "#2371ae" : "#dcdcdc"} />
|
| |
+ <Line color={milestone.current ? "#2371ae" : "#dcdcdc"} strokeWidth='3' />
|
| |
</td>
|
| |
)
|
| |
})
|
| |
|
| |
- const dates = this.props.data.map((milestone) => {
|
| |
+ const dates = data.map((milestone) => {
|
| |
return (
|
| |
<td key={"dates" + milestone.summary} width="150">
|
| |
<b>{milestone.date}</b>
|
| |
@@ -36,11 +28,11 @@
|
| |
)
|
| |
})
|
| |
|
| |
- const schedule = this.props.data.map((milestone) => {
|
| |
+ const schedule = data.map((milestone) => {
|
| |
return (
|
| |
<td
|
| |
key={"schedule" + milestone.summary}
|
| |
- title={this.get_title(milestone.summary)}
|
| |
+ title={get_title(milestone.summary)}
|
| |
width="150">
|
| |
{milestone.summary} <i className="fas fa-question-circle light"></i>
|
| |
</td>
|
| |
@@ -66,19 +58,5 @@
|
| |
}
|
| |
}
|
| |
|
| |
- class Line extends Component {
|
| |
- render() {
|
| |
- const lineStyle = {
|
| |
- stroke: this.props.color,
|
| |
- strokeWidth: "3",
|
| |
- }
|
| |
- return (
|
| |
- <svg width="150" height="20" version="1.1">
|
| |
- <line x1="0" y1="50%" x2="100%" y2="50%" style={lineStyle} />
|
| |
- <circle cx="50%" cy="50%" r="4" style={lineStyle} fill="#f8f9fa" />
|
| |
- </svg>
|
| |
- )
|
| |
- }
|
| |
- }
|
| |
|
| |
export default Timeline
|
| |
In continuation to my PR https://pagure.io/fedora-qa/landingpage/pull-request/31, this PR addresses the following issues as mentioned by me in (#8) https://pagure.io/fedora-qa/landingpage/issue/8#comment-724084
1) Implemented reusable components to clean up the parent components.
2) Changed folder structure.