From 7009dcc006edec1f9df8e3549f441894a89bff3a Mon Sep 17 00:00:00 2001 From: manisha Date: Jul 28 2021 15:52:11 +0000 Subject: [PATCH 1/2] This is a combination of 4 commits. modified landing page --- diff --git a/src/actions/reduxActions.js b/src/actions/reduxActions.js index bd40230..1c96a21 100644 --- a/src/actions/reduxActions.js +++ b/src/actions/reduxActions.js @@ -80,3 +80,8 @@ export const updateWizardApiCallStatus = (status) => ({ type: ActionTypes.UPDATE_WIZARD_API_CALL_STATUS, payload: status, }) + +export const toggleLandingPageModal = (status) => ({ + type: ActionTypes.TOGGLE_LANDING_PAGE_MODAL, + payload: status, +}) diff --git a/src/constants/index.js b/src/constants/index.js index f1b837e..7b60f04 100644 --- a/src/constants/index.js +++ b/src/constants/index.js @@ -5,4 +5,5 @@ export default { LOAD_WIZARD_DATA_RESP: "LOAD_WIZARD_DATA_RESP", UPDATE_LANDING_PAGE_API_CALL_STATUS: "UPDATE_LANDING_PAGE_API_CALL_STATUS", UPDATE_WIZARD_API_CALL_STATUS: "UPDATE_WIZARD_API_CALL_STATUS", + TOGGLE_LANDING_PAGE_MODAL: "TOGGLE_LANDING_PAGE_MODAL", } diff --git a/src/index.css b/src/index.css index 780fc07..44491a1 100644 --- a/src/index.css +++ b/src/index.css @@ -56,9 +56,15 @@ h1 { .padded { padding-top: 0.5em; + padding-bottom: 0.5em; font-weight: normal; } +.pad { + margin-top: 1.8em; + margin-bottom: 0.4em; +} + .timeline { border-spacing: 0; border-collapse: collapse; @@ -155,6 +161,12 @@ ol.steps > li { margin-bottom: 1.5em; } +.minutes { + margin-left: 0.5em; + margin-bottom: 0.5em; + padding-left: 4px; +} + .date { width: 3.7em; margin-right: 1.5em; diff --git a/src/landingpage/LandingPage.js b/src/landingpage/LandingPage.js index f95ebed..d55e734 100644 --- a/src/landingpage/LandingPage.js +++ b/src/landingpage/LandingPage.js @@ -17,7 +17,7 @@ import Blockers from "./Blockers" import Minutes from "./Minutes" import * as R from "ramda" import { shallowEqual, useDispatch, useSelector } from "react-redux" -import { loadData } from "../actions/reduxActions" +import { loadData, toggleLandingPageModal } from "../actions/reduxActions" import Cookies from "universal-cookie" const LandingPage = () => { @@ -40,11 +40,11 @@ const LandingPage = () => { stable: 0, config_mode: false, enabled_components: enabled_components, - showModal: false, }) const selectAction = (state) => state.landing_page.api_call_status const api_call_status = useSelector(selectAction, shallowEqual) + const showModal = useSelector((state) => state.landing_page_controls.showModal, shallowEqual) const dispatch = useDispatch() const landingPageData = useSelector((state) => state.landing_page) @@ -68,16 +68,13 @@ const LandingPage = () => { } const toggleModal = () => { - let modalState = !state.showModal - setState({ - ...state, - showModal: modalState, - }) + let modalState = !showModal + dispatch(toggleLandingPageModal(modalState)) } const available_components_mapper = { events: , - blockers: , + blockers: , minutes: , } let components = R.splitEvery( @@ -87,7 +84,7 @@ const LandingPage = () => { components = components.map((row) => ( {row.map((item) => ( -
+
{available_components_mapper[item]}
))} @@ -110,11 +107,8 @@ const LandingPage = () => { {components} -
- - +
+ Visibility Configuration {available_components.map((item) => ( @@ -128,7 +122,7 @@ const LandingPage = () => { checked={state.enabled_components.includes(item)} onChange={(e) => handleVisibilityChange(e, item)} />{" "} -
-
-

- Have some spare time? Click on below button to contibute -

-
-
+
- Explore + Click here, and help us make Fedora better!
diff --git a/src/landingpage/Minutes.js b/src/landingpage/Minutes.js index 297ba37..57d4249 100644 --- a/src/landingpage/Minutes.js +++ b/src/landingpage/Minutes.js @@ -1,14 +1,21 @@ import React from "react" import { Card, CardBody } from "reactstrap" - const Events = (props) => { + const old = props.data.date + + let date = old.slice(0, 10) + let time = old.slice(11, 16) + + const timing = time.replace(".", ":") + const dating = new Date(date).toDateString() + return ( - +

Fedora QA Meeting Minutes

-
+
- Latest minutes from {props.data.date} + Latest minutes from {dating} {timing}
Visit{" "} diff --git a/src/landingpage/Timeline.js b/src/landingpage/Timeline.js index b68bc2b..0ebeb64 100644 --- a/src/landingpage/Timeline.js +++ b/src/landingpage/Timeline.js @@ -1,8 +1,12 @@ -import React from "react" -import { Card, CardBody } from "reactstrap" +import React, { useState } from "react" +import { Card, CardBody, Tooltip } from "reactstrap" import SourceLink from "./SourceLink" const Timeline = (props) => { + const [tooltipOpen, setTooltipOpen] = useState(false) + + const toggle = () => setTooltipOpen(!tooltipOpen) + const get_title = (summary) => { summary = summary.toLowerCase() if (summary.includes("freeze")) @@ -42,8 +46,18 @@ const Timeline = (props) => {
-

+

Current development schedule{" "} + + + + + This is a timeline of current Fedora release schedule + {" "}

@@ -55,7 +69,6 @@ const Timeline = (props) => {
-
This is about the development schedule
diff --git a/src/landingpage/common/BugStats.js b/src/landingpage/common/BugStats.js index 015de59..56e8291 100644 --- a/src/landingpage/common/BugStats.js +++ b/src/landingpage/common/BugStats.js @@ -5,12 +5,12 @@ const BugStats = (props) => { const { milestone, stats } = props return ( -
- +
+
@@ -19,19 +19,19 @@ const BugStats = (props) => { <> - + - + - + - + )} diff --git a/src/layout/Masthead.js b/src/layout/Masthead.js index 4fac37c..6b54173 100644 --- a/src/layout/Masthead.js +++ b/src/layout/Masthead.js @@ -4,7 +4,7 @@ import { Container, NavbarBrand, Navbar, Button } from "reactstrap" import { API_CALL_STATUS_VALUES } from "../constants/ProjectConstants" import { ROUTE } from "../constants/Routes" import logo from "./logo.png" -import { loadData, loadWizardData } from "../actions/reduxActions" +import { loadData, loadWizardData, toggleLandingPageModal } from "../actions/reduxActions" import { shallowEqual, useDispatch, useSelector } from "react-redux" const selectWizardFromStore = (state) => state.wizard.api_call_status @@ -16,6 +16,7 @@ const Masthead = () => { const wizard_api_call_status = useSelector(selectWizardFromStore, shallowEqual) const landing_page_api_call_status = useSelector(selectLandingPageFromStore, shallowEqual) + const showModal = useSelector((state) => state.landing_page_controls.showModal, shallowEqual) const api_call_status = () => { if (ROUTE.LANDING_PAGE === location.pathname) { @@ -42,6 +43,11 @@ const Masthead = () => { dispatch(retryFn()) } + const toggleModal = () => { + let modalState = !showModal + dispatch(toggleLandingPageModal(modalState)) + } + return ( @@ -80,6 +86,11 @@ const Masthead = () => { )} )} + {ROUTE.LANDING_PAGE === location.pathname && ( + + )} diff --git a/src/reducers/index.js b/src/reducers/index.js index 5551055..c1dad6b 100644 --- a/src/reducers/index.js +++ b/src/reducers/index.js @@ -18,6 +18,9 @@ const defaultState = { all_actions: [], api_call_status: null, }, + landing_page_controls: { + showModal: false, + }, } export default (state = defaultState, action) => { @@ -30,7 +33,6 @@ export default (state = defaultState, action) => { ...action.payload, }, } - case ActionTypes.LOAD_WIZARD_DATA_RESP: return { ...state, @@ -57,6 +59,13 @@ export default (state = defaultState, action) => { api_call_status: action.payload, }, } + case ActionTypes.TOGGLE_LANDING_PAGE_MODAL: + return { + ...state, + landing_page_controls: { + showModal: action.payload, + }, + } default: return { ...state, From e914ca08c56d24a8f4eba8ec07ceb0a96aa8efab Mon Sep 17 00:00:00 2001 From: manisha Date: Jul 28 2021 17:00:20 +0000 Subject: [PATCH 2/2] solved conflicts --- diff --git a/src/landingpage/Events.js b/src/landingpage/Events.js index 0c5d3c1..4b3f87e 100644 --- a/src/landingpage/Events.js +++ b/src/landingpage/Events.js @@ -31,7 +31,9 @@ const Events = (props) => { Meetings and testdays in the next 7 days{" "} -
{meetings}
+
+ {meetings} + ) diff --git a/src/landingpage/LandingPage.js b/src/landingpage/LandingPage.js index d55e734..7f2b89f 100644 --- a/src/landingpage/LandingPage.js +++ b/src/landingpage/LandingPage.js @@ -84,9 +84,9 @@ const LandingPage = () => { components = components.map((row) => ( {row.map((item) => ( -
+
{available_components_mapper[item]} - + ))} )) @@ -98,16 +98,16 @@ const LandingPage = () => {
-
+
- + {components} -
+
Visibility Configuration @@ -140,17 +140,17 @@ const LandingPage = () => { - + -
+
Click here, and help us make Fedora better! - + diff --git a/src/landingpage/common/BugStats.js b/src/landingpage/common/BugStats.js index 56e8291..30aa810 100644 --- a/src/landingpage/common/BugStats.js +++ b/src/landingpage/common/BugStats.js @@ -1,12 +1,12 @@ import React from "react" -import { Table } from "reactstrap" +import { Table, Col } from "reactstrap" const BugStats = (props) => { const { milestone, stats } = props return ( -
-
- {milestone} + {milestone}
Proposed Blockers{stats.blockers_proposed}{stats.blockers_proposed}
Accepted Blockers{stats.blockers}{stats.blockers}
Proposed FEs{stats.fe_proposed}{stats.fe_proposed}
Accepted FEs{stats.fe}{stats.fe}
+ +
@@ -37,7 +37,7 @@ const BugStats = (props) => { )}
-
+ ) } diff --git a/src/wizard/components.js b/src/wizard/components.js index 7e91f72..796886c 100644 --- a/src/wizard/components.js +++ b/src/wizard/components.js @@ -9,6 +9,7 @@ import { ModalBody, ModalFooter, Button, + Col, } from "reactstrap" import uniqueID from "../helpers/uniqueID" @@ -19,10 +20,10 @@ const CollapsableCard = (props) => { -
{title}
-
+ {title} + -
+