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

feat: ability to point header logo to other locations #479

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

arora-r
Copy link

@arora-r arora-r commented Apr 1, 2024

Description

Previously, the top left logo in the LMS header was hard coded to redirect learners to the /dashboard page. This PR introduces a configurable option (LOGO_DESTINATION) allowing administrators to customize the destination URL for the logo link. Now, learners can be redirected to any specified custom link, providing greater flexibility and customization within the LMS.

Code changes

  • Added a new setting (LOGO_DESTINATION) to dynamically control the destination URL of the logo in the header.
  • By utilizing an environment variable, we've simplified the process of configuring the logo link.
  • The default behavior (when the environment variable is not specified) remains unchanged, directing users to the LMS dashboard to maintain continuity with existing workflows.

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

openedx-webhooks commented Apr 1, 2024

Thanks for the pull request, @arora-r!

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 unmaintained.

To get help with finding a technical reviewer, tag the community contributions project manager for this PR in a comment and let them know that your changes are ready for review:

  1. On the right-hand side of the PR, find the Contributions project, click the caret in the top right corner to expand it, and check the "Primary PM" field for the name of your PM.
  2. Find their GitHub handle here.

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.

@mphilbrick211 mphilbrick211 added the needs test run Author's first PR to this repository, awaiting test authorization from Axim label Apr 2, 2024
@mphilbrick211
Copy link

Hi @arora-r! Thank you for this contribution! Please let me know if you have any questions regarding submitting a CLA form.

Copy link

codecov bot commented Apr 4, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 67.25%. Comparing base (c9942c1) to head (a02c750).
Report is 13 commits behind head on master.

❗ Current head a02c750 differs from pull request most recent head b6d14b0. Consider uploading reports for the commit b6d14b0 to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #479      +/-   ##
==========================================
+ Coverage   67.15%   67.25%   +0.09%     
==========================================
  Files          24       24              
  Lines         341      342       +1     
  Branches       80       81       +1     
==========================================
+ Hits          229      230       +1     
  Misses        110      110              
  Partials        2        2              

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

@mphilbrick211 mphilbrick211 removed the needs test run Author's first PR to this repository, awaiting test authorization from Axim label Apr 4, 2024
@arora-r arora-r changed the title feat: add a new logo destination env variable feat: ability to point logo to other locations Apr 10, 2024
@arora-r arora-r changed the title feat: ability to point logo to other locations feat: ability to point header logo to other locations Apr 10, 2024
@arora-r
Copy link
Author

arora-r commented Apr 30, 2024

Hey @mphilbrick211, any update on this issue - would we be able to get someone to review this and approved?

Anything I can do to get it pushed out sooner?

@mphilbrick211 mphilbrick211 added needs test run Author's first PR to this repository, awaiting test authorization from Axim and removed needs test run Author's first PR to this repository, awaiting test authorization from Axim labels May 1, 2024
@mphilbrick211
Copy link

Hi @arora-r! Thanks for your patience. We're looking into getting a reviewer for you. Thanks!

@arora-r
Copy link
Author

arora-r commented May 14, 2024

Hey @mphilbrick211 any update?

@mphilbrick211
Copy link

@arbrandes - is this something you could help with?

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.

I find the underlying premise is sound: we probably should allow people to change the logo URL.

At the same time, we find ourselves in a quagmire of toggles and configuration - some of it in the backend, some in the frontend - that we're actively trying to counter by the introduction of the (much) more flexible approach of plugin slots. You can find more details about how we're handling it for the footer here: openedx/wg-frontend#178.

In other words, would you consider your issue to be solved if you could create a plugin to override whatever is in the header as needed?

@arora-r
Copy link
Author

arora-r commented May 15, 2024

@arbrandes Thank you for your feedback! Creating a slot plugin would solve the underlying issue and reduce overall complexity. However, this PR offers an immediate and simple solution for administrators who need this functionality now, including myself, without the overhead of developing or integrating a plugin or the risks associated with forking the repo and adding potential vulnerabilities/falling behind.

Could we consider the slot implementation for the Header as a future enhancement and have this PR merged in the meantime?

@arbrandes
Copy link
Contributor

There are very similar conversations happening around the footer:

It can be gleaned from my comments there (and here) what my general opinion is: we should spring for plugins sooner rather than later in order to avoid adding yet more granular configuration. That doesn't mean my opinion is the only one that counts, though. Plus, the header is more complicated than the footer and will need more careful thought as to what sort of props we'll need to pass down into potential plugins.

I guess what I'm trying to say is that I'd like more input from the community before making a decision as maintainer. I'm going to start a thread in the forum and post the link here.

@arbrandes
Copy link
Contributor

As promised, here's the thread where we can continue the general conversation:

https://discuss.openedx.org/t/plugin-slots-vs-configuration/13009

@mphilbrick211
Copy link

@arora-r @arbrandes - is this still in progress, or can it be closed? Thanks!

@mphilbrick211 mphilbrick211 added the inactive PR author has been unresponsive for several months label Oct 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
inactive PR author has been unresponsive for several months open-source-contribution PR author is not from Axim or 2U
Projects
Status: In Eng Review
Development

Successfully merging this pull request may close these issues.

4 participants