Skip to content

refactor: Update tags drawer listener for a Json message - #34223

Closed
ChrisChV wants to merge 2 commits into
openedx:masterfrom
open-craft:chris/FAL-3601-refactor-JSON-msg
Closed

refactor: Update tags drawer listener for a Json message#34223
ChrisChV wants to merge 2 commits into
openedx:masterfrom
open-craft:chris/FAL-3601-refactor-JSON-msg

Conversation

@ChrisChV

@ChrisChV ChrisChV commented Feb 12, 2024

Copy link
Copy Markdown
Contributor

Description

Blocked: Check this openedx/frontend-app-authoring#800 (comment)

The drawer tag listener code has been changed to accept messages in JSON structure.
This is a small refactor of the code in response to this comment: openedx/frontend-app-authoring#800 (review)

Supporting information

Internal ticket: FAL-3601
Github issue: openedx/modular-learning#167
Related PRs:

Testing instructions

Follow the testing instructions of #34059

@openedx-webhooks openedx-webhooks added the open-source-contribution PR author is not from Axim or 2U label Feb 12, 2024
@openedx-webhooks

Copy link
Copy Markdown

Thanks for the pull request, @ChrisChV! Please note that it may take us up to several weeks or months to complete a review and merge your PR.

Feel free to add as much of the following information to the ticket as you can:

  • supporting documentation
  • Open edX discussion forum threads
  • timeline information ("this must be merged by XX date", and why that is)
  • partner information ("this is a course on edx.org")
  • any other information that can help Product understand the context for the PR

All technical communication about the code itself will be done via the GitHub pull request interface. As a reminder, our process documentation is here.

Please let us know once your PR is ready for our review and all tests are green.

Comment on lines 24 to +26
var courseAuthoringUrl = this.model.get("course_authoring_url")
if (event.origin == courseAuthoringUrl
&& data.includes('[Manage tags drawer] Count updated:')) {
&& data.type == 'authoring.events.tags.count.updated') {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not working for me in tutor. event.origin is "http://apps.local.overhang.io:2001" while courseAuthoringUrl is "http://apps.local.overhang.io:2001/course-authoring".

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changing this to var courseAuthoringUrl = new URL(this.model.get("course_authoring_url")).origin; worked.

@mphilbrick211 mphilbrick211 added the waiting for eng review PR is ready for review. Review and merge it, or suggest changes. label Feb 21, 2024
@bradenmacdonald

Copy link
Copy Markdown
Contributor

Closing this for now as we're focusing on the MFE which doesn't need this message system.

@openedx-webhooks

Copy link
Copy Markdown

@ChrisChV Even though your pull request wasn’t merged, please take a moment to answer a two question survey so we can improve your experience in the future.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

open-source-contribution PR author is not from Axim or 2U waiting for eng review PR is ready for review. Review and merge it, or suggest changes.

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

5 participants