Skip to content

Platform UI fixes. - #5926

Merged
gettinToasty merged 7 commits into
masterfrom
mw_p_fixes
May 20, 2026
Merged

Platform UI fixes.#5926
gettinToasty merged 7 commits into
masterfrom
mw_p_fixes

Conversation

@michelinewu

@michelinewu michelinewu commented May 20, 2026

Copy link
Copy Markdown
Contributor

Platform onboarding, access-rule tags, and Go Live form fixes

Issues

  • New platform was missing from the onboarding flow, so users couldn't connect it during initial setup.
  • The Go Live window had no UI for selecting the platform's audience access rules / tiers when starting a stream.
  • Editing a field in one platform's Go Live form cleared unrelated fields on other platforms when the shared form state updated.
  • The title and description fields on CommonPlatformFields were being cleared whenever the form re-synced after a platform settings update.
  • The platform access-rules selector wasn't filtering correctly: "All Tiers" and individual tiers could end up in inconsistent states (free tier showing, "All Tiers" not deselecting when a specific tier was picked, empty selection not restoring the default).

Changes

Onboarding (04cb9b5e)

  • Added the platform to the onboarding Connect step and PrimaryPlatformSelect list so it can be linked alongside the other platforms.

Access-rule tags input (d8b705b7)

  • Added an Audience radio control (All Members / Paid) to the platform's Go Live edit panel.
  • Added a TagsInput-backed tier picker shown when Paid is selected, with new patreon.json strings.
  • Extended RadioInput and TagsInput shared components to support the layout, child-rendering, and label behaviors the new panel needs; small DisplaySelector adjustment for consistency.
  • Added a PatreonEditStreamInfo.m.less module for the panel-specific styling.

Go Live form — unrelated-field clearing (34f2853b)

  • Hardened useGoLiveSettings so a setPlatformSettings update merges into the existing platform state instead of replacing the whole settings object, which was wiping fields owned by other platforms.

Go Live form — title/description clearing (a426e355)

  • Reverted the over-eager re-sync in useGoLiveSettings that was overwriting in-progress edits, and updated CommonPlatformFields so title/description stay bound to the active form state instead of being reset on every platform update.

Platform rules filtering (83e91c47)

  • Reworked the Paid tier picker so the audience state is fully derived from accessRules:
    • Selecting Paid preselects the API's "all tiers" rule as a single tag.
    • Picking a specific tier removes the "All Tiers" tag.
    • Clearing all tiers restores "All Tiers" automatically.
    • Picking All Members hides the tier picker entirely instead of disabling it.
  • Filters the free rule out of the dropdown, and relabels the API's "paid" rule as All Tiers for display only — the stored value remains the real API key so what's sent to the backend is unchanged.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR focuses on UI/UX fixes around platform selection and Go Live settings, primarily improving Patreon audience/tier selection and some shared input components.

Changes:

  • Adds a Patreon “Audience” radio control with conditional tier selection and supporting styling/i18n strings.
  • Extends shared inputs: TagsInput now supports maxTagCount plus wrapper layout tweaks; RadioInput supports per-option children.
  • Small onboarding/display-selector adjustments (type cleanup, platform list updates, and a header margin tweak).

Reviewed changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
app/i18n/en-US/patreon.json Adds new Patreon UI strings for audience/tier selection.
app/components-react/windows/go-live/platforms/PatreonEditStreamInfo.tsx Reworks Patreon required fields from a single tags input into an audience radio + conditional tier tags input.
app/components-react/windows/go-live/platforms/PatreonEditStreamInfo.m.less Adds layout overrides for the new Patreon audience/tier UI.
app/components-react/windows/go-live/CommonPlatformFields.tsx Forces controlled behavior for title/description inputs.
app/components-react/shared/inputs/TagsInput.tsx Adds maxTagCount, and introduces nomargin/nolabel wrapper behaviors.
app/components-react/shared/inputs/RadioInput.tsx Adds children rendering per radio option and adjusts layout styling behavior.
app/components-react/shared/DisplaySelector.tsx Removes unused type import and aligns dictionary typing with ICustomRadioOption.
app/components-react/pages/onboarding/PrimaryPlatformSelect.tsx Adds Patreon to the connectable platforms list and reorders some platform options.
app/components-react/pages/onboarding/Connect.tsx Changes title margin styling (currently using an invalid React inline style value).

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

