generated from openedx/frontend-template-application
-
Notifications
You must be signed in to change notification settings - Fork 3
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
Various fixes and improvements to enable installation into Learning MFE #6
Merged
MichaelRoytman
merged 6 commits into
main
from
michaelroytman/MST-2034-improvements-and-testing
Aug 18, 2023
Merged
Various fixes and improvements to enable installation into Learning MFE #6
MichaelRoytman
merged 6 commits into
main
from
michaelroytman/MST-2034-improvements-and-testing
Aug 18, 2023
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
MichaelRoytman
force-pushed
the
michaelroytman/MST-2034-improvements-and-testing
branch
4 times, most recently
from
August 16, 2023 21:48
7961d92
to
97bcdf1
Compare
MichaelRoytman
changed the title
[WIP]
Various fixed and improvements to enable installation into Learning MFE
Aug 16, 2023
alangsto
approved these changes
Aug 16, 2023
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.
All of these look good, thanks for catching them 😄
@@ -37,6 +37,34 @@ documented in the repository README. | |||
|
|||
.. _Learning MFE: https://github.com/openedx/frontend-app-learning | |||
|
|||
Development |
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.
Thank you for adding this section!
Certain npm modules need to be the only version installed in an application. If a dependency is listed as a dependency of frontend-lib-learning-assistant and as a dependency of the parent application - frontend-app-learning, in this case - then there will be two copies of that module installed in the parent application. npm modules like react and @edx/frontend-platform need to be the only copy of those modules installed. In other cases, it is not necessary to do this to enable the application to function, but it does help reduce the bundle size. This commit moves npm modules that can be expected to be installed in the parent application from the dependencies array to the devDependencies and peerDependencies array.
This commit fixes an error in the way we're exporting the generated slice reducer.
This commit fixes a bug where thunks were not being dispatched correctly. This is fixed by using the useDispatch hook to get a referenceto the dispatch function, which is then applied to the thunk.
When the messageList is empty, indexing into the array returns undefined. Reading a property of undefined causes an error, so we use optional chaining in this case.
MichaelRoytman
force-pushed
the
michaelroytman/MST-2034-improvements-and-testing
branch
from
August 17, 2023 19:00
97bcdf1
to
54a5d6c
Compare
MichaelRoytman
changed the title
Various fixed and improvements to enable installation into Learning MFE
Various fixes and improvements to enable installation into Learning MFE
Aug 17, 2023
This commit clears the currentMessage when a learner submits their message to the chatbot.
MichaelRoytman
force-pushed
the
michaelroytman/MST-2034-improvements-and-testing
branch
from
August 17, 2023 19:29
a4e4230
to
ae66e90
Compare
MichaelRoytman
deleted the
michaelroytman/MST-2034-improvements-and-testing
branch
August 18, 2023 12:00
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request represents a set of fixes and improvements necessary to install this library into the Learning MFE. Additional work on this library is necessary before it's possible to install it into the Learning MFE (e.g. styling fixes, component structure improvements, changes to the Learning MFE, etc.), but this pull request contains an initial set of fixes for review.
This pull request includes the following changes:
dependencies
todevDependencies
andpeerDependencies
inpackage.json
learningAssistant
reducer is exported fromslice.js
useDispatch
hook to get a reference to thedispatch
function and then dispatching the thunksmessageList
array is indexed it following the removal of the default message in feat: add chat components #4currentMessage
when a learner submits a messageJIRA: MST-2034 (private)