From a4a8d123d3e5f7f6c2251da09d70bb948ce0abe7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A2u=20Cao?= Date: Wed, 2 Sep 2026 15:06:10 -0600 Subject: [PATCH] Split Activity timeline in Home and Explore Adds a new Explore timeline with contributions from anyone on trusted relays. --- app/components/activity-timeline.gjs | 15 +- app/components/tab-nav.gjs | 17 +++ app/controllers/activity.js | 10 +- app/services/activity.js | 87 +++++++----- app/services/nostr-data.js | 73 +++++++--- app/services/place-name-resolver.js | 113 ++++++++------- app/styles/app.css | 32 +++++ app/templates/activity.gjs | 2 + tests/acceptance/activity-test.js | 3 + .../components/activity-timeline-test.gjs | 133 ++++++++++++++++++ tests/integration/components/tab-nav-test.gjs | 87 ++++++++++++ tests/unit/services/activity-test.js | 127 +++++++++++++++-- tests/unit/services/nostr-data-test.js | 24 +++- .../unit/services/place-name-resolver-test.js | 66 +++++++++ 14 files changed, 667 insertions(+), 122 deletions(-) create mode 100644 app/components/tab-nav.gjs create mode 100644 tests/integration/components/tab-nav-test.gjs diff --git a/app/components/activity-timeline.gjs b/app/components/activity-timeline.gjs index f459059..2d14491 100644 --- a/app/components/activity-timeline.gjs +++ b/app/components/activity-timeline.gjs @@ -3,17 +3,24 @@ import { action } from '@ember/object'; import { tracked } from '@glimmer/tracking'; import { on } from '@ember/modifier'; import Icon from './icon'; +import TabNav from './tab-nav'; import ActivityZapItem from './activity-zap-item'; import ActivityPhotoItem from './activity-photo-item'; import Modal from './modal'; import NostrConnect from './nostr-connect'; import not from 'ember-truth-helpers/helpers/not'; import eq from 'ember-truth-helpers/helpers/eq'; +import and from 'ember-truth-helpers/helpers/and'; import restoreScroll from '../modifiers/restore-scroll'; export default class ActivityTimelineComponent extends Component { @tracked isNostrConnectModalOpen = false; + tabs = [ + { label: 'Home', value: 'home' }, + { label: 'Explore', value: 'explore' }, + ]; + @action openNostrConnectModal(event) { event.preventDefault(); @@ -48,12 +55,18 @@ export default class ActivityTimelineComponent extends Component { + +