Comment on lines +26 to +39
// Memoize tier options and related values to avoid unnecessary calculations on each render
const { allTiersRule, tierOptions, allRuleValues, allTiersValue } = useMemo(() => {
const rules = PatreonService.accessRules;
const paidRule = rules.find(rule => rule.label.toLowerCase() === 'paid');
return {
allTiersRule: paidRule,
tierOptions: rules.filter(
rule => rule.label.toLowerCase() !== 'free' && rule.value !== paidRule?.value,
),
allRuleValues: rules.map(rule => rule.value),
allTiersValue: paidRule?.value,
};
// eslint-disable-next-line react-hooks/exhaustive-deps
}, []);
Comment on lines +61 to +80
const onTagsChange = useCallback(
(newValues: string[]) => {
const addedAllTiers =
!!allTiersValue && newValues.includes(allTiersValue) && !allTiersSelected;
const stripped = allTiersValue ? newValues.filter(v => v !== allTiersValue) : newValues;

if (newValues.length === 0) {
updateSettings({ accessRules: allTiersValue ? [allTiersValue] : [] });
return;
}

if (addedAllTiers) {
updateSettings({ accessRules: [allTiersValue!] });
return;
}

updateSettings({ accessRules: stripped });
},
[allTiersValue, allTiersSelected, updateSettings],
);
<InputWrapper
{...wrapperAttrs}
nolabel={p?.nolabel}
style={{ margin: p.nomargin ? '0px' : 'inherit' }}
<Space
size={p?.gapsize ?? undefined}
direction={p?.direction ?? 'vertical'}
style={p?.style}
<div className={styles.pageContainer}>
<div className={styles.container}>
<h1 className={commonStyles.titleContainer} style={{ marginTop: 0 }}>
<h1 className={commonStyles.titleContainer} style={{ marginTop: '0px !important' }}>
@bundlemon

bundlemon Bot commented May 20, 2026

Copy link
Copy Markdown

BundleMon

Files updated (1)
Status Path Size Limits
renderer.(hash).js
7.76MB (+5.19KB +0.07%) -
Unchanged files (3)
Status Path Size Limits
vendors~renderer.(hash).js
4.67MB -
updater.js
115.29KB -
guest-api.js
40.23KB -

Total files change +5.19KB +0.04%

Final result: ✅

View report in BundleMon website ➡️


Current branch size history | Target branch size history

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 10 out of 10 changed files in this pull request and generated 3 comments.

Comments suppressed due to low confidence (2)

app/components-react/windows/go-live/platforms/PatreonEditStreamInfo.tsx:41

  • useMemo(..., []) caches PatreonService.accessRules-derived values forever and suppresses the exhaustive-deps rule. Since accessRules are populated asynchronously (e.g., after validatePlatform() updates service state), this component can permanently keep empty/stale tierOptions/allRuleValues, leading to incorrect audience defaults and wrong accessRules being written. Compute these values from the current PatreonService.accessRules each render, or include a stable accessRules dependency so the memo recomputes when rules change (and remove the eslint disable).
  // Memoize tier options and related values to avoid unnecessary calculations on each render
  const { allTiersRule, tierOptions, allRuleValues, allTiersValue } = useMemo(() => {
    const rules = PatreonService.accessRules;
    const paidRule = rules.find(rule => rule.label.toLowerCase() === 'paid');
    return {
      allTiersRule: paidRule,
      tierOptions: rules.filter(
        rule => rule.label.toLowerCase() !== 'free' && rule.value !== paidRule?.value,
      ),
      allRuleValues: rules.map(rule => rule.value),
      allTiersValue: paidRule?.value,
    };
    // Note: PatreonService.accessRules is assumed to be static or memoized itself
    // so it's safe to omit it from dependencies
    // eslint-disable-next-line react-hooks/exhaustive-deps
  }, []);

app/components-react/windows/go-live/platforms/PatreonEditStreamInfo.tsx:46

  • audienceType is stored in local state and only initialized from patreonSettings.accessRules. If p.value.accessRules changes due to external form re-sync / settings updates, the radio selection can become out of sync with the actual accessRules being submitted. Derive audienceType directly from patreonSettings.accessRules (and update via updateSettings), or add an effect to keep the state synchronized when patreonSettings.accessRules changes.
  const [audienceType, setAudienceType] = useState<TPatreonAudienceType>(() => {
    const ruleCount = patreonSettings.accessRules.length;
    return ruleCount === 0 || ruleCount === allRuleValues.length ? 'all' : 'paid';
  });

@@ -1,27 +1,115 @@
import React from 'react';
import React, { useMemo, useState, useCallback } from 'react';
return p.tagRender(tagProps, tag);
}
return <Tag {...tagProps}>{tag.label}</Tag>;
return <Tag {...tagProps}>{tag?.label}</Tag>;
Comment on lines 95 to 99
return (
<div className={styles.pageContainer}>
<div className={styles.container}>
<h1 className={commonStyles.titleContainer} style={{ marginTop: 0 }}>
{title}
</h1>
<h1 className={commonStyles.titleContainer}>{title}</h1>
{isSignup ? (
@gettinToasty
gettinToasty merged commit 0f74b33 into master May 20, 2026
15 of 17 checks passed
@gettinToasty
gettinToasty deleted the mw_p_fixes branch May 20, 2026 20:08
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.

4 participants