Skip to content

fix: replaced space for + char to render the filter correctly in the UI#140

Merged
jacobo-dominguez-wgu merged 2 commits into
openedx:masterfrom
WGU-Open-edX:filter-fix
Apr 28, 2026
Merged

fix: replaced space for + char to render the filter correctly in the UI#140
jacobo-dominguez-wgu merged 2 commits into
openedx:masterfrom
WGU-Open-edX:filter-fix

Conversation

@jesusbalderramawgu
Copy link
Copy Markdown
Contributor

@jesusbalderramawgu jesusbalderramawgu commented Apr 23, 2026

Issue

image

Description

The filter is showing spaces instead of "+" chars.
for example after the redirection to admin console this string
course-v1:TestOrg+101+2025_T1
is received as
course-v1:TestOrg 101 2025_T1

Fix

  • I made a change to keep the "+" char when the param is received

NOTE: after debugging I saw that we send the correct data

Screenshot 2026-04-23 at 3 56 05 p m Backend print in AUTHZ view Screenshot 2026-04-23 at 3 57 00 p m

UI
Screenshot 2026-04-23 at 4 05 30 p m

@openedx-webhooks openedx-webhooks added the open-source-contribution PR author is not from Axim or 2U label Apr 23, 2026
@openedx-webhooks
Copy link
Copy Markdown

Thanks for the pull request, @jesusbalderramawgu!

This repository is currently maintained by @openedx/committers-frontend.

Once you've gone through the following steps feel free to tag them in a comment and let them know that your changes are ready for engineering review.

🔘 Get product approval

If you haven't already, check this list to see if your contribution needs to go through the product review process.

  • If it does, you'll need to submit a product proposal for your contribution, and have it reviewed by the Product Working Group.
    • This process (including the steps you'll need to take) is documented here.
  • If it doesn't, simply proceed with the next step.
🔘 Provide context

To help your reviewers and other members of the community understand the purpose and larger context of your changes, feel free to add as much of the following information to the PR description as you can:

  • Dependencies

    This PR must be merged before / after / at the same time as ...

  • Blockers

    This PR is waiting for OEP-1234 to be accepted.

  • Timeline information

    This PR must be merged by XX date because ...

  • Partner information

    This is for a course on edx.org.

  • Supporting documentation
  • Relevant Open edX discussion forum threads
🔘 Get a green build

If one or more checks are failing, continue working on your changes until this is no longer the case and your build turns green.

Details
Where can I find more information?

If you'd like to get more details on all aspects of the review process for open source pull requests (OSPRs), check out the following resources:

When can I expect my changes to be merged?

Our goal is to get community contributions seen and reviewed as efficiently as possible.

However, the amount of time that it takes to review and merge a PR can vary significantly based on factors such as:

  • The size and impact of the changes that it introduces
  • The need for product review
  • Maintenance status of the parent repository

💡 As a result it may take up to several weeks or months to complete a review and merge your PR.

@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 23, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 97.64%. Comparing base (2b3b480) to head (8ca8dbf).
⚠️ Report is 7 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #140      +/-   ##
==========================================
+ Coverage   97.34%   97.64%   +0.30%     
==========================================
  Files          89       68      -21     
  Lines        2106     1572     -534     
  Branches      457      368      -89     
==========================================
- Hits         2050     1535     -515     
+ Misses         53       37      -16     
+ Partials        3        0       -3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

const intl = useIntl();
const [searchParams] = useSearchParams();
const presetScope = searchParams.get('scope') || undefined;
const presetScope = searchParams.get('scope')?.replace(/\s/g, '+') || undefined;
Copy link
Copy Markdown

@rodmgwgu rodmgwgu Apr 23, 2026

Choose a reason for hiding this comment

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

This works here because course and library key parts (org, run, number), don't accept spaces or special characters. Otherwise, this would potentially break keys with spaces (which is not the case).

However the root cause of this issue is that we are not url-encoding the query params on the links generated in frontend-app-authoring.

If we did that, the course key would be encoded as "course-v1%3AOpenedX%2BDemoX%2BDemoCourse", and on decode, it will come back correctly here as + instead of spaces.

We can keep this change as a fallback, but I think we should fix the root cause in frontend-app-authoring

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

thanks @rodmgwgu , I checked first on authoring and I saw the URL correctly there, but let me double check.
agreed that we should use encodeURI on authoring repo.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@rodmgwgu you were right, I've added the change to this PR
openedx/frontend-app-authoring#3023
and it works correct, thanks!

Copy link
Copy Markdown

@rodmgwgu rodmgwgu left a comment

Choose a reason for hiding this comment

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

This works, but let's fix the root cause in frontend-app-authoring

@jacobo-dominguez-wgu
Copy link
Copy Markdown
Contributor

Is this pr still needed after the encoding added in openedx/frontend-app-authoring#3023?

@jesusbalderramawgu
Copy link
Copy Markdown
Contributor Author

Is this pr still needed after the encoding added in openedx/frontend-app-authoring#3023?

I think we don't need it, but it Rodrigo mentioned that we could leave this as fallback.
I think we can leave it in case someone copies and pastes the url with "+" char
@rodmgwgu what do you think?

@rodmgwgu
Copy link
Copy Markdown

Is this pr still needed after the encoding added in openedx/frontend-app-authoring#3023?

I think we don't need it, but it Rodrigo mentioned that we could leave this as fallback. I think we can leave it in case someone copies and pastes the url with "+" char @rodmgwgu what do you think?

If we are keeping it, I think we should add a comment explaining it. Also I would like to hear @dcoa opinion on this.

@dcoa
Copy link
Copy Markdown
Contributor

dcoa commented Apr 24, 2026

I think having this as a fallback is good idea, usually the urls in learning or authoring has the courseKey as it is, not encoded, and users will feel more nature to copy and paste that. I agree to leave a explanation comment in the code.

In the future we can have a scope resolver if we need to cover other cases besides the '+' -> ' '.

@rodmgwgu @jesusbalderramawgu @jacobo-dominguez-wgu

Copy link
Copy Markdown

@rodmgwgu rodmgwgu left a comment

Choose a reason for hiding this comment

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

@jesusbalderramawgu Let's add the explanation comment and we are good to go, thanks!

@jesusbalderramawgu
Copy link
Copy Markdown
Contributor Author

Thank you, this has been updated

@jacobo-dominguez-wgu jacobo-dominguez-wgu merged commit eb12ea1 into openedx:master Apr 28, 2026
6 checks passed
@mphilbrick211 mphilbrick211 moved this from Needs Triage to Done in Contributions Apr 29, 2026
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

Status: Done

Development

Successfully merging this pull request may close these issues.

6 participants