Skip to content

Allow customization on homepage and footer#922

Merged
jp-tosca merged 10 commits intodevelopfrom
791-allow-customization-of-the-homepage-remove-harvard-specific-content
Mar 20, 2026
Merged

Allow customization on homepage and footer#922
jp-tosca merged 10 commits intodevelopfrom
791-allow-customization-of-the-homepage-remove-harvard-specific-content

Conversation

@ChengShi-1
Copy link
Copy Markdown
Contributor

@ChengShi-1 ChengShi-1 commented Feb 12, 2026

What this PR does / why we need it:

The homepage displays 'Harvard’ as name of the archive and has links to the Harvard support page.

Which issue(s) this PR closes:

Special notes for your reviewer:

There is a test failing due to test coverage

Suggestions on how to test this:

Check if there are any "Harvard" related text on the page
image

Does this PR introduce a user interface change? If mockups are available, please link/include them here:

Is there a release notes or changelog update needed for this change?:

Yes

Additional documentation:

@github-actions github-actions Bot added FY26 Sprint 17 FY26 Sprint 17 (2026-02-11 - 2026-02-25) Project: HDV SPA Rollout SPA labels Feb 12, 2026
@ChengShi-1 ChengShi-1 added Size: 3 A percentage of a sprint. 2.1 hours. Project: HDV SPA Rollout FY26 Sprint 17 FY26 Sprint 17 (2026-02-11 - 2026-02-25) and removed SPA Project: HDV SPA Rollout FY26 Sprint 17 FY26 Sprint 17 (2026-02-11 - 2026-02-25) labels Feb 12, 2026
@coveralls
Copy link
Copy Markdown

coveralls commented Feb 12, 2026

Coverage Status

coverage: 97.798% (+0.4%) from 97.41%
when pulling 7b7cdab on 791-allow-customization-of-the-homepage-remove-harvard-specific-content
into 99905e5 on develop.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This pull request makes the homepage and footer customizable by introducing runtime configuration options for organization-specific branding. Previously, the application had hard-coded references to "Harvard Dataverse" and Harvard-specific URLs, making it unsuitable for deployment by other organizations. The changes introduce three new optional configuration sections (branding, homepage, and footer) that allow organizations to customize the dataverse name, support URL, copyright holder, and privacy policy URL without rebuilding the application.

Changes:

  • Added runtime configuration schema for branding, homepage, and footer customization in src/config.ts
  • Updated Footer component to use configurable copyright holder and privacy policy URL
  • Updated Usage component to use configurable dataverse name and support URL
  • Modified translation strings to use interpolation for dynamic branding values

Reviewed changes

Copilot reviewed 12 out of 12 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
src/config.ts Added zod schema definitions for optional branding, homepage, and footer configuration objects
src/sections/layout/footer/Footer.tsx Updated to use configurable copyrightHolder and privacyPolicyUrl from app config with proper fallbacks and optional chaining
src/sections/homepage/usage/Usage.tsx Modified to use configurable dataverseName and supportUrl from app config (has critical issues with null safety)
public/config.js Added default configuration values for branding, homepage, and footer sections with Harvard-specific defaults
cypress.config.ts Added test configuration values for branding, homepage, and footer sections
tests/support/bootstrapAppConfig.ts Extended test config builder to support new branding, homepage, and footer configuration
tests/component/sections/layout/footer/Footer.spec.tsx Added test coverage for privacy policy link and updated repository interface to match expanded API
public/locales/en/homepage.json Changed hard-coded "Harvard Dataverse" strings to use {{dataverseName}} interpolation
public/locales/es/homepage.json Changed hard-coded "Harvard Dataverse" strings to use {{dataverseName}} interpolation
public/locales/en/footer.json Updated copyright translation to use {{copyrightHolder}} interpolation
public/locales/es/footer.json Updated copyright translation to use {{copyrightHolder}} interpolation
CHANGELOG.md Added entry documenting the new runtime configuration options
Comments suppressed due to low confidence (1)

src/sections/homepage/usage/Usage.tsx:89

  • The Usage component now uses configurable branding values (dataverseName, supportUrl) but lacks test coverage. Other homepage components like Metrics and SearchInput have dedicated test files in tests/component/sections/homepage/. Consider adding tests to verify that: 1) the dataverseName interpolation works correctly in the translation strings, 2) the supportUrl is properly used in the link, 3) fallback behavior works when branding config is not provided, and 4) the component handles undefined branding/homepage config objects gracefully.
export const Usage = ({ collectionId }: UsageProps) => {
  const { t } = useTranslation('homepage', { keyPrefix: 'usage' })
  const appConfig = requireAppConfig() as AppConfig
  const dataverseName = appConfig.branding.dataverseName ?? 'Dataverse'
  const supportUrl = appConfig.homepage.supportUrl

  return (
    <Row>
      <Col xs={12} lg={4} className={styles.column_card}>
        <Card className={styles.card}>
          <Card.Body className={styles.card_body}>
            <h5>{t('datasets.title')}</h5>
            <p className="small text-muted">{t('datasets.content')}</p>
            <footer className={styles.footer_wrapper}>
              <Link
                to={RouteWithParams.CREATE_DATASET(collectionId)}
                className="btn btn-secondary btn-sm">
                <Stack direction="horizontal" gap={1}>
                  <span className={styles.cta_link_text}>{t('datasets.text_button')}</span>{' '}
                  <Plus size={22} />
                </Stack>
              </Link>
            </footer>
          </Card.Body>
        </Card>
      </Col>
      <Col xs={12} lg={4} className={styles.column_card}>
        <Card className={styles.card}>
          <Card.Body className={styles.card_body}>
            <h5>{t('collections.title')}</h5>
            <p className="small text-muted">{t('collections.content')}</p>
            <footer className={styles.footer_wrapper}>
              <Link
                to={RouteWithParams.CREATE_COLLECTION(collectionId)}
                className="btn btn-secondary btn-sm">
                <Stack direction="horizontal" gap={1}>
                  <span className={styles.cta_link_text}>{t('collections.text_button')}</span>{' '}
                  <Plus size={22} />
                </Stack>
              </Link>
            </footer>
          </Card.Body>
        </Card>
      </Col>

      <Col xs={12} lg={4} className={styles.column_card}>
        <Card className={styles.card}>
          <Card.Body className={styles.card_body}>
            <h5>{t('general.title', { dataverseName })}</h5>
            <p className="small text-muted">{t('general.content')}</p>
            <footer className={styles.footer_wrapper}>
              <a
                href={supportUrl}
                target="_blank"
                rel="noreferrer noopener"
                className="btn btn-secondary btn-sm">
                <Stack direction="horizontal" gap={2}>
                  <span className={styles.cta_link_text}>{t('general.text_button')}</span>
                  <BoxArrowUpRight size={14} />
                </Stack>
              </a>
            </footer>
          </Card.Body>
        </Card>
      </Col>
    </Row>
  )
}

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/sections/homepage/usage/Usage.tsx
Comment thread CHANGELOG.md
Comment thread public/config.js
Comment thread src/sections/homepage/usage/Usage.tsx Outdated
Comment thread src/sections/homepage/usage/Usage.tsx Outdated
Comment thread src/sections/homepage/usage/Usage.tsx Outdated
@ChengShi-1 ChengShi-1 self-assigned this Feb 12, 2026
@ChengShi-1 ChengShi-1 moved this to This Sprint 🏃‍♀️ 🏃 in IQSS Dataverse Project Feb 13, 2026
@ChengShi-1 ChengShi-1 moved this from This Sprint 🏃‍♀️ 🏃 to In Progress 💻 in IQSS Dataverse Project Feb 13, 2026
@ChengShi-1 ChengShi-1 removed their assignment Feb 13, 2026
@ChengShi-1 ChengShi-1 moved this from In Progress 💻 to Ready for Review ⏩ in IQSS Dataverse Project Feb 13, 2026
@ChengShi-1 ChengShi-1 marked this pull request as ready for review February 13, 2026 19:02
@cmbz cmbz added the FY26 Sprint 18 FY26 Sprint 18 (2026-02-25 - 2026-03-11) label Feb 26, 2026
@ekraffmiller ekraffmiller added the GREI Re-arch GREI re-architecture-related label Feb 26, 2026
@ekraffmiller ekraffmiller self-assigned this Feb 26, 2026
@ekraffmiller ekraffmiller moved this from Ready for Review ⏩ to In Review 🔎 in IQSS Dataverse Project Feb 26, 2026
Copy link
Copy Markdown
Contributor

@ekraffmiller ekraffmiller left a comment

Choose a reason for hiding this comment

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

This looks good! My only comment is to add a component test for Usage.tsx, just to keep the test percentages high. :)
Also, there seems to be an outage issue with coveralls right now, so if it fails for that reason we can ignore it. (https://status.coveralls.io/)

Copy link
Copy Markdown
Contributor

@ekraffmiller ekraffmiller left a comment

Choose a reason for hiding this comment

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

looks good, approved!

@github-project-automation github-project-automation Bot moved this from In Review 🔎 to Ready for QA ⏩ in IQSS Dataverse Project Mar 4, 2026
@ekraffmiller ekraffmiller removed their assignment Mar 4, 2026
@cmbz cmbz added this to the 6.11 milestone Mar 11, 2026
@jp-tosca jp-tosca self-assigned this Mar 20, 2026
@scolapasta scolapasta moved this from Ready for QA ⏩ to QA ✅ in IQSS Dataverse Project Mar 20, 2026
@ChengShi-1 ChengShi-1 requested a review from ekraffmiller March 20, 2026 17:16
Copy link
Copy Markdown
Contributor

@ekraffmiller ekraffmiller left a comment

Choose a reason for hiding this comment

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

looks good!

@github-project-automation github-project-automation Bot moved this from QA ✅ to Ready for QA ⏩ in IQSS Dataverse Project Mar 20, 2026
@ChengShi-1 ChengShi-1 moved this from Ready for QA ⏩ to QA ✅ in IQSS Dataverse Project Mar 20, 2026
@jp-tosca jp-tosca merged commit af38702 into develop Mar 20, 2026
13 of 18 checks passed
@github-project-automation github-project-automation Bot moved this from QA ✅ to Merged 🚀 in IQSS Dataverse Project Mar 20, 2026
@jp-tosca jp-tosca removed their assignment Mar 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

FY26 Sprint 17 FY26 Sprint 17 (2026-02-11 - 2026-02-25) FY26 Sprint 18 FY26 Sprint 18 (2026-02-25 - 2026-03-11) GREI Re-arch GREI re-architecture-related Project: HDV SPA Rollout Size: 3 A percentage of a sprint. 2.1 hours. SPA.Q1.2026.4 High Priority Bug Fixes

Projects

Status: Done 🧹

Development

Successfully merging this pull request may close these issues.

Allow customization of the homepage (remove Harvard-specific content)

7 participants