Skip to content

feat: add dismiss button to survey report banner - #34160

Merged
felipemontoya merged 6 commits into
openedx:masterfrom
eduNEXT:dam/dismiss_button_survey_banner
Feb 15, 2024
Merged

feat: add dismiss button to survey report banner#34160
felipemontoya merged 6 commits into
openedx:masterfrom
eduNEXT:dam/dismiss_button_survey_banner

Conversation

@Alec4r

@Alec4r Alec4r commented Jan 31, 2024

Copy link
Copy Markdown
Contributor

Description

This PR introduces a dismiss button to hide the survey report banner and a thank-you message to users upon report submission.

These changes were reverted in this commit: Reverts #34110.

We relocated the script to "base_site.html" and integrated the script snippet the "extrahead" block to mitigate issues with enterprises: See here.

We need to incorporate jQuery in "base_site.html" as the banner should appear across all Django admin pages and if we don't add jquery, our scripts won't work.

@openedx-webhooks

Copy link
Copy Markdown

Thanks for the pull request, @Alec4r! 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.

@openedx-webhooks openedx-webhooks added the open-source-contribution PR author is not from Axim or 2U label Jan 31, 2024
@Alec4r
Alec4r force-pushed the dam/dismiss_button_survey_banner branch from 7ca1022 to 7d4129b Compare January 31, 2024 23:12
@Alec4r Alec4r changed the title feature: add dismiss button to survey report banner feat: add dismiss button to survey report banner Jan 31, 2024
@felipemontoya
felipemontoya self-requested a review February 1, 2024 00:05
@Alec4r

Alec4r commented Feb 5, 2024

Copy link
Copy Markdown
Contributor Author

@robrap @macdiesel @pwnage101 This PR adds the code that was reverted here: #34110

We relocated the script to "base_site.html" and integrated the snippet using the "extrahead" block to mitigate issues with enterprises: See here.

@MaferMazu

Copy link
Copy Markdown
Contributor

Hello @Alec4r, thanks for this PR.

The functionality that adds the dismiss button and shows the thanks message works as expected.
The only thing is that I don't know how to verify that the jQuery is not loaded twice.

@macdiesel @pwnage101 @Alec4r, can you please provide me with some guidance on verifying that the jQuery is not loaded twice?

@felipemontoya

Copy link
Copy Markdown
Member

@MaferMazu great question. To be sure, you can check the comparison between this PR and the code at sha: f52c9c6 (this is right before the PR 34110 was reverted).

When doing the comparison you need to navigate to a url of the type:
https://{domain}/admin/enterprise/enterprisecustomer/{your_uuid_for_testing}/manage_learners

Where you can see the source html of the page and search for jquery

@MaferMazu MaferMazu left a comment

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.

Thanks, @felipemontoya, for the explanation.
This is the before and after I get.

This looks good to me. Thanks for the PR, @Alec4r.

What do you think @macdiesel?

@felipemontoya felipemontoya left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks @Alec4r. I tested this just now and it works as advertised. Thanks for moving the js code to its own file.

I tested the double jquery issue in general pages and the manage_learners page as well and it is gone.

@MaferMazu

Copy link
Copy Markdown
Contributor

I tested again with the changes, and it worked as expected. Thanks @Alec4r 🌟

@felipemontoya
felipemontoya merged commit d59dbbd into openedx:master Feb 15, 2024
@openedx-webhooks

Copy link
Copy Markdown

@Alec4r 🎉 Your pull request was merged! Please take a moment to answer a two question survey so we can improve your experience in the future.

@edx-pipeline-bot

Copy link
Copy Markdown
Contributor

2U Release Notice: This PR has been deployed to the edX staging environment in preparation for a release to production.

@edx-pipeline-bot

Copy link
Copy Markdown
Contributor

2U Release Notice: This PR has been deployed to the edX production environment.

@edx-pipeline-bot

Copy link
Copy Markdown
Contributor

2U Release Notice: This PR has been deployed to the edX staging environment in preparation for a release to production.

@edx-pipeline-bot

Copy link
Copy Markdown
Contributor

2U Release Notice: This PR has been deployed to the edX production environment.

1 similar comment
@edx-pipeline-bot

Copy link
Copy Markdown
Contributor

2U Release Notice: This PR has been deployed to the edX production environment.

Alec4r added a commit to eduNEXT/edx-platform that referenced this pull request Feb 29, 2024
* feat: add dismiss button to survey report banner

* refactor: move banner script to js file

* fix: remove not in conditional
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

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

5 participants