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

@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

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: In Eng Review
Development

Successfully merging this pull request may close these issues.

4 participants