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.
@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.
bjester
left a comment
There was a problem hiding this comment.
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.
What was eslint complaining about here?
There was a problem hiding this comment.
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.
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.
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:
CHANGELOGlabel been added to this PR. Note: items with this label will be added to the CHANGELOG at a later timedocslabel has been added if this introduces a change that needs to be updated in the user docs?requirements.txtfiles also included in this PRStudio-specifc:
notranslateclass been added to elements that shouldn't be translated by Google Chrome's automatic translation feature (e.g. icons, user-generated text)pages,components, andlayoutsdirectories as described in the docsTesting:
Reviewer's Checklist
This section is for reviewers to fill out.
yarnandpip)