Skip to content

Conversation

@kobryan0619
Copy link
Contributor

@kobryan0619 kobryan0619 commented Jan 6, 2026

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:
image

Otherwise this is what the UI currently looks like:
image

AND the figma looks like this:
image

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?

Copy link
Contributor

@TurnerRiley TurnerRiley left a 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

Comment on lines +1692 to +1696
"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",
Copy link
Contributor

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);
Copy link
Contributor

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!

Comment on lines 13 to 20
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',
},
Copy link
Contributor

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.

Copy link
Contributor Author

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.

Comment on lines +39 to +40
let widgetContent: React.ReactNode;
let scrollable = false;
Copy link
Contributor

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?

@tess323
Copy link

tess323 commented Jan 7, 2026

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.

@kobryan0619 kobryan0619 merged commit 1603d7e into staging Jan 9, 2026
6 checks passed
@kobryan0619 kobryan0619 deleted the kaitie/lf-create-parent-component branch January 9, 2026 17:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants