Skip to content

Conversation

@zubairshakoorarbisoft
Copy link

@zubairshakoorarbisoft zubairshakoorarbisoft commented May 27, 2025

Description

This PR ensures footer consistency across all Indigo theme pages by using the LMS footer as the default. It also supports additional navigation links via configuration.

Changes

Added support for INDIGO_FOOTER_NAV_LINKS in config to allow custom navigation links.
Fallbacks to Tutor Indigo defaults when no config is provided.

I have created the following PR in indigo, this PR depends on:
overhangio/tutor-indigo#167

Related issue overhangio/tutor-indigo#146

Related Taiga issues:

  1. https://tree.taiga.io/project/zaraahmed-tutor-indigo-accessibility/us/61
  2. https://tree.taiga.io/project/zaraahmed-tutor-indigo-accessibility/us/137

Before:
image

After:
image

@DawoudSheraz
Copy link

This PR should be rebased and then created against indigo/teak, not master.

@zubairshakoorarbisoft zubairshakoorarbisoft changed the base branch from master to teak/indigo June 10, 2025 13:07
@codecov
Copy link

codecov bot commented Jun 10, 2025

Welcome to Codecov 🎉

Once you merge this PR into your default branch, you're all set! Codecov will compare coverage reports and display results in all future pull requests.

Thanks for integrating Codecov - We've got you covered ☂️

Comment on lines 73 to 84

<nav className="nav-colophon" aria-label="About">
<ol>
<li><a href={`${config.LMS_BASE_URL}/about`}>About Us</a></li>
<li><a href={`${config.LMS_BASE_URL}/blog`}>Blog</a></li>
<li><a href={`${config.LMS_BASE_URL}/donate`}>Donate</a></li>
<li><a href={`${config.LMS_BASE_URL}/tos`}>Terms of Service</a></li>
<li><a href={`${config.LMS_BASE_URL}/privacy`}>Privacy Policy</a></li>
<li><a href={`${config.LMS_BASE_URL}/help`}>Help</a></li>
<li><a href={`${config.LMS_BASE_URL}/contact`}>Contact Us</a></li>
</ol>
</nav>

Choose a reason for hiding this comment

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

This will cause some conflicting behavior across legacy and MFE pages. In tutor-indigo, footer links on legacy pages can be toggled (https://github.com/overhangio/tutor-indigo/blob/release/tutorindigo/templates/indigo/lms/templates/footer.html). In here, the links will show all the times. The behavior needs to be consistent.

} = this.props;
const showLanguageSelector = supportedLanguages.length > 0 && onLanguageSelected;
const config = getConfig();
const indigoFooterNavLinks = config.INDIGO_FOOTER_NAV_LINK || [];

Choose a reason for hiding this comment

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

Should there be default links in case the config is not present? Otherwise, it would look like an empty footer.

Copy link
Author

@zubairshakoorarbisoft zubairshakoorarbisoft Jun 19, 2025

Choose a reason for hiding this comment

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

@DawoudSheraz We are getting INDIGO_FOOTER_NAV_LINKS variable from indigo side, if there is any default one, will reflect here otherwise it should be same as legacy pages.

Choose a reason for hiding this comment

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

How will it be same as legacy pages?

Choose a reason for hiding this comment

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

because INDIGO_FOOTER_NAV_LINKS is setting from indigo with following command:
tutor config save --set "INDIGO_FOOTER_NAV_LINKS=[{"title": "About", "url": "/about"}, {"title": "Contact", "url": "/contact"}]"
And we are using that same value here in footer component so that the navlinks on both sides will same.

Choose a reason for hiding this comment

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

Let's say you unset the INDIGO_FOOTER_NAV_LINKS variable using the following command:

tutor config save --unset "INDIGO_FOOTER_NAV_LINKS"

When this is done, Tutor automatically sets a default set of 7 footer navigation links for all MFEs. So, if INDIGO_FOOTER_NAV_LINKS is not explicitly set, Tutor Indigo provides default navlinks across every MFE.

The following line sets the default value for INDIGO_FOOTER_NAV_LINKS in the Tutor config at this path:
env/apps/openedx/settings/lms/production.py

MFE_CONFIG['INDIGO_FOOTER_NAV_LINKS'] = [
    {'title': 'About Us', 'url': '/about'},
    {'title': 'Blog', 'url': '/blog'},
    {'title': 'Donate', 'url': '/donate'},
    {'title': 'Terms of Service', 'url': '/tos'},
    {'title': 'Privacy Policy', 'url': '/privacy'},
    {'title': 'Help', 'url': '/help'},
    {'title': 'Contact Us', 'url': '/contact'}
]

To open this file, first run the following command to locate the Tutor environment root:

tutor config printroot

This will output the path to your Tutor project. Navigate to that directory and open the file at:

env/apps/openedx/settings/lms/production.py

Here, you’ll find where Tutor sets the default footer nav links.

However, if we’re not using Indigo (e.g., using this footer component in another theme or in a standalone setup), we default to an empty array, since the default edx-platform configuration does not include any footer navlinks. You can confirm this in the Footer.jsx source code.

Copy link

@DawoudSheraz DawoudSheraz left a comment

Choose a reason for hiding this comment

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

  • Please fix the coverage issue
  • Wait for a 2nd review before merge.

@arbirali arbirali force-pushed the zubair/TIA-137-61 branch from afe0392 to 4e78bcc Compare June 23, 2025 12:24
@arbirali
Copy link

@zubairshakoorarbisoft I updated the test coverage for the footer nav the test coverage for the footer nav

CC: @DawoudSheraz

@regisb
Copy link
Member

regisb commented Jul 31, 2025

Can we merge this? If not, what is blocking us?

@DawoudSheraz
Copy link

This PR depends on overhangio/tutor-indigo#167. That PR was closed when teak was merged. @zubairshakoorarbisoft / @arbirali is yet to create a follow-up.

@arbirali
Copy link

@DawoudSheraz, there is already an open PR related to this overhangio/tutor-indigo#171

Copy link

@ahmed-arb ahmed-arb left a comment

Choose a reason for hiding this comment

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

Nit: @arbirali The PR title and description are outdated. Could you please update them?

@arbirali arbirali changed the title Made the actual LMS footer a default for all the pages in Indigo Theme feat: add navigation links to make footer consistent Aug 29, 2025
@arbirali
Copy link

@ahmed-arb PR title and description changed accordingly.

@ahmed-arb ahmed-arb merged commit e220ad2 into edly-io:teak/indigo Aug 29, 2025
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants