Skip to content

Commit

Permalink
CSS changes for responsive design (#1646)
Browse files Browse the repository at this point in the history
* initial css changes for responsive design

* run prettier

* Add e2e tests for different sizes

* updated layout with a hamburger menu item

* cleanup and fixed spacing around the login button

* Updating e2e tests for burger menu and title change

* Running prettier

---------

Co-authored-by: Pamela Fox <[email protected]>
Co-authored-by: Pamela Fox <[email protected]>
  • Loading branch information
3 people authored Jul 10, 2024
1 parent f4fb45c commit 1603e94
Show file tree
Hide file tree
Showing 20 changed files with 427 additions and 220 deletions.
2 changes: 1 addition & 1 deletion app/frontend/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<meta charset="UTF-8" />
<link rel="icon" type="image/x-icon" href="/favicon.ico" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>GPT + Enterprise data | Sample</title>
<title>Azure OpenAI + AI Search</title>
</head>
<body>
<div id="root"></div>
Expand Down
30 changes: 15 additions & 15 deletions app/frontend/src/components/AnalysisPanel/AnalysisPanel.module.css
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
.thoughtProcess {
font-family: source-code-pro, Menlo, Monaco, Consolas, "Courier New", monospace;
word-wrap: break-word;
padding-top: 12px;
padding-bottom: 12px;
padding-top: 0.75em;
padding-bottom: 0.75em;
}

.tList {
padding: 20px 20px 0 20px;
padding: 1.25em 1.25em 0 1.25em;
display: inline-block;
background: #e9e9e9;
}

.tListItem {
list-style: none;
margin: auto;
margin-left: 20px;
min-height: 50px;
border-left: 1px dashed #123bb6;
padding: 0 0 30px 30px;
margin-left: 1.25em;
min-height: 3.125em;
border-left: 0.0625em solid #123bb6;
padding: 0 0 1.875em 1.875em;
position: relative;
}

Expand All @@ -40,25 +40,25 @@
.tStep {
color: #123bb6;
position: relative;
font-size: 14px;
margin-bottom: 8px;
font-size: 0.875em;
margin-bottom: 0.5em;
}

.tCodeBlock {
max-height: 300px;
max-height: 18.75em;
}

.tProp {
background-color: #d7d7d7;
color: #333232;
font-size: 12px;
padding: 3px 10px;
border-radius: 10px;
margin-bottom: 8px;
font-size: 0.75em;
padding: 0.1875em 0.625em;
border-radius: 0.625em;
margin-bottom: 0.5em;
}

.citationImg {
height: 450px;
height: 28.125rem;
max-width: 100%;
object-fit: contain;
}
58 changes: 29 additions & 29 deletions app/frontend/src/components/Answer/Answer.module.css
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
.answerContainer {
padding: 20px;
padding: 1.25em;
background: rgb(249, 249, 249);
border-radius: 8px;
border-radius: 0.5em;
box-shadow:
0px 2px 4px rgba(0, 0, 0, 0.14),
0px 0px 2px rgba(0, 0, 0, 0.12);
outline: transparent solid 1px;
0em 0.125em 0.25em rgba(0, 0, 0, 0.14),
0em 0em 0.125em rgba(0, 0, 0, 0.12);
outline: transparent solid 0.0625em;
}

.answerLogo {
font-size: 28px;
font-size: 1.75em;
}

.answerText {
font-size: 16px;
font-size: 1rem;
font-weight: 400;
line-height: 22px;
padding-top: 16px;
padding-bottom: 16px;
line-height: 1.375em;
padding-top: 1em;
padding-bottom: 1em;
white-space: pre-line;
}

Expand All @@ -28,25 +28,25 @@
.answerText td,
.answerText th {
border: 1px solid;
padding: 5px;
padding: 0.3125em;
}

.selected {
outline: 2px solid rgba(115, 118, 225, 1);
outline: 0.125em solid rgba(115, 118, 225, 1);
}

.citationLearnMore {
margin-right: 5px;
margin-right: 0.3125em;
font-weight: 600;
line-height: 24px;
line-height: 1.5em;
}

.citation {
font-weight: 500;
line-height: 24px;
line-height: 1.5em;
text-align: center;
border-radius: 4px;
padding: 0px 8px;
border-radius: 0.25em;
padding: 0em 0.5em;
background: #d1dbfa;
color: #123bb6;
text-decoration: none;
Expand All @@ -58,21 +58,21 @@
}

.followupQuestionsList {
margin-top: 10px;
margin-top: 0.625em;
}

.followupQuestionLearnMore {
margin-right: 5px;
margin-right: 0.3125em;
font-weight: 600;
line-height: 24px;
line-height: 1.5em;
}

.followupQuestion {
font-weight: 600;
line-height: 24px;
line-height: 1.5em;
text-align: center;
border-radius: 4px;
padding: 0px 8px;
border-radius: 0.25em;
padding: 0em 0.5em;
background: #e8ebfa;
color: black;
font-style: italic;
Expand All @@ -94,18 +94,18 @@ sup {
display: inline-flex;
align-items: center;
justify-content: center;
font-size: 10px;
font-size: 0.625em;
font-weight: 600;
vertical-align: top;
top: -1;
margin: 0px 2px;
min-width: 14px;
height: 14px;
border-radius: 3px;
margin: 0em 0.125em;
min-width: 0.875em;
height: 0.875em;
border-radius: 0.1875em;
background: #d1dbfa;
color: #123bb6;
text-decoration-color: transparent;
outline: transparent solid 1px;
outline: transparent solid 0.0625em;
cursor: pointer;
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
.container {
display: flex;
align-items: center;
gap: 6px;
gap: 0.375em;
cursor: pointer;
padding: 0.5rem;
}
55 changes: 41 additions & 14 deletions app/frontend/src/components/Example/Example.module.css
Original file line number Diff line number Diff line change
@@ -1,41 +1,68 @@
.examplesNavList {
list-style: none;
padding-left: 0;
padding-left: 1rem;
padding-right: 1rem;
display: flex;
flex-wrap: wrap;
gap: 10px;
gap: 0.625rem;
flex: 1;
justify-content: center;
}

.example {
word-break: break-word;
background: #dbdbdb;
border-radius: 8px;
border-radius: 0.5rem;
display: flex;
flex-direction: column;
padding: 20px;
margin-bottom: 5px;
margin-bottom: 0.3125rem;
cursor: pointer;
}

.example:hover {
box-shadow:
0px 8px 16px rgba(0, 0, 0, 0.14),
0px 0px 2px rgba(0, 0, 0, 0.12);
outline: 2px solid rgba(115, 118, 225, 1);
0rem 0.5rem 1rem rgba(0, 0, 0, 0.14),
0rem 0rem 0.125rem rgba(0, 0, 0, 0.12);
outline: 0.125rem solid rgba(115, 118, 225, 1);
}

.exampleText {
margin: 0;
font-size: 22px;
width: 280px;
min-height: 100px;
font-size: 1.25rem;
width: 25rem;
padding: 0.5rem;
min-height: 4.5rem;
}

@media only screen and (max-height: 780px) {
.examplesNavList li {
display: none;
}

.examplesNavList li:nth-of-type(1),
.examplesNavList li:nth-of-type(2) {
display: block; /* Default to showing two list items */
}

@media only screen and (min-width: 992px) {
.examplesNavList {
flex-direction: row; /* Switch to row layout for wider screens */
padding-left: 0;
padding-right: 0;
}

.example {
margin-bottom: 0.3125rem;
padding: 1.25rem;
}

.examplesNavList li:nth-of-type(2),
.examplesNavList li:nth-of-type(3) {
display: block; /* Show an additional list item for medium heights */
}
.exampleText {
font-size: 20px;
height: 80px;
font-size: 1.375rem;
width: 17.5rem;
padding: 0;
min-height: 6.25rem;
}
}
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
.container {
margin-top: 10px;
margin-top: 0.625em;
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
.loginButton {
border-radius: 5px;
padding: 30px 30px;
border-radius: 0.3125em;
font-weight: 100;
margin: 0;
padding: 0.5rem 1rem;
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,16 @@
}

.markdownViewer {
border-radius: 8px;
border-radius: 0.5em;
box-shadow:
#0000000d 0 0 0 1px,
#0000001a 0 2px 3px;
#0000000d 0 0 0 0.0625em,
#0000001a 0 0.125em 0.1875em;
background-color: white;
margin: 20px 0;
margin: 1.25em 0;
}

.loading {
padding: 100px;
padding: 6.25em;
height: 100vh;
background-color: white;
}
Expand All @@ -24,7 +24,7 @@
}

.markdown {
padding: 30px;
padding: 1.875em;
}

table {
Expand All @@ -33,8 +33,8 @@ table {

th,
td {
border: 1px solid #ddd;
padding: 8px;
border: 0.0625em solid #ddd;
padding: 0.5em;
}

tr:nth-child(even) {
Expand All @@ -44,6 +44,6 @@ tr:nth-child(even) {
code {
display: block;
font-family: monospace;
padding: 10px;
padding: 0.625em;
background-color: #f6f8fa;
}
17 changes: 11 additions & 6 deletions app/frontend/src/components/QuestionInput/QuestionInput.module.css
Original file line number Diff line number Diff line change
@@ -1,21 +1,26 @@
.questionInputContainer {
border-radius: 8px;
border-radius: 0.5rem;
box-shadow:
0px 8px 16px rgba(0, 0, 0, 0.14),
0px 0px 2px rgba(0, 0, 0, 0.12);
height: 90px;
0px 0.5rem 1rem rgba(0, 0, 0, 0.14),
0px 0px 0.125rem rgba(0, 0, 0, 0.12);
width: 100%;
padding: 15px;
padding: 0.8rem;
background: white;
}

.questionInputTextArea {
width: 100%;
line-height: 40px;
line-height: 2.5rem;
}

.questionInputButtonsContainer {
display: flex;
flex-direction: column;
justify-content: flex-end;
}

@media (min-width: 992px) {
.questionInputContainer {
height: 5.625rem;
}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
.container {
display: flex;
align-items: center;
gap: 6px;
gap: 0.375em;
cursor: pointer;
padding: 0.5rem;
}
Loading

0 comments on commit 1603e94

Please sign in to comment.