| |
@@ -1,13 +1,8 @@
|
| |
- import React, { Component } from "react"
|
| |
+ import React from "react"
|
| |
import SourceLink from './SourceLink'
|
| |
|
| |
- class Timeline extends Component {
|
| |
- constructor(props) {
|
| |
- super(props)
|
| |
- this.state = { schedule: [] }
|
| |
- }
|
| |
-
|
| |
- get_title(summary) {
|
| |
+ const Timeline = props=>{
|
| |
+ const 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."
|
| |
@@ -19,66 +14,62 @@
|
| |
return "Release candidate was accepted (violating no milestone criteria) and was released."
|
| |
}
|
| |
|
| |
- render() {
|
| |
- const line = this.props.data.map((milestone) => {
|
| |
- return (
|
| |
- <td key={"line" + milestone.summary}>
|
| |
- <Line color={milestone.current ? "#2371ae" : "#dcdcdc"} />
|
| |
- </td>
|
| |
- )
|
| |
- })
|
| |
-
|
| |
- const dates = this.props.data.map((milestone) => {
|
| |
- return (
|
| |
- <td key={"dates" + milestone.summary} width="150">
|
| |
- <b>{milestone.date}</b>
|
| |
- </td>
|
| |
- )
|
| |
- })
|
| |
+ const line = props.data.map((milestone) => {
|
| |
+ return (
|
| |
+ <td key={"line" + milestone.summary}>
|
| |
+ <Line color={milestone.current ? "#2371ae" : "#dcdcdc"} />
|
| |
+ </td>
|
| |
+ )
|
| |
+ })
|
| |
|
| |
- const schedule = this.props.data.map((milestone) => {
|
| |
- return (
|
| |
- <td
|
| |
- key={"schedule" + milestone.summary}
|
| |
- title={this.get_title(milestone.summary)}
|
| |
- width="150">
|
| |
- {milestone.summary} <i className="fas fa-question-circle light"></i>
|
| |
- </td>
|
| |
- )
|
| |
- })
|
| |
+ const dates = props.data.map((milestone) => {
|
| |
return (
|
| |
- <div>
|
| |
- <h1 className="padded">
|
| |
- Current development schedule{" "}
|
| |
- <SourceLink href="https://fedorapeople.org/groups/schedule/" />
|
| |
- </h1>
|
| |
- <div className="table-responsive">
|
| |
- <table className="timeline">
|
| |
- <tbody>
|
| |
- <tr>{line}</tr>
|
| |
- <tr>{dates}</tr>
|
| |
- <tr>{schedule}</tr>
|
| |
- </tbody>
|
| |
- </table>
|
| |
- </div>
|
| |
- </div>
|
| |
+ <td key={"dates" + milestone.summary} width="150">
|
| |
+ <b>{milestone.date}</b>
|
| |
+ </td>
|
| |
)
|
| |
- }
|
| |
- }
|
| |
+ })
|
| |
|
| |
- class Line extends Component {
|
| |
- render() {
|
| |
- const lineStyle = {
|
| |
- stroke: this.props.color,
|
| |
- strokeWidth: "3",
|
| |
- }
|
| |
+ const schedule = props.data.map((milestone) => {
|
| |
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>
|
| |
+ <td
|
| |
+ key={"schedule" + milestone.summary}
|
| |
+ title={get_title(milestone.summary)}
|
| |
+ width="150">
|
| |
+ {milestone.summary} <i className="fas fa-question-circle light"></i>
|
| |
+ </td>
|
| |
)
|
| |
+ })
|
| |
+
|
| |
+ return (
|
| |
+ <div>
|
| |
+ <h1 className="padded">
|
| |
+ Current development schedule{" "}
|
| |
+ <SourceLink href="https://fedorapeople.org/groups/schedule/" />
|
| |
+ </h1>
|
| |
+ <div className="table-responsive">
|
| |
+ <table className="timeline">
|
| |
+ <tbody>
|
| |
+ <tr>{line}</tr>
|
| |
+ <tr>{dates}</tr>
|
| |
+ <tr>{schedule}</tr>
|
| |
+ </tbody>
|
| |
+ </table>
|
| |
+ </div>
|
| |
+ </div>
|
| |
+ )
|
| |
+ }
|
| |
+ const Line = props=>{
|
| |
+ const lineStyle = {
|
| |
+ stroke: 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
|
| |
Here's the link to the issue I worked on : https://pagure.io/fedora-qa/landingpage/issue/49. All class components was converted to functional components also, redundant codes were also removed.