From be0cd9466b4083b96b76595ffb4bd4fa13db620d Mon Sep 17 00:00:00 2001 From: Grace Kind Date: Sun, 26 Jul 2026 17:48:14 -0500 Subject: [PATCH] Add chevrons to feed rows --- package.json | 2 +- src/css/style.css | 23 +++++++++++++++++++++-- src/js/views/feeds.view.js | 37 ++++++++++++++++--------------------- 3 files changed, 38 insertions(+), 24 deletions(-) diff --git a/package.json b/package.json index 4584ce2e..2c77b741 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "impro", - "version": "0.18.84", + "version": "0.18.85", "type": "module", "scripts": { "start": "rm -rf \"${BUILD_DIR:-build}\" && NODE_ENV=development eleventy --serve", diff --git a/src/css/style.css b/src/css/style.css index 829168ad..68a9ec2b 100644 --- a/src/css/style.css +++ b/src/css/style.css @@ -5703,8 +5703,8 @@ button.profile-list-item-button.is-disabled { .feeds-list-item { display: flex; - align-items: flex-start; - padding: 16px; + align-items: center; + padding: 12px 16px; border-bottom: var(--hair) solid var(--post-border-color); text-decoration: none; color: inherit; @@ -5758,6 +5758,25 @@ button.profile-list-item-button.is-disabled { white-space: pre-wrap; } +.feeds-list-item-chevron { + flex-shrink: 0; + width: 40px; + height: 40px; + display: flex; + align-items: center; + justify-content: center; + color: var(--text-color-muted); +} + +.feeds-list-item-chevron svg { + width: 32px; + height: 32px; +} + +.feeds-list-item-chevron svg path { + stroke-width: 1.2px; +} + .feeds-list-item-drag-handle { flex-shrink: 0; width: 40px; diff --git a/src/js/views/feeds.view.js b/src/js/views/feeds.view.js index eb718684..9ce672d6 100644 --- a/src/js/views/feeds.view.js +++ b/src/js/views/feeds.view.js @@ -8,6 +8,7 @@ import { menuIconTemplate } from "/js/templates/icons/menuIcon.template.js"; import { pinIconTemplate } from "/js/templates/icons/pinIcon.template.js"; import { settingsIconTemplate } from "/js/templates/icons/settingsIcon.template.js"; import { homeIconTemplate } from "/js/templates/icons/homeIcon.template.js"; +import { chevronRightIconTemplate } from "/js/templates/icons/chevronRight.template.js"; import { linkToList, linkToFeed } from "/js/navigation.js"; import { Signal, ReactiveStore, SignalSet, SignalArray } from "/js/signals.js"; import { enableReorder } from "/js/utils.js"; @@ -97,17 +98,8 @@ class FeedsView extends View { `; } - function rowTemplate({ - item, - currentUser, - isEditing, - isSaving, - showUnpin, - }) { + function rowTemplate({ item, currentUser, rightItem }) { const value = valueForPinnedItem(item); - const editControls = isEditing - ? editControlsTemplate({ value, isSaving, showUnpin }) - : ""; if (item.type === "timeline") { return html`
Following
Feed by @bsky.app
- ${editControls} + ${rightItem} `; } if (item.type === "list") { @@ -149,7 +141,7 @@ class FeedsView extends View { ` : ""} - ${editControls} + ${rightItem} `; } const feedGenerator = item.data; @@ -177,7 +169,7 @@ class FeedsView extends View { ` : ""} - ${editControls} + ${rightItem} `; } @@ -256,14 +248,17 @@ class FeedsView extends View {
Pinned Feeds
${feedsFeedTemplate({ items: orderedItems, - renderItem: (item) => - rowTemplate({ - item, - currentUser, - isEditing, - isSaving, - showUnpin, - }), + renderItem: (item) => { + const value = valueForPinnedItem(item); + const rightItem = isEditing + ? editControlsTemplate({ value, isSaving, showUnpin }) + : item.type === "timeline" + ? "" + : html`
+ ${chevronRightIconTemplate()} +
`; + return rowTemplate({ item, currentUser, rightItem }); + }, isEditing, })} -- 2.51.2