Skip to content

Add configurable More tab for white-label apps via OBAKitConfig.MoreTab#1104

Open
diveshpatil9104 wants to merge 1 commit intoOneBusAway:mainfrom
diveshpatil9104:feature/666-customize-more-tab
Open

Add configurable More tab for white-label apps via OBAKitConfig.MoreTab#1104
diveshpatil9104 wants to merge 1 commit intoOneBusAway:mainfrom
diveshpatil9104:feature/666-customize-more-tab

Conversation

@diveshpatil9104
Copy link
Contributor

Summary

Adds white-label customization for the More/Settings tab via OBAKitConfig.MoreTab in project.yml, addressing #666 and #614.

Agencies can now configure:

  • Custom header support text (replaces "made by volunteers")
  • Show/hide the Help Out section entirely
  • Override Translate and Develop URLs (or hide them)
  • Add custom resource links (website, phone, etc.)

Also fixes pre-existing issues:

  • 8 closures missing [weak self] (retain cycle risk)
  • Force-unwrapped URLs in Help Out section
  • Hardcoded "Donate to OneBusAway" replaced with Bundle.main.appName

Changes

File What
OBAKitCore/Models/MoreTab/MoreTabConfiguration.swift New config model parsed from Info.plist
OBAKitCore/Extensions/FoundationExtensions.swift Bundle extension for moreTabConfiguration
OBAKit/Settings/MoreViewController.swift Config-aware sections, custom links, [weak self] fixes
OBAKit/Settings/MoreHeaderController.swift Configurable header support text
Apps/OneBusAway/project.yml Explicit defaults (no visible change)
Apps/KiedyBus/project.yml Custom header, hidden Help Out, goEuropa link
OBAKitTests/Modeling/MoreTabConfigurationTests.swift 10 unit tests

Example Config (KiedyBus)

MoreTab:
  HeaderSupportText: "Powered by goEuropa"
  ShowHelpOutSection: false
  CustomLinks:
    - Title: "goEuropa Website"
      URL: "https://www.goeuropa.eu"

Design Decisions

  • Follows existing donationsConfig pattern — no new architecture, just extends OBAKitConfig
  • Backwards compatible — no config = current behavior unchanged
  • No force unwraps — failable init + compactMap for malformed links

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.

1 participant