hackclub / hackclub/hcb

[White label] Substitute "HCB" for Organization name on donation page

Open
#9,826 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
Ruby
Stars
870
Forks
138
Avg merge
1d 14h
Merged PRs (30d)
208

Description

When white labeling is enabled, it should do the following on the donation page:
- Instead of saying "HCB", it should just have the organization name.
- Anywhere on the page
- The page title
- Don't worry about the code itself or any non-visible text (e.g. HTML)
- Remove the "fiscally sponsored by" message at the bottom of the page.

Make this an organization setting.

### Implementation

This is really important. The rails app should have a nice way to determine:
1. Whether this page is white-labeled or not (which depends on the organization)
2. If the page is white-labeled, it should know what name to use. If not white-labeled, fallback to "HCB'.

In other words, abstract out the logic for this so we don't need to handle it in every view.
Here's a very simple non-production-ready version of what I'm talking about:

```ruby
module ApplicationHelper
def white_labeled?
@white_label && @event&.white_label?
end

def platform_name(fallback: "HCB")
white_labeled? ? @event.name : fallback
end
end

class DonationController
before_action { @white_label = true }
end
```
```erb
Donation page by <%= platform_name %>
```

Contributor guide

Open the contributing guide

Research direction

Start at the donation page and the organization setting, then review the proposed ApplicationHelper and DonationController entry points. Trace every visible HCB reference and the fiscally sponsored message, including the page title. Done means white-labeled pages show the organization name and omit that message, while other pages retain the HCB fallback.

Written by the indexing model from the issue text.

Assessment

Tech stack
rails, ruby
Domain
full-stack
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.