-
Notifications
You must be signed in to change notification settings - Fork 526
Tutor Permissions: Info alert & warning on course & unit overview #70684
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
base: staging
Are you sure you want to change the base?
Conversation
🖼️ Storybook Visual Comparison Report✅ No Storybook eyes differences detected! |
dashboard/app/models/unit_group.rb
Outdated
| course_path: link, | ||
| course_offering_edit_path: for_edit && course_version&.course_offering ? edit_course_offering_path(course_version.course_offering.key) : nil | ||
| course_offering_edit_path: for_edit && course_version&.course_offering ? edit_course_offering_path(course_version.course_offering.key) : nil, | ||
| requires_ai_chat_tools: requires_ai_chat_tools? |
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'm going to replace this with Erin's ai_chat_tools_dependency from #70681
| @@ -0,0 +1,80 @@ | |||
| import Alert, {alertTypes} from '@code-dot-org/component-library/alert'; | |||
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.
Nice! Ok, I see what you mean about organizing all of these alerts together and consolidating where we can. I think that's probably fine to do as a follow up if it makes merging our separate PRs more complicated. Up to you!
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.
Yes! I'll do a follow-up refactor
| isOnTeacherDashboard: PropTypes.bool, | ||
| aiChatToolsDependency: PropTypes.oneOf( | ||
| Object.values(AiChatToolsDependency) | ||
| ), |
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 one required too?
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 had it as required originally, but scripts/show.js doesn't pass it, and can't with the current impl since I'm getting it from the section summary and scripts/show.js is not in context of a section. It's also not in the designs to show this alert on the Unit page in that context, so I'm leaving it off for now. I should probably clarify with Molly whether she thinks we need it on the Unit page outside of teacher dashboard.
Co-authored-by: Erin Bond <erin.e.bond@gmail.com>
…pass a node rather than flags.
… requires_ai_chat_tools for courseSummary
…actor them together a bit later
…en't passing it to UnitOverview from scripts/show.js
b1a6106 to
21063ba
Compare
Erin007
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.
wahoo! great progress! this is coming together 🎉
| Object.entries(APPLICATION_ALIASES).forEach(([alias, localPath]) => { | ||
| jestAliases[`${alias}/(.*)`] = `${localPath}/$1`; | ||
| // Anchor to avoid matching unrelated packages that merely contain `${alias}/` | ||
| jestAliases[`^${alias}/(.*)$`] = `${localPath}/$1`; |
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.
@stephenliang I was getting this error when running my tests:
Could not locate module ../../../../../../../node_modules/emotion-element-f0de968e.browser.esm.js mapped as:
/home/cassi/code/code-dot-org/apps/node_modules/react/$1.
Please check your configuration for these entries:
{
"moduleNameMapper": {
"/react\/(.*)/": "/home/cassi/code/code-dot-org/apps/node_modules/react/$1"
},
"resolver": undefined
}
and codex suggested this fix. It seemed to fix the problem, but I don't know much about webpack or jest so wanted to get your take on if this seems reasonable to do!
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.
Oops noticed you are out sick. Sorry for the ping! asking in dev-support.
|
These look good to me! I'm wondering if we should change out the AI bot icon, since Karim is asking us to move away from using the bot entirely. Maybe we switch to the sparkles icon? |
I think we probably need to get agreement from different folks to make a change like that since variations of the bot icon show up in the tutor UI. Let's discuss! Dropped a discussion thread here but mostly just to set a slack reminder to continue the discussion once Tess is back. |
…sions/section-assignment
This PR adds alerts/notifications to the top of the course and unit overview pages for courses that require AI Chat Tools to function (i.e. have essential AI Chat Tools in one or more levels in the course)
Links
Testing story
Deployment strategy
Follow-up work
PR Creation Checklist: