Skip to content

Commit

Permalink
Merge branch 'master' into staging
Browse files Browse the repository at this point in the history
  • Loading branch information
campb303 authored Mar 16, 2021
2 parents f033e3e + 5b15bd2 commit 60e754e
Show file tree
Hide file tree
Showing 9 changed files with 109 additions and 121 deletions.
41 changes: 41 additions & 0 deletions .github/ISSUE_TEMPLATE/bug-report----.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
---
name: "Bug Report \U0001F41B "
about: Create a bug report for webqueue2.
title: ''
labels: bug
assignees: ''

---

<!-- Provide a general summary of the issue in the Title above -->

<!--
Thank you very much for contributing to webqueue2 by creating an issue! ❤️
To avoid duplicate issues we ask you to check off the following list.
-->

<!-- Checked checkbox should look like this: [x] -->

- [ ] I have searched the [issues](https://github.itap.purdue.edu/ECN/webqueue2/issues) of this repository and believe that this is not a duplicate.

## What Happened
<!--Describe the issue in detail-->


## Expected Behavior
<!--Explain how what happened is different from what you wanted to happen-->


## Steps to Reproduce
<!--Explain the exact steps one would take to experience the issue. If applicable, add screenshots or screen recordings.-->
1.
2.
3.


### Logs
<!-- If applicable, please share logs or error messages. (This only applies to people using the API, not webqueue2 in the browser)
-->


<!--Please be sure to preview your issue before saving. Thanks!-->
33 changes: 33 additions & 0 deletions .github/ISSUE_TEMPLATE/feature-request---.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
---
name: "Feature Request \U0001F4EE"
about: Suggest a new idea for the project
title: ''
labels: feature-request
assignees: ''

---

<!-- Provide a description of the feature in the Title above -->

<!--
Thank you very much for contributing to webqueue2 by creating an issue! ❤️
To avoid duplicate issues we ask you to check off the following list.
-->

<!-- Checked checkbox should look like this: [x] -->

- [ ] I have searched the [issues](https://github.itap.purdue.edu/ECN/webqueue2/issues) of this repository and believe that this is not a duplicate.

## Problem
<!-- Describe the problem that this new feature or idea is meant to address. Include screen recording/screen shots where applicable. -->


## Proposal
<!-- Describe the new feature or idea that you would like to propose. -->


### Examples
<!-- List any supporting examples of how others have implemented this feature. Add screenshots/webpages where applicable. -->


<!--Please be sure to preview your issue before saving. Thanks!-->
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# webqueue2
A re-write of Purdue ECN's webqueue
# webqueue2 Frontend
A ReactJS based web app to interact with the [webqueue2 API](https://github.itap.purdue.edu/ECN/webqueue2-api)

![UI Snapshot](./docs/UI%20Snapshots/UI-Snapshot%202020-12-03%20at%208.10.32%20PM.png)

Expand Down
41 changes: 30 additions & 11 deletions src/components/ItemBodyView/ItemBodyView.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from "react";
import PropTypes from "prop-types";
import { Timeline, TimelineItem, TimelineSeparator, TimelineConnector, TimelineContent, TimelineDot } from '@material-ui/lab';
import { makeStyles } from "@material-ui/core";
import { Typography, makeStyles } from "@material-ui/core";
import DirectoryInformation from "../DirectoryInformation/";
import Assignment from "../Assignment/";
import TimelineActionCard from "../TimelineActionCard/";
Expand Down Expand Up @@ -38,23 +38,42 @@ export default function ItemBodyView({ sections, loading }) {
const generateTimelineItem = (section) => {
switch (section.type) {
case "directory_information":
return <DirectoryInformation section={section} />
return (
<DirectoryInformation section={section} />
);
case "initial_message":
return <MessageView {...section} />
return (
<>
<MessageView {...section} />
</>
);
case "edit":
return <TimelineActionCard {...section} />
return (
<TimelineActionCard {...section} />
);
case "status":
return <TimelineActionCard {...section} />
return (
<>
<Typography variant="subtitle2">
{`${section.by} update the status to at ${Date(section.datetime)}`}
</Typography>
{section.content.map((line) => <Typography variant="body1">{line}</Typography>)}
</>
);
case "assignment":
return <Assignment {...section} />
return (
<Assignment {...section} />
);
case "reply_to_user":
return <TimelineActionCard {...section} />
return (
<TimelineActionCard {...section} />
);
case "reply_from_user":
return <MessageView {...section} />
case "parse_error":
return <ParseError {...section} />
return (
<MessageView {...section} />
);
default:
return `No match found for type: ${section.type}`;
return "No Match Found";
};
};

Expand Down
61 changes: 0 additions & 61 deletions src/components/ParseError/ParseError.js

This file was deleted.

36 changes: 0 additions & 36 deletions src/components/ParseError/ParseError.md

This file was deleted.

1 change: 0 additions & 1 deletion src/components/ParseError/index.js

This file was deleted.

8 changes: 2 additions & 6 deletions src/components/TimelineActionCard/TimelineActionCard.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,6 @@ export default function TimelineActionCard({ type, datetime, by, content }){
"reply_to_user": {
"verbage": "replied",
"coloring": theme.palette.reply_to_user.main
},
"status": {
"verbage": "updated the status",
"coloring": theme.palette.status.main
}
}

Expand Down Expand Up @@ -58,9 +54,9 @@ TimelineActionCard.propTypes = {
]),
/** ISO 8601 formatted time string. */
"datetime": PropTypes.string.isRequired,
/** The name of the person who added the action. */
/** The name of the person who added the edit. */
"by": PropTypes.string.isRequired,
/** An array of strings containing the content of the action. */
/** An array of strings containing the content of the edit. */
"content": PropTypes.array.isRequired
};

Expand Down
5 changes: 1 addition & 4 deletions src/theme.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,8 @@ export default function theme(darkMode = false) {
"reply_to_user": {
main: "rgba(99, 125, 255, 0.2)",
},
"status": {
"reply_from_user": {
main: "rgba(99, 255, 151, 0.2)",
},
"parse_error": {
main: "rgba(255, 99, 204, 0.2)",
}
},
})
Expand Down

0 comments on commit 60e754e

Please sign in to comment.