On a phone, no "No files" box above an item that has none
The files sit over the text on a phone, so an item without any showed a box saying so before its text. Nothing is shown now; the desktop files pane already hid itself when empty. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
@@ -32,6 +32,7 @@ The long form, with what was wrong before and how it was found, is in
|
|||||||
- Add a feed asks only for the feed; Popular and Directory in the sidebar are where you browse.
|
- Add a feed asks only for the feed; Popular and Directory in the sidebar are where you browse.
|
||||||
- On a phone, an item's files, with play and delete, sit above its show notes rather than below
|
- On a phone, an item's files, with play and delete, sit above its show notes rather than below
|
||||||
them, where long notes left them looking missing.
|
them, where long notes left them looking missing.
|
||||||
|
- On a phone, an item with no files goes straight to its text, without a box saying "No files".
|
||||||
- The page is served minified, about a quarter smaller. Its script is now TypeScript in
|
- The page is served minified, about a quarter smaller. Its script is now TypeScript in
|
||||||
`web/src`, type-checked, and built with swc; building ipx needs node.
|
`web/src`, type-checked, and built with swc; building ipx needs node.
|
||||||
- The script is its own file, `/app.js`, rather than inside the page. Your browser keeps it
|
- The script is its own file, `/app.js`, rather than inside the page. Your browser keeps it
|
||||||
|
|||||||
@@ -1216,3 +1216,21 @@ test.describe('touch gestures on a phone', () => {
|
|||||||
await expect(page.locator('#pulltip')).toHaveCount(0); // the note goes on letting go
|
await expect(page.locator('#pulltip')).toHaveCount(0); // the note goes on letting go
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
test.describe('an item with no files, on a phone', () => {
|
||||||
|
test.use({ viewport: { width: 390, height: 844 }, hasTouch: true, isMobile: true });
|
||||||
|
|
||||||
|
test('shows no files box at all', async ({ page }) => {
|
||||||
|
await page.locator('#burger').click();
|
||||||
|
await page.locator('#feedlist .place', { hasText: 'All Subscriptions' }).click();
|
||||||
|
await page.locator('.tabs button', { hasText: 'All' }).first().click();
|
||||||
|
await expect(page.locator('.ep').first()).toBeVisible({ timeout: 20_000 });
|
||||||
|
// An item with no enclosure, found from the list the page itself has.
|
||||||
|
const guid = await page.evaluate(() => S.entries.find(e => !e.enclosures.length)?.guid);
|
||||||
|
expect(guid, 'the fixtures have an item with no files').toBeTruthy();
|
||||||
|
await page.locator(`.ep[data-guid="${guid}"]`).click();
|
||||||
|
await expect(page.locator('#detail .dt')).toBeVisible();
|
||||||
|
await expect(page.locator('#detail .encbox')).toHaveCount(0);
|
||||||
|
await expect(page.locator('#detail')).not.toContainText('No files');
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|||||||
@@ -227,7 +227,9 @@ function showDetail(e){
|
|||||||
if(files) files.innerHTML='<p class="empty">No files</p>';
|
if(files) files.innerHTML='<p class="empty">No files</p>';
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
const encs=e.enclosures.map(encBox).join('')||'<p class="empty">No files</p>';
|
// Nothing when there are no files: the pane that would say so is hidden above, and on a phone,
|
||||||
|
// where the files sit over the text, a box saying "No files" only pushed the text down.
|
||||||
|
const encs=e.enclosures.map(encBox).join('');
|
||||||
// A phone has no room for the files pane, so the files go above the text there instead.
|
// A phone has no room for the files pane, so the files go above the text there instead.
|
||||||
// Below it, a long set of show notes pushed play and delete screens down, and on an iPhone
|
// Below it, a long set of show notes pushed play and delete screens down, and on an iPhone
|
||||||
// it looked as if a downloaded file could not be deleted at all (issue #21).
|
// it looked as if a downloaded file could not be deleted at all (issue #21).
|
||||||
|
|||||||
Reference in New Issue
Block a user