-
Notifications
You must be signed in to change notification settings - Fork 524
LF - Initial UI for LessonFeedback Widget #70197
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
Conversation
TurnerRiley
left a comment
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.
LGTM! Just had a couple questions and nits
| "lessonFeedback": "Lesson Feedback", | ||
| "lessonFeedbackAlertText": "Feedback was generated by AI Teaching Assistant and should be reviewed before sending to the student.", | ||
| "lessonFeedbackRecommendedAction": "Recommended Action", | ||
| "lessonFeedbackRecommendedActionDirections": "What should the student do next? Leave a note and link to a level, video, or documentation to review.", | ||
| "lessonFeedbackDraftedByAiTa": "Drafted by AI Teaching Assistant", |
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 believe with the recent updates to how we handle strings, we don't need to use this process anymore and you can just insert this as raw text into your component!
| const handleTextChange = (event: ChangeEvent<HTMLTextAreaElement>) => { | ||
| const newText = event.target.value; | ||
| setText(newText); | ||
| onFeedbackChange?.(newText); |
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.
TIL you could safe chain a possibly null function parameter!
| gridWidth: { | ||
| control: {type: 'number', min: 1, max: 4}, | ||
| description: 'Grid width for the widget', | ||
| }, | ||
| gridHeight: { | ||
| control: {type: 'number', min: 1, max: 4}, | ||
| description: 'Grid height for the widget', | ||
| }, |
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.
Thinking towards the final product, will the widget always be the same dimensions with a scroll bar if the content doesn't fit, or will it be different dimensions? Just curious if the gridWidth and gridHeight can be hard-coded to its desired values or if we need it dynamic.
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.
That's a good point... I think we can make them hard-coded. I will make that change.
| let widgetContent: React.ReactNode; | ||
| let scrollable = false; |
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.
Should these be set up using useState and the calls below that change it can be in a useEffect?
|
Re deployment - I'm not sure yet. Do you think we could get away with holding off until we know more? I think we will want the optionality to deploy the student snapshot without feedback but it will depend how timelines end up shaking out. |
Starts the basic structure of the LessonFeedback Widget. Note that all of this content will need some tweaking. This is intended to just be a start to the UI to break the PR into some more manageable pieces.
If the teacher does not have AI features turned on:

Otherwise this is what the UI currently looks like:

AND the figma looks like this:

Links
Figma
Testing story
Deployment strategy
TBD, I am not sure where we are with deploying the "snapshot" - what the minimum number of widgets available are that we want before deploying. For right now I have it always being displayed in the snapshot, but if we deploy the snapshot before this widget is done, we will want to re-work that. @tess323 thoughts on this question?