Skip to content
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

fix: display SUPPORT_URL only if is configured #469

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

dcoa
Copy link

@dcoa dcoa commented Sep 28, 2024

Description

This PR removes the link of SUPPORT_URL from the Header if the service is not configured.

It aims to solve the following issue #373

How to test

  1. Create a instance with frontend-app-learner-dashobord mounted in the current branch.
  2. Launch the instance and open it in the browser.
  3. Access the learner dashboard.
  4. By default you should not see help nav button.
  5. Set the SUPPORT_URL config variable.
  6. Now the tab should be available.

@dcoa dcoa requested a review from a team as a code owner September 28, 2024 00:52
@openedx-webhooks openedx-webhooks added the open-source-contribution PR author is not from Axim or 2U label Sep 28, 2024
@openedx-webhooks
Copy link

Thanks for the pull request, @dcoa!

What's next?

Please work through the following steps to get your changes 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.

🔘 Let us know that your PR is ready for review:

Who will review my changes?

This repository is currently maintained by @2U-aperture. Tag them in a comment and let them know that your changes are ready for review.

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.

@dcoa dcoa modified the milestone: Redwood.1 Sep 28, 2024
Copy link

codecov bot commented Sep 28, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 97.40%. Comparing base (f250efb) to head (5e5132f).

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #469   +/-   ##
=======================================
  Coverage   97.40%   97.40%           
=======================================
  Files         157      157           
  Lines        1385     1387    +2     
  Branches      227      229    +2     
=======================================
+ Hits         1349     1351    +2     
  Misses         34       34           
  Partials        2        2           

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

@dcoa dcoa force-pushed the dcoa/header-optional-service-tab branch 2 times, most recently from fb3a02b to 65edd10 Compare September 29, 2024 10:23
@MaferMazu
Copy link

MaferMazu commented Oct 10, 2024

@dcoa, thanks for this PR.

I think it is easier to review if we split this PR by the issue the changes resolve <- But it is not a blocker comment.

About the Help button:
I think we should set the SUPPORT_URL='' in the .env.development environment like in production because we still have the issue in dev mode (the help button is enabled but not configured correctly).

And change in example.env.config.js file to use a more accurate route, for example http://local.edly.io:8000/help, which sends to a Help static template, or maybe localhost route + /help as the other examples. Because, in my understanding, the /support page is for staff members. Ref, the first Pr about the support page: openedx/edx-platform#9240 (and you can access a /support as staff but not as a student or other roles).

And I am unsure about removing the variable SUPPORT_URL in the .env.test. I think it is better to have two tests, one when the variable is seated and another when the variable is missing.

About the programs:
I'll test it this week.

@dcoa dcoa changed the title fix: don't display SUPPORT_URL and Programs if is not confogured fix: don't display SUPPORT_URL and Programs if is not configured Oct 10, 2024
@itsjeyd itsjeyd added the core contributor PR author is a Core Contributor (who may or may not have write access to this repo). label Oct 11, 2024
@MaferMazu
Copy link

MaferMazu commented Oct 11, 2024

About programs:
The functionality works as expected. I can't see the Programs tab when I don't have programs configured, but when I add the programs page as the discovery doc said here: https://github.com/overhangio/tutor-discovery?tab=readme-ov-file#show-programs-tab, the programs tab appears.

The only thing I have is that my Explore Programs button is redirecting to http://localhost:8080/programs, but I think it is for configuration issues rather than this PR.

Update: Yes, it was a configuration thing.

@MaferMazu
Copy link

@arbrandes, can you help me find someone from the Frontend WG to review this? I left my comments, but I think I need more frontend experience to review the implementation.

@MaxFrank13
Copy link
Member

Thanks for the contribution and addressing these two issues!

I agree with @MaferMazu that it would be ideal if we could break up this work into a PR for each issue. This helps if we need to roll back changes, especially since there is a different fix/implementation for each button. @dcoa what are your thoughts on this?

Aperture is the maintainer of this MFE and it would be ideal if we had a little time to get this on the docket for upcoming work. I have made an internal ticket for the team and we can prioritize it at the beginning of next week.

@dcoa
Copy link
Author

dcoa commented Oct 18, 2024

@MaferMazu @MaxFrank13 thanks for your comments.

The reason that I created a single PR is because from a component perspective is the same issue, rendering of optional links, but I will be happy to split it in 2 and address the other comments.

@dcoa dcoa force-pushed the dcoa/header-optional-service-tab branch from 65edd10 to b7dc47d Compare October 18, 2024 12:29
@dcoa dcoa changed the title fix: don't display SUPPORT_URL and Programs if is not configured fix: display SUPPORT_URL only if is configured Oct 18, 2024
@dcoa dcoa force-pushed the dcoa/header-optional-service-tab branch 4 times, most recently from 5ce7afb to af0552b Compare October 18, 2024 13:00
Copy link
Member

@MaxFrank13 MaxFrank13 left a comment

Choose a reason for hiding this comment

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

Thanks for splitting this up! This looks good to me and I've tested it in my local environment

@dcoa dcoa force-pushed the dcoa/header-optional-service-tab branch from af0552b to 5e5132f Compare October 22, 2024 20:04
Copy link
Contributor

@arbrandes arbrandes left a comment

Choose a reason for hiding this comment

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

LGTM!

Copy link

@MaferMazu MaferMazu left a comment

Choose a reason for hiding this comment

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

@dcoa, thanks for addressing my comments. I left other comments, but they were based on a previous version of this. This looks good to me. Thanks ✨


@arbrandes, we don't have permission to merge, so we need your help or @MaxFrank13's help to merge.

I know we are focused on the sumac cut, and I don't know if there is something we want to wait for or rush to merge this, but this is only to let you know that we don't have the powers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core contributor PR author is a Core Contributor (who may or may not have write access to this repo). open-source-contribution PR author is not from Axim or 2U
Projects
Status: Backlog
Status: Waiting on Author
Development

Successfully merging this pull request may close these issues.

6 participants