Repository navigation
feat: Enterprise squads toggle the verified badge and ad-free - #7402
Merged
Merged
Conversation
Enterprise squads can now hide their verified badge and turn ads back on from Manage > Branding. Squads whose plan doesn't include them see both settings locked to Enterprise, so they know the package has them. The plan still decides what a squad is entitled to (verified, adFree). The new showVerifiedBadge and hideAds fields carry the admins' choice: every badge reads showsVerifiedBadge and every ad placement reads isSourceAdFree, both falling back to the entitlement. Places where verified unlocks features (brand color, products, discover grouping) keep reading verified.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Enterprise squads can now control two Enterprise features from Manage → Branding, under a new "Enterprise" block:
Each switch saves as soon as it is toggled (optimistic, rolled back with a toast on error). A squad whose plan does not include the feature sees it as a locked
SquadEnterpriseGatewith the Enterprise pill, so it knows the feature exists and is part of Enterprise. The Branding planGates lock inmanage.tsxis unchanged.How
SourceFeaturesgainsshowVerifiedBadgeandhideAds.verifiedandadFreestill mean the plan includes the feature.showsVerifiedBadge(source)=showVerifiedBadge ?? verified. It replacesverifiedat every place that rendersVerifiedSquadBadgeor the logo seal (squad header, manage header, rows/cards, sidebar, post source, reader strip, composer audience chip, hybrid column, highlights, profile and stack tooltips, discover, tool cards, comment join banner, feed card seal). Places whereverifiedunlocks features (brand color, products limit, isCompanySquad, upsells, discover grouping, tool page card choice) keep readingverified.isSourceAdFree=hideAds ?? adFree, so every ad placement follows the admins choice.updateSquadSettings(sourceId, showVerifiedBadge, hideAds)mutation anduseUpdateSquadSettingshook, which updates the squad cache.verifiedfield. That needs the API to send the effective value.Depends on daily-api
This needs the daily-api PR that adds
SourceFeatures.showVerifiedBadge,SourceFeatures.hideAdsand theupdateSquadSettingsmutation. Merge after that PR is deployed. The queries now select the new fields, so they would fail against an API that does not have them yet. Once the API is live, the client falls back toverified/adFreewherever the new fields come back null.Tests
features.spec.ts: badge fallback and the hidden badgeads.spec.ts: ads turned back on, andhideAdsfrom the APISquadEnterpriseSettings.spec.tsx: locked gates without the plan, and each switch sending the mutationSquadPage,PostPage,ToolPage,ReadArticlePagepass. Strict typecheck on the changed files and oxlint are clean.🤖 Written by Smith (AI) on behalf of @nimrodkra
Preview domain
https://feat-squad-enterprise-settings.preview.app.daily.dev