Skip to content

Commit

Permalink
hsitory chat height fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
DilanRamirez committed Oct 13, 2021
1 parent ce3118f commit 19e1c93
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 4 deletions.
8 changes: 4 additions & 4 deletions client/src/components/chat/chat.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -65,12 +65,12 @@ const useStyles = makeStyles((theme) => ({
const MENTOR_COLORS = ["#eaeaea", "#d4e8d9", "#ffebcf", "#f5cccd"];

export function Chat(args: {
height: number;
height?: number;
windowHeight?: number;
width?: string;
bubbleColor?: string;
}): JSX.Element {
const { height, windowHeight, width, bubbleColor } = args;
const { width, bubbleColor } = args;
const styles = useStyles();
const {
mentorType,
Expand Down Expand Up @@ -162,10 +162,10 @@ export function Chat(args: {
>
<List
data-cy="chat-thread"
className={styles.list}
className={[styles.list, "chat-thread"].join(" ")}
style={{
width: shouldDisplayPortrait() ? "100%" : width ? width : "40vw",
height: shouldDisplayPortrait() || windowHeight ? height : "300px",
// height: shouldDisplayPortrait() || windowHeight ? height : "300px",
}}
disablePadding={true}
id="chat-thread"
Expand Down
31 changes: 31 additions & 0 deletions client/src/styles/history-chat-responsive.css
Original file line number Diff line number Diff line change
Expand Up @@ -36,3 +36,34 @@
width: 100%;
}
}

@media screen and (min-height: 1000px) {
.chat-thread {
height: 72vh;
}
}
@media screen and (min-height: 700px) {
.chat-thread {
height: 64vh;
}
}
@media screen and (min-height: 800px) {
.chat-thread {
height: 65vh;
}
}
@media screen and (min-height: 900px) {
.chat-thread {
height: 70vh;
}
}
@media screen and (min-height: 1400px) {
.chat-thread {
height: 72vh;
}
}
@media (min-width: 1650px) {
.chat-thread {
height: 73vh;
}
}
1 change: 1 addition & 0 deletions cypress/cypress/integration/history.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ describe("Chat History (Video Mentors)", () => {

it("displays questions that have been asked via input", () => {
visitAsGuestWithDefaultSetup(cy, "/");

cy.get("[data-cy=header]").should("have.attr", "data-mentor", "clint");
cy.get("[data-cy=history-tab]").trigger("mouseover").click();
cy.get("[data-cy=input-field]").type("Hello");
Expand Down

0 comments on commit 19e1c93

Please sign in to comment.