-
Notifications
You must be signed in to change notification settings - Fork 4
Update frontend directions for AskTim drawer #494
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: main
Are you sure you want to change the base?
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.
Just a couple of small changes.
src/ol_openedx_chat/README.rst
Outdated
/* webpackIgnore: true */ | ||
"/static/smoot-design/remoteTutorDrawer.es.js").then(module => { | ||
module.init({ | ||
messageOrigin: "http://local.openedx.io:8000", |
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.
messageOrigin: "http://local.openedx.io:8000", | |
messageOrigin: getConfig().LMS_BASE_URL, |
|
||
4. Create env.config.jsx in the frontend-app-learning and add the below code: | ||
----------------------------------------------------------------------------- | ||
The Unit is rendered inside an Iframe and we use postMessage to communicate between the Iframe and the parent window. The below code is used to initialize the remoteAiChatDrawer. | ||
|
||
.. code-block:: js | ||
|
||
import { getConfig } from '@edx/frontend-platform'; |
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 might want to retain this to load the configuration and the LMS URL dynamically instead of hardcoding the LMS base URL.
|
||
export default config; | ||
|
||
(Alternatively, you can import the drawer code from a CDN like kg.com/@mitodl/[email protected]/dist/bundles/remoteTutorDrawer.umd.js to skip Step 3. However, the steps outlined here are most similar to what we do in production.) | ||
|
||
5. Start learning MFE by ``npm run dev`` | ||
------------------- | ||
6. In LMS, enable the ``ol_openedx_chat.ol_openedx_chat_enabled`` waffle flag at ``<LMS>/admin/waffle/flag/`` |
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 know it's not part of this PR, but for the point/7 to work, we need an additional setting. We need to enable ENABLE_OTHER_COURSE_SETTINGS
in FEATURES
for Other Course Settings
to display.
This can be done via private.py
or tutor config --set
command.
If you can add it then that's fine, otherwise we can add that in another PR.
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.
Just two very small comments on the rendered rst.
|
||
4. Create env.config.jsx in the frontend-app-learning and add the below code: | ||
----------------------------------------------------------------------------- | ||
The Unit is rendered inside an Iframe and we use postMessage to communicate between the Iframe and the parent window. The below code is used to initialize the remoteAiChatDrawer. | ||
|
||
.. code-block:: js | ||
|
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.
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.
Thanks, formatting issues should be fixed now.
src/ol_openedx_chat/README.rst
Outdated
@@ -106,7 +114,7 @@ LMS Chat Drawer View | |||
|
|||
.. image:: static/images/ai_chat_aside_lms_drawer_view.png | |||
|
|||
9. Disable it for a single block | |||
7. Disable it for a single block |
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.
7. Disable it for a single block | |
9. Disable it for a single block |
3120810
to
d6923fc
Compare
for more information, see https://pre-commit.ci
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.
Looks great. Thanks for making all the changes 👍
@ChristopherChudzicki Just a reminder to merge this whenever you get the chance. |
What are the relevant tickets?
For https://github.com/mitodl/hq/issues/7259
Description (What does it do?)
Updates readme.
How can this be tested?