Built-in extensions are always on and there's no third-party install path yet, so the Extensions tab is a notice rather than a toggle list — a toggle list would let users brick the app by disabling load-bearing builtins. It explains that installing/enabling/disabling arrives with third-party (Lua) extensions and points at the records that pick it up (D-16 / T-8). Fleshes out the builtin.extensions-ui stub via the custom-control hatch. Adds two renderer guards — empty section/field labels render no chrome — so a notice-only category shows just its card. Tests: contributes the Extensions category + notice control; the notice renders. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
40 lines
1.4 KiB
Dart
40 lines
1.4 KiB
Dart
import 'package:clide/builtin/extensions_ui/src/extensions_notice.dart';
|
|
import 'package:clide/extension/extension.dart';
|
|
import 'package:clide/kernel/kernel.dart';
|
|
|
|
/// Extensions settings tab (T-456). Built-in extensions are always on and there
|
|
/// is no third-party install path yet, so the tab is a "watch this space"
|
|
/// notice pointing at the records that track extension management (D-16 / T-8)
|
|
/// rather than a toggle list. The real enable/install UI lands with third-party
|
|
/// (Lua) extensions.
|
|
class ExtensionsUiExtension extends ClideExtension {
|
|
@override
|
|
String get id => 'builtin.extensions-ui';
|
|
@override
|
|
String get title => 'Extensions UI';
|
|
@override
|
|
String get version => '0.1.0';
|
|
@override
|
|
List<String> get dependsOn => const [];
|
|
|
|
@override
|
|
List<ContributionPoint> get contributions => [
|
|
SettingsControlContribution(id: 'extensions-ui.notice-control', customId: 'extensions.notice', builder: (_) => const ExtensionsNotice()),
|
|
const SettingsCategoryContribution(
|
|
id: 'extensions',
|
|
category: SettingsCategory(
|
|
id: 'extensions',
|
|
title: 'Extensions',
|
|
iconName: 'puzzle-piece',
|
|
priority: 80,
|
|
sections: [
|
|
SettingsSection(
|
|
label: '',
|
|
fields: [SettingsField(key: 'app.extensions._notice', kind: SettingsFieldKind.custom, label: '', customId: 'extensions.notice')],
|
|
),
|
|
],
|
|
),
|
|
),
|
|
];
|
|
}
|