openvibers/openvibe.codes Commits
Share: one Share sheet on a project's Improve page (#280)
Changes
@@@ -387,6 +387,7 @@ ${forgejoError ? html`<p class="run-notice run-notice-error" role="alert">OpenVicrumbs: [{ label: 'Improve OpenVibe', href: '/improve' }, { label: meta.name }],styles: ['kit.css', 'kit-data.css'], sharedScripts: ['kit-web.js'],body: html`${raw(kit.head({ title: meta.name, sub: tagline(meta), sticky: false }))}++<p>${raw(kit.share({ title: `Improve ${meta.name}`, url: `${config.baseUrl}/improve/${owner}/${name}`, text: `Contribute to ${meta.name}: describe a change and run it on your machine through OpenVibe.Codes.` }))}</p>${raw(improveSteps(1))}${form}${raw(kit.fold({ title: 'How the run works', body: '<ol class="steps"><li>The harness clones the repository onto <strong>your machine</strong> and checks out the default branch.</li><li>The agent makes the change you described and runs the tests.</li><li>If you asked it to push, it commits to a new branch and opens a pull request on OpenVibe Git.</li><li>You review the result, then the maintainers review the pull request.</li></ol>' }))}@@@ -47,6 +47,9 @@ const { boot, check, done } = require('./helpers/boot');assert.ok(r.text.includes('Step 2 of 4') && r.text.includes('href="/improve"'), 'step 2, with step 1 linking back');assert.ok(r.text.includes('Clone it yourself') && r.text.includes('git clone '), 'the clone command, folded');assert.ok(r.text.indexOf('name="prompt"') < r.text.indexOf('How the run works'), 'the form comes before the explanation');++ assert.strictEqual((r.text.match(/data-ov-share-sheet/g) || []).length, 1, 'one Share button');++ assert.ok(r.text.includes('data-url="https://openvibe.codes/improve/OpenVibers/OpenVibe.Codes"'), 'the repository page address');++ assert.ok(r.text.includes('data-title="Improve OpenVibe.Codes"'), 'its title');});await check('a repository page shows the guided path and asks guests to sign in', async () => {
@@ -387,6 +387,7 @@ ${forgejoError ? html`<p class="run-notice run-notice-error" role="alert">OpenVi
@@ -387,6 +387,7 @@ ${forgejoError ? html`<p class="run-notice run-notice-error" role="alert">OpenVi
crumbs: [{ label: 'Improve OpenVibe', href: '/improve' }, { label: meta.name }],
crumbs: [{ label: 'Improve OpenVibe', href: '/improve' }, { label: meta.name }],
styles: ['kit.css', 'kit-data.css'], sharedScripts: ['kit-web.js'],
styles: ['kit.css', 'kit-data.css'], sharedScripts: ['kit-web.js'],
body: html`${raw(kit.head({ title: meta.name, sub: tagline(meta), sticky: false }))}
body: html`${raw(kit.head({ title: meta.name, sub: tagline(meta), sticky: false }))}
+<p>${raw(kit.share({ title: `Improve ${meta.name}`, url: `${config.baseUrl}/improve/${owner}/${name}`, text: `Contribute to ${meta.name}: describe a change and run it on your machine through OpenVibe.Codes.` }))}</p>
${raw(improveSteps(1))}
${raw(improveSteps(1))}
${form}
${form}
${raw(kit.fold({ title: 'How the run works', body: '<ol class="steps"><li>The harness clones the repository onto <strong>your machine</strong> and checks out the default branch.</li><li>The agent makes the change you described and runs the tests.</li><li>If you asked it to push, it commits to a new branch and opens a pull request on OpenVibe Git.</li><li>You review the result, then the maintainers review the pull request.</li></ol>' }))}
${raw(kit.fold({ title: 'How the run works', body: '<ol class="steps"><li>The harness clones the repository onto <strong>your machine</strong> and checks out the default branch.</li><li>The agent makes the change you described and runs the tests.</li><li>If you asked it to push, it commits to a new branch and opens a pull request on OpenVibe Git.</li><li>You review the result, then the maintainers review the pull request.</li></ol>' }))}
@@ -47,6 +47,9 @@ const { boot, check, done } = require('./helpers/boot');
@@ -47,6 +47,9 @@ const { boot, check, done } = require('./helpers/boot');
assert.ok(r.text.includes('Step 2 of 4') && r.text.includes('href="/improve"'), 'step 2, with step 1 linking back');
assert.ok(r.text.includes('Step 2 of 4') && r.text.includes('href="/improve"'), 'step 2, with step 1 linking back');
assert.ok(r.text.includes('Clone it yourself') && r.text.includes('git clone '), 'the clone command, folded');
assert.ok(r.text.includes('Clone it yourself') && r.text.includes('git clone '), 'the clone command, folded');
assert.ok(r.text.indexOf('name="prompt"') < r.text.indexOf('How the run works'), 'the form comes before the explanation');
assert.ok(r.text.indexOf('name="prompt"') < r.text.indexOf('How the run works'), 'the form comes before the explanation');
+ assert.strictEqual((r.text.match(/data-ov-share-sheet/g) || []).length, 1, 'one Share button');
+ assert.ok(r.text.includes('data-url="https://openvibe.codes/improve/OpenVibers/OpenVibe.Codes"'), 'the repository page address');
+ assert.ok(r.text.includes('data-title="Improve OpenVibe.Codes"'), 'its title');
});
});
await check('a repository page shows the guided path and asks guests to sign in', async () => {
await check('a repository page shows the guided path and asks guests to sign in', async () => {