Make Git a native feature with an off switch
- Add the native feature runtime in src/lib/features/: the catalog, the switches, the first-start migration, the loader, and the feature sessions. - Add Settings → Features and the features settings section. - Add features_legacy. It reads the old plugin packages and changes nothing. - Move Git from the plugin into src/lib/features/git/, on host internals. - Remove api.git, the git contribution key, and the SDK Git types. - Add pnpm check:features. It fails when a feature module loads at start. - Update the tests, the menu inventory, the docs, and UI-055.
This commit is contained in:
@@ -27,7 +27,7 @@ await runSmoke('browser/builtin', async ({ page }) => {
|
||||
if (id === 'board-a') { const b = document.createElement('button'); b.textContent = 'Select board B'; b.onclick = () => api.replaceView('board-a', 'board-b'); el.append(b); }
|
||||
return () => { window.__TEST__.cleanups.push(id); };
|
||||
}});
|
||||
api.registerView({ id:'source-control', title:'Source control', placement:'sidebar', navigation:true, icon:'git', mount(el) { el.textContent='Git sidebar fixture'; }});
|
||||
api.registerView({ id:'sidebar', title:'Sidebar fixture', placement:'sidebar', navigation:true, icon:'git', mount(el) { el.textContent='Plugin sidebar fixture'; }});
|
||||
}`;
|
||||
},
|
||||
browser_request: ({ session, command, args }) => {
|
||||
@@ -70,8 +70,8 @@ await runSmoke('browser/builtin', async ({ page }) => {
|
||||
await page.getByRole('tabpanel', { name: 'board-b', exact: true }).waitFor();
|
||||
await page.waitForFunction(() => window.__TEST__.mounts.includes('board-b') && window.__TEST__.cleanups.includes('board-a'));
|
||||
assert.deepEqual(await editorKeys(module), before);
|
||||
await page.getByRole('button', { name: 'Source control', exact: true }).click();
|
||||
await page.getByText('Git sidebar fixture', { exact: true }).waitFor();
|
||||
await page.getByRole('button', { name: 'Sidebar fixture', exact: true }).click();
|
||||
await page.getByText('Plugin sidebar fixture', { exact: true }).waitFor();
|
||||
assert.equal(await page.getByRole('tabpanel', { name: 'board-b', exact: true }).count(), 1);
|
||||
for (const theme of ['dark', 'light']) {
|
||||
await page.evaluate(theme => document.documentElement.dataset.theme = theme, theme);
|
||||
|
||||
Reference in New Issue
Block a user