SdkSurface

fun SdkSurface(client: FeedbackClient, feature: SdkFeature, content: @Composable () -> Unit)(source)

Remote feature gate and theming wrapper for SDK UI surfaces.

Wraps content inside a console-styled MaterialTheme and checks whether feature is enabled in SdkAppearance.features. If enabled, content is rendered normally. If the feature has been disabled remotely from the CupThread console, a styled placeholder empty state is rendered informing the user that the surface is currently unavailable.

All ready-made SDK screens (RoadmapBoardScreen, FeatureRequestsScreen, WhatsNewScreen, and FeedbackComposer) use SdkSurface internally. You can also use SdkSurface to guard your own custom UI modules:

@Composable
fun CustomRoadmapTab(client: FeedbackClient, userToken: String) {
SdkSurface(client = client, feature = SdkFeature.ROADMAP) {
// This block only executes if ROADMAP is enabled in the CupThread console.
MyCustomRoadmapKanbanView(client = client, userToken = userToken)
}
}

Parameters

client

Shared FeedbackClient instance used to check remote feature flags and appearance.

feature

The target SdkFeature required to display content.

content

The surface composable content rendered when feature is enabled.