-
Notifications
You must be signed in to change notification settings - Fork 188
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
Implement feedback object hierarchy #4373
Implement feedback object hierarchy #4373
Conversation
*/ | ||
export class FlagFeedbackEvent extends BaseFlagFeedback { | ||
constructor({ target_topic_id, ...baseFeedbackParams }) { | ||
super({ target_topic_id, ...baseFeedbackParams }); |
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.
@vkWeb mentioned that, it seems like target_topic_id can be ommited here. We can access the parent_id field of the contentNode to access the target_topic_id.
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.
Nothing blocking. The most important aspect to revisit would be the URL handling, as I mentioned, but that would be easiest once the APIs are actually built.
contentcuration/contentcuration/frontend/shared/feedbackApiUtils.js
Outdated
Show resolved
Hide resolved
contentcuration/contentcuration/frontend/shared/feedbackApiUtils.js
Outdated
Show resolved
Hide resolved
* @param {string} params.target_channel_id - The ID of the target channel for the feedback event. | ||
* @param {Object} baseFeedbackParams - Additional parameters inherited from the base feedbackclass. | ||
*/ | ||
// eslint-disable-next-line no-unused-vars |
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.
What was eslint complaining about here?
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.
Currently the BaseFeedbackEvent is not being used anywhere as the recommendations core classes like ReccommendationInteractionEvent and ReccommendationEvent class are still to be added! Hence its suggesting to remove the unused class.
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.
So this file is treated as an ES module, meaning if variables aren't used in the file then this would occur. Nothing is exported from this module, so doing that could perhaps resolve it?
contentcuration/contentcuration/frontend/shared/feedbackApiUtils.js
Outdated
Show resolved
Hide resolved
contentcuration/contentcuration/frontend/shared/feedbackApiUtils.js
Outdated
Show resolved
Hide resolved
contentcuration/contentcuration/frontend/shared/feedbackApiUtils.js
Outdated
Show resolved
Hide resolved
flagFeedbackEvent.getDataObject() | ||
); | ||
}); | ||
}); |
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.
Great job on writing up some tests!
Summary
Create utility functions and classes to support the Feeback project.
Description of the change(s) you made
Manual verification steps performed
Reviewer guidance
How can a reviewer test these changes?
References
closes #4366
Contributor's Checklist
PR process:
CHANGELOG
label been added to this PR. Note: items with this label will be added to the CHANGELOG at a later timedocs
label has been added if this introduces a change that needs to be updated in the user docs?requirements.txt
files also included in this PRStudio-specifc:
notranslate
class been added to elements that shouldn't be translated by Google Chrome's automatic translation feature (e.g. icons, user-generated text)pages
,components
, andlayouts
directories as described in the docsTesting:
Reviewer's Checklist
This section is for reviewers to fill out.
yarn
andpip
)