-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Media Queries added #28
Open
EmmaluFox
wants to merge
88
commits into
master
Choose a base branch
from
TestPage-TestLibrary-Integration
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 83 commits
Commits
Show all changes
88 commits
Select commit
Hold shift + click to select a range
1ed986c
Merge branch 'DynamicUrls' into TestPage-TestLibrary-Integration
EmmaluFox 78f02bc
Merge remote-tracking branch 'origin/test-library-page' into TestPage…
EmmaluFox c0df017
step 1
EmmaluFox 324b681
Merge branch 'master' into TestPage-TestLibrary-Integration
EmmaluFox dfd672b
Integrate stepper
EmmaluFox cc45acc
Merge branch 'TestPage-TestLibrary-Integration' into origin/test-libr…
EmmaluFox 7e0f822
Merge remote-tracking branch 'origin/test-library-page' into TestPage…
EmmaluFox 69e0e5c
Merge branch 'TestPage-TestLibrary-Integration' into origin/TestPage-…
EmmaluFox 5d127ff
Merge remote-tracking branch 'origin/TestPage-TestLibrary-Integration…
EmmaluFox 8758f62
Working on media queries
EmmaluFox 28006b7
Working on media queries
EmmaluFox 0b5f788
Working on media queries
EmmaluFox f53152b
Working on media queries
EmmaluFox 80bb986
Working on media queries
EmmaluFox f964170
Working on media queries
EmmaluFox 81d9304
Media Qs
EmmaluFox 2c07993
Media Qs
EmmaluFox 0dfd2ee
Media Qs
EmmaluFox 4ce6491
Media Qs
EmmaluFox 591f404
Media Qs
EmmaluFox 585d04b
Media Qs
EmmaluFox 43f71e2
Media Qs
EmmaluFox d645c29
Media Qs
EmmaluFox 1bf4e1b
Media Qs
EmmaluFox b7a308f
Media Qs
EmmaluFox ce7df68
Merge branch 'TestPage-TestLibrary-Integration' into MediaQueries
EmmaluFox 7a58f1b
Media Qs
EmmaluFox fdbe41e
Merge pull request #27 from techswitch-learners/MediaQueries
EmmaluFox 3c52295
Media Qs
EmmaluFox 4191975
Media Qs
EmmaluFox 0f90eaf
improved media queries
EmmaluFox 35e1a74
improved media queries
EmmaluFox 8f3abcd
reverted to section structure
EmmaluFox d8b89b9
changes requested
EmmaluFox 0755992
changes requested
EmmaluFox b83a21a
Merge remote-tracking branch 'origin/testLibraryApi' into TestPage-Te…
EmmaluFox bd2563e
Merge remote-tracking branch 'origin/candidatetestpageapiconnect' int…
EmmaluFox 17e9b18
Merge branch 'TestPage-TestLibrary-Integration' into origin/TestPage-…
EmmaluFox 8643c99
Merge remote-tracking branch 'origin/candidateTokenQueryParam' into T…
EmmaluFox 8ddd33e
Merge branch 'TestPage-TestLibrary-Integration' into origin/TestPage-…
EmmaluFox df9cf1a
Merge branch 'TestPage-TestLibrary-Integration' into origin/TestPage-…
EmmaluFox c321f3b
Merge remote-tracking branch 'origin/TestPage-TestLibrary-Integration…
EmmaluFox 31731eb
Merge branch 'TestPage-TestLibrary-Integration' into origin/TestPage-…
EmmaluFox d91cd6d
Merge remote-tracking branch 'origin/master' into TestPage-TestLibrar…
EmmaluFox 07ef78b
.
EmmaluFox adb11d8
Incorporating tokens
EmmaluFox 1cd6ab3
Merge remote-tracking branch 'origin/master' into TestPage-TestLibrar…
EmmaluFox 016f785
Merge branch 'TestPage-TestLibrary-Integration' into origin/candidate…
EmmaluFox 0bcb4f4
Merge remote-tracking branch 'origin/candidatetestpageapiconnect' int…
EmmaluFox 5be20bd
Incorporating tokens
EmmaluFox e2e8db0
Incorporating tokens
EmmaluFox e348f84
Stepper checks tests remaining
EmmaluFox 972f988
Stepper checks tests remaining
EmmaluFox 452df1a
Stepper checks tests remaining
EmmaluFox 8aa36e6
Merge remote-tracking branch 'origin/master' into TestPage-TestLibrar…
EmmaluFox 398f899
Merge remote-tracking branch 'origin/master' into TestPage-TestLibrar…
EmmaluFox 6e7b335
Auto stash before merge of "TestPage-TestLibrary-Integration" and "or…
EmmaluFox c77227d
working
EmmaluFox 8294459
Merge remote-tracking branch 'origin/master' into TestPage-TestLibrar…
EmmaluFox a39b249
changes
EmmaluFox 246ec9b
Instructions scss module returned
EmmaluFox 77b1af5
Instructions scss module returned
EmmaluFox 224f110
Replacing vw/vh with px where possible
EmmaluFox 98d9434
Replacing vw/vh with px where possible
EmmaluFox 1a020b5
Replacing vw/vh with px where possible
EmmaluFox 71fe5b9
Replacing vw/vh with px where possible
EmmaluFox bf0bc9f
Env
EmmaluFox 83e9d92
error page
EmmaluFox 56f511a
error page
EmmaluFox ab7421b
Loading appropriate tests from stepper
EmmaluFox 9f6596d
reorganising
EmmaluFox 292b98c
restructuring
EmmaluFox a6863b3
restructuring
EmmaluFox e094598
Merge remote-tracking branch 'origin/master' into TestPage-TestLibrar…
EmmaluFox 0b3db5b
latest
EmmaluFox 4189aec
Consolidated api files
EmmaluFox 24d8990
Consolidated interfaces into models
EmmaluFox 387b629
Consolidated interfaces into models
EmmaluFox c90aa4d
Consolidated interfaces into models
EmmaluFox b19e296
Consolidated interfaces into models
EmmaluFox 734fb0d
Consolidated interfaces into models
EmmaluFox 8a8731e
Consolidated interfaces into models
EmmaluFox f9438f9
Consolidated interfaces into models
EmmaluFox 19ce29f
Consolidated interfaces into models
EmmaluFox bba4f21
Consolidated interfaces into models
EmmaluFox c62f44a
changes
EmmaluFox a02aedb
Merge branch 'TestPage-TestLibrary-Integration' into origin/master
EmmaluFox dba84d5
Merge remote-tracking branch 'origin/master' into TestPage-TestLibrar…
EmmaluFox File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
export interface CandidateTestStatus { | ||
testName: string; | ||
testStatus: string; | ||
} | ||
export interface SessionCandidate { | ||
firstName: string; | ||
lastName: string; | ||
testStatuses: CandidateTestStatus[]; | ||
} | ||
export interface NewTestSubmission{ | ||
testId: number; | ||
testAnswer: string; | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
import getConfig from 'next/config'; | ||
import fetch from "node-fetch"; | ||
import {ServerResponse} from "http"; | ||
import {ParsedUrlQuery} from "querystring"; | ||
import {NewTestSubmission, SessionCandidate} from "../Models/SessionCandidateModels"; | ||
|
||
const {publicRuntimeConfig} = getConfig(); | ||
const baseUrl = publicRuntimeConfig.API_URL; | ||
|
||
export async function checkToken(token: string): Promise<boolean> { | ||
const response = await fetch(`${baseUrl}/sessions/${token}`); | ||
return response.ok;} | ||
|
||
export async function assertTokenIsValid(query: ParsedUrlQuery, response: ServerResponse): Promise<string> { | ||
const token = query.token as string; | ||
const tokenIsValid = await checkToken(token); | ||
if (!tokenIsValid) { | ||
response.statusCode = 404; | ||
response.end(); | ||
} | ||
return token; | ||
} | ||
|
||
export async function getSessionCandidate(token: string | string[] | undefined): Promise<SessionCandidate> { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. just |
||
const {publicRuntimeConfig} = getConfig(); | ||
const baseUrl = publicRuntimeConfig.API_URL; | ||
try { | ||
const result = await fetch( | ||
`${baseUrl}/sessions/${token}` | ||
); | ||
return await result.json(); | ||
} catch (error) { | ||
console.error(error); | ||
return error.message; | ||
EmmaluFox marked this conversation as resolved.
Show resolved
Hide resolved
|
||
} | ||
} | ||
|
||
export async function addTestSubmission( tokenId: string, newTestSubmission: NewTestSubmission) { | ||
EmmaluFox marked this conversation as resolved.
Show resolved
Hide resolved
|
||
const { publicRuntimeConfig } = getConfig(); | ||
const apiURL = publicRuntimeConfig.API_URL; | ||
return await fetch(`${apiURL}/sessions/${tokenId}`, { | ||
method: "POST", | ||
headers: { | ||
"Content-Type": "application/json" | ||
}, | ||
body: JSON.stringify(newTestSubmission), | ||
}); | ||
} | ||
|
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
47 changes: 35 additions & 12 deletions
47
components/CandidateTestView/Instructions/Instructions.module.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,37 @@ | ||
.sampleInputOutput { | ||
margin: 5px; | ||
padding: 5px; | ||
top: 78vh; | ||
left: 46vw; | ||
display: inline-block; | ||
position: absolute; | ||
overflow: hidden; | ||
} | ||
@import "pageStyles/constants"; | ||
|
||
.testInstructions { | ||
height: 500px; | ||
max-width: 50vw; | ||
box-sizing: border-box; | ||
color: $techSwitchWhite; | ||
white-space: pre-wrap; | ||
font-size: $desktopBodyFontSize; | ||
text-align: left; | ||
padding-right: 1rem; | ||
padding-left: 5rem; | ||
margin-right: 2rem; | ||
line-height: 130%; | ||
width: 700px; | ||
} | ||
.instructionsSubheader { | ||
font-size: $desktopSubHeaderFontSize; | ||
line-height: 1rem; | ||
} | ||
|
||
@media (max-width: $mediaLowResMaxWidth) { | ||
//Low Resolution 900px and below | ||
.instructionsHeader { | ||
font-size: $lowResSubHeaderFontSize; | ||
} | ||
.instructionsSubheader { | ||
box-sizing: border-box; | ||
font-size: $lowResSubHeaderFontSize; | ||
} | ||
.testInstructions { | ||
font-size: $lowResBodyFontSize; | ||
box-sizing: border-box; | ||
padding-left: 0.5rem; | ||
padding-right: 0.5rem; | ||
width: 300px; | ||
} | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
105 changes: 39 additions & 66 deletions
105
components/CandidateTestView/candidateTestView.module.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,82 +1,55 @@ | ||
@import "../../pageStyles/constants"; | ||
.testPage { | ||
max-height: 800px; | ||
box-sizing: border-box; | ||
max-height: 100vh; | ||
EmmaluFox marked this conversation as resolved.
Show resolved
Hide resolved
|
||
max-width: 100vw; | ||
display: flex; | ||
flex-direction: column; | ||
flex-wrap: wrap; | ||
margin-top: 2vh; | ||
} | ||
|
||
.testInstructions { | ||
height: 500px; | ||
max-width: 50vw; | ||
|
||
} | ||
.instructionList { | ||
margin-bottom: 1em; | ||
} | ||
|
||
.testInstructionsHeader { | ||
color: $techSwitchWhite; | ||
font-size: $desktopSubHeaderFontSize; | ||
margin-bottom: 12px; | ||
padding: 5px; | ||
} | ||
|
||
.testInstructions { | ||
color: $techSwitchWhite; | ||
white-space: pre-wrap; | ||
font-size: $bodyFontSize; | ||
justify-content: left; | ||
text-align: left; | ||
width: 40vw; | ||
line-height: 1.5; | ||
padding-left: 3vw; | ||
margin-top: 12px; | ||
margin-bottom: 24px; | ||
margin-right: 5px; | ||
margin-left: 5px; | ||
} | ||
|
||
.textEditor { | ||
color: $techSwitchWhite; | ||
font-size: $buttonFontSize; | ||
justify-content: right; | ||
margin-top: 5vh; | ||
margin-right: 1vw; | ||
flex-direction: row; | ||
justify-content: center; | ||
align-items: flex-start; | ||
margin-top: 70px; | ||
} | ||
|
||
.testTitle { | ||
box-sizing: border-box; | ||
color: $techSwitchYellow; | ||
font-size: 30pt; | ||
max-width: 40vw; | ||
font-size: $desktopHeaderFontSize; | ||
white-space: nowrap; | ||
margin: 5px; | ||
padding: 5px; | ||
top: 1vh; | ||
right: 2vw; | ||
overflow: hidden; | ||
position: absolute; | ||
top: 1px; | ||
right: 100px; | ||
margin-right: 1px; | ||
text-align: right; | ||
} | ||
|
||
.editorBox { | ||
border-style: solid; | ||
border-width: 5px; | ||
border-color: $techSwitchYellow; | ||
} | ||
|
||
.sampleInputOutput { | ||
margin: 5px; | ||
padding: 5px; | ||
top: 85vh; | ||
left: 46vw; | ||
display: flex; | ||
flex-direction: column; | ||
line-height: 0; | ||
position: absolute; | ||
overflow: hidden; | ||
} | ||
@media (max-width: $mediaLowResMaxWidth){ | ||
//Low Resolution 900px and below | ||
.testPage { | ||
box-sizing: border-box; | ||
max-height: 100vh; | ||
EmmaluFox marked this conversation as resolved.
Show resolved
Hide resolved
|
||
max-width: 100vw; | ||
display: flex; | ||
flex-direction: column; | ||
align-items: center; | ||
margin-top: 70px; | ||
} | ||
|
||
.testTitle { | ||
font-size: $lowResHeaderFontSize; | ||
white-space: normal; | ||
overflow-wrap: break-spaces; | ||
position: absolute; | ||
top: 1px; | ||
right: 1px; | ||
padding: 0; | ||
margin: 0; | ||
text-align: right; | ||
} | ||
.buttonYellow{ | ||
@include techSwitchButton($techSwitchYellow, $techSwitchBlack, $lowResBodyFontSize); | ||
width: 120px; | ||
} | ||
} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I still think this doesn't need to return anything.
Also could you move it back to where it was? Its not really part of the API client (because it doesn't directly call the API)