-
Notifications
You must be signed in to change notification settings - Fork 0
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
Feature/harsh jenny/pre session form #70
Conversation
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 may be mistaken, but i don't think we're planning to use a route for the questions themselves as they're going to be simply written in? but i'm not 100% sure i'll let aman confirm this
} | ||
|
||
func fetchQuestions() async throws -> [Question] { | ||
let url = URL(string: "http://localhost:3000/notes/")! |
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.
is this to get the actual questions themselves? i don't think we're planning to host the questions in the backend, i think they're just gonna be hard coded in.
unless this is to get the answers? if so we need an id after the notes as well.
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.
We are planning to host questions on the backend haha. We can discuss this in our meeting but this is the response the GET notes route should return
GET Notes
URL - /notes/<id>
Response Format
[
{
question: "Question?",
type: "text",
answer: "",
id: "the hashed ID 1"
},
{
question: "Question?",
type: "bullet",
answer: [],
id: "the hashed ID 2"
}
]
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.
Can all backend interactions be consolidated into one API service class? #69 adds an APIServices
file, perhaps use something like that
viewModel.questionList = viewModel.loadTestData() | ||
} | ||
} | ||
} |
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.
dang yall popped off fr
} | ||
.buttonStyle(FilledInButtonStyle(disabled: false)) | ||
.padding(.bottom, 32) | ||
.frame(width: UIScreen.main.bounds.width * 0.575) |
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.
Let's use GeometryReader
instead of UIScreen
.
- GeometryReader is SwiftUI's native way of getting size of view (checkout ProgresBarComponent and https://developer.apple.com/documentation/swiftui/geometryreader)
UIScreen.main
is deprecated - https://developer.apple.com/documentation/uikit/uiscreen/1617815-main- UIScreen is UIKit's way of getting screen size so less preferred for SwiftUI
.padding(.trailing, 16) | ||
.padding(.bottom, 32) | ||
} else if currQuestion.type == "bullet" { | ||
|
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.
Can we not render currQuestion.answerBullet in this case?
Model + ViewModel for Questions look good. Left a few comments for the Summary Page @christen03 we do want to get our questions from the backend. That way if ALUM wants to change the question in future, they can just change it in the backend instead of Pushing an Update for all users on the frontend |
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.
Great stuff! Looking forward to the use of this model and viewmodel
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.
really great job guys :)
} | ||
|
||
func fetchQuestions() async throws -> [Question] { | ||
let url = URL(string: "http://localhost:3000/notes/")! |
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.
Can all backend interactions be consolidated into one API service class? #69 adds an APIServices
file, perhaps use something like that
struct PreSessionConfirmationScreen: View { | ||
@ObservedObject var viewModel: QuestionViewModel | ||
@Environment(\.dismiss) var dismiss |
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.
In the future, try to include a screenshot of any frontend pages/components that you created or updated in the PR. That's what the "Confirmation of Change" section in the template is for
Agreed with @wllmwu's comments
|
…SE/ALUM-Mobile-Application into feature/HarshJenny/PreSessionForm
…SE/ALUM-Mobile-Application into feature/HarshJenny/PreSessionForm
7c6522d
to
81ee69d
Compare
171cbdb
to
1e35713
Compare
Merging pre/post session flow |
Tracking Info
Resolves #66
Make sure your branch name conforms to:
<feature|staging|bugfix|...>/<username>/<3-4 word description separated by dashes>
. Otherwise, please rename your branch and create a new PR.Changes
Added the model and view model for Question, which will be used for the Pre and Post Session Forms
Testing
How did you confirm your changes worked?
NA
Confirmation of Change
Missed.Session.Form.mov
Post.Session.Form.mov