From 9e871a97884b7e0a43c6d693e6ebfa2c2280dde1 Mon Sep 17 00:00:00 2001 From: Michael Barrett Date: Wed, 10 Dec 2025 09:36:57 +0000 Subject: [PATCH 1/4] Renamed ActivityPub app files and directories to kebab-case MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ref https://linear.app/ghost/issue/BER-3044 As part of standardizing naming conventions across the codebase, renamed all PascalCase and camelCase files/directories in the ActivityPub app to kebab-case. This aligns with the RFC for consistent file naming and matches the convention used in shade and admin-x-settings. - Renamed ~50 component files (e.g., FeedItem.tsx → feed-item.tsx) - Renamed ~10 directories (e.g., views/Profile/ → views/profile/) - Updated all import statements to reference new paths - Hooks and utils were already kebab-case, no changes needed --- apps/activitypub/package.json | 2 +- apps/activitypub/src/{App.tsx => app.tsx} | 0 .../{ActivityItem.tsx => activity-item.tsx} | 0 ...leBodyStyles.ts => article-body-styles.ts} | 0 ...etedFeedItem.tsx => deleted-feed-item.tsx} | 0 .../{FeedItemMenu.tsx => feed-item-menu.tsx} | 0 ...{FeedItemStats.tsx => feed-item-stats.tsx} | 2 +- .../feed/{FeedItem.tsx => feed-item.tsx} | 10 +++--- ...leOfContents.tsx => table-of-contents.tsx} | 0 .../global/{APAvatar.tsx => ap-avatar.tsx} | 0 .../{APReplyBox.tsx => ap-reply-box.tsx} | 4 +-- .../{BackButton.tsx => back-button.tsx} | 0 ...Indicator.tsx => empty-view-indicator.tsx} | 0 .../{FollowButton.tsx => follow-button.tsx} | 0 .../{ImageLightbox.tsx => image-lightbox.tsx} | 2 +- ...ard.tsx => profile-preview-hover-card.tsx} | 2 +- .../global/{Separator.tsx => separator.tsx} | 0 ...liesButton.tsx => show-replies-button.tsx} | 0 ...tedProfiles.tsx => suggested-profiles.tsx} | 8 ++--- .../src/components/layout/Error/index.ts | 1 - .../src/components/layout/Header/index.tsx | 1 - .../components/layout/Onboarding/index.tsx | 1 - .../src/components/layout/Sidebar/index.tsx | 1 - .../{Error/Error.tsx => error/error.tsx} | 4 +-- .../src/components/layout/error/index.ts | 1 + .../{Header/Header.tsx => header/header.tsx} | 2 +- .../src/components/layout/header/index.tsx | 1 + .../search-input.tsx} | 0 .../src/components/layout/index.tsx | 2 +- .../layout/{Layout.tsx => layout.tsx} | 8 ++--- .../components/header.tsx} | 0 .../components/layout/onboarding/index.tsx | 1 + .../onboarding.tsx} | 0 .../Step1.tsx => onboarding/step-1.tsx} | 2 +- .../Step2.tsx => onboarding/step-2.tsx} | 2 +- .../Step3.tsx => onboarding/step-3.tsx} | 4 +-- .../feedback-box.tsx} | 0 .../src/components/layout/sidebar/index.tsx | 1 + .../recommendations.tsx} | 6 ++-- .../sidebar-menu-link.tsx} | 0 .../Sidebar.tsx => sidebar/sidebar.tsx} | 12 +++---- .../{NewNoteModal.tsx => new-note-modal.tsx} | 4 +-- .../modals/{Search.tsx => search.tsx} | 10 +++--- .../{TopicFilter.tsx => topic-filter.tsx} | 0 apps/activitypub/src/index.tsx | 2 +- apps/activitypub/src/routes.tsx | 32 +++++++++---------- apps/activitypub/src/standalone.tsx | 2 +- apps/activitypub/src/views/Explore/index.tsx | 1 - apps/activitypub/src/views/Inbox/index.tsx | 1 - .../src/views/Notifications/index.tsx | 1 - .../src/views/Preferences/index.tsx | 1 - apps/activitypub/src/views/Profile/index.tsx | 1 - .../Explore.tsx => explore/explore.tsx} | 10 +++--- apps/activitypub/src/views/explore/index.tsx | 1 + .../components/feed-input.tsx} | 4 +-- .../components/feed-list.tsx} | 10 +++--- .../components/suggested-profiles.tsx} | 6 ++-- .../views/{Feed/Feed.tsx => feed/feed.tsx} | 4 +-- .../views/{Feed/Note.tsx => feed/note.tsx} | 16 +++++----- .../components/customizer.tsx} | 0 .../components/inbox-list.tsx} | 6 ++-- .../components/reader.tsx} | 24 +++++++------- .../{Inbox/Inbox.tsx => inbox/inbox.tsx} | 6 ++-- apps/activitypub/src/views/inbox/index.tsx | 1 + .../components/notification-icon.tsx} | 0 .../components/notification-item.tsx} | 2 +- .../src/views/notifications/index.tsx | 1 + .../notifications.tsx} | 22 ++++++------- .../components/bluesky-sharing.tsx} | 4 +-- .../components/dots-pattern.tsx} | 0 .../components/edit-profile.tsx} | 0 .../components/moderation.tsx} | 8 ++--- .../components/profile.tsx} | 4 +-- .../components/settings.tsx} | 2 +- .../src/views/preferences/index.tsx | 1 + .../preferences.tsx} | 6 ++-- .../components/actor-list.tsx} | 8 ++--- .../components/likes.tsx} | 2 +- .../components/posts.tsx} | 2 +- .../components/profile-menu.tsx} | 2 +- .../components/profile-page.tsx} | 16 +++++----- .../components/unblock-button.tsx} | 2 +- .../components/unblock-dialog.tsx} | 0 apps/activitypub/src/views/profile/index.tsx | 1 + .../Profile.tsx => profile/profile.tsx} | 12 +++---- 85 files changed, 159 insertions(+), 159 deletions(-) rename apps/activitypub/src/{App.tsx => app.tsx} (100%) rename apps/activitypub/src/components/activities/{ActivityItem.tsx => activity-item.tsx} (100%) rename apps/activitypub/src/components/{articleBodyStyles.ts => article-body-styles.ts} (100%) rename apps/activitypub/src/components/feed/{DeletedFeedItem.tsx => deleted-feed-item.tsx} (100%) rename apps/activitypub/src/components/feed/{FeedItemMenu.tsx => feed-item-menu.tsx} (100%) rename apps/activitypub/src/components/feed/{FeedItemStats.tsx => feed-item-stats.tsx} (99%) rename apps/activitypub/src/components/feed/{FeedItem.tsx => feed-item.tsx} (99%) rename apps/activitypub/src/components/feed/{TableOfContents.tsx => table-of-contents.tsx} (100%) rename apps/activitypub/src/components/global/{APAvatar.tsx => ap-avatar.tsx} (100%) rename apps/activitypub/src/components/global/{APReplyBox.tsx => ap-reply-box.tsx} (95%) rename apps/activitypub/src/components/global/{BackButton.tsx => back-button.tsx} (100%) rename apps/activitypub/src/components/global/{EmptyViewIndicator.tsx => empty-view-indicator.tsx} (100%) rename apps/activitypub/src/components/global/{FollowButton.tsx => follow-button.tsx} (100%) rename apps/activitypub/src/components/global/{ImageLightbox.tsx => image-lightbox.tsx} (99%) rename apps/activitypub/src/components/global/{ProfilePreviewHoverCard.tsx => profile-preview-hover-card.tsx} (99%) rename apps/activitypub/src/components/global/{Separator.tsx => separator.tsx} (100%) rename apps/activitypub/src/components/global/{ShowRepliesButton.tsx => show-replies-button.tsx} (100%) rename apps/activitypub/src/components/global/{SuggestedProfiles.tsx => suggested-profiles.tsx} (95%) delete mode 100644 apps/activitypub/src/components/layout/Error/index.ts delete mode 100644 apps/activitypub/src/components/layout/Header/index.tsx delete mode 100644 apps/activitypub/src/components/layout/Onboarding/index.tsx delete mode 100644 apps/activitypub/src/components/layout/Sidebar/index.tsx rename apps/activitypub/src/components/layout/{Error/Error.tsx => error/error.tsx} (98%) create mode 100644 apps/activitypub/src/components/layout/error/index.ts rename apps/activitypub/src/components/layout/{Header/Header.tsx => header/header.tsx} (98%) create mode 100644 apps/activitypub/src/components/layout/header/index.tsx rename apps/activitypub/src/components/layout/{Header/SearchInput.tsx => header/search-input.tsx} (100%) rename apps/activitypub/src/components/layout/{Layout.tsx => layout.tsx} (94%) rename apps/activitypub/src/components/layout/{Onboarding/components/Header.tsx => onboarding/components/header.tsx} (100%) create mode 100644 apps/activitypub/src/components/layout/onboarding/index.tsx rename apps/activitypub/src/components/layout/{Onboarding/Onboarding.tsx => onboarding/onboarding.tsx} (100%) rename apps/activitypub/src/components/layout/{Onboarding/Step1.tsx => onboarding/step-1.tsx} (99%) rename apps/activitypub/src/components/layout/{Onboarding/Step2.tsx => onboarding/step-2.tsx} (99%) rename apps/activitypub/src/components/layout/{Onboarding/Step3.tsx => onboarding/step-3.tsx} (99%) rename apps/activitypub/src/components/layout/{Sidebar/FeedbackBox.tsx => sidebar/feedback-box.tsx} (100%) create mode 100644 apps/activitypub/src/components/layout/sidebar/index.tsx rename apps/activitypub/src/components/layout/{Sidebar/Recommendations.tsx => sidebar/recommendations.tsx} (95%) rename apps/activitypub/src/components/layout/{Sidebar/SidebarMenuLink.tsx => sidebar/sidebar-menu-link.tsx} (100%) rename apps/activitypub/src/components/layout/{Sidebar/Sidebar.tsx => sidebar/sidebar.tsx} (95%) rename apps/activitypub/src/components/modals/{NewNoteModal.tsx => new-note-modal.tsx} (99%) rename apps/activitypub/src/components/modals/{Search.tsx => search.tsx} (97%) rename apps/activitypub/src/components/{TopicFilter.tsx => topic-filter.tsx} (100%) delete mode 100644 apps/activitypub/src/views/Explore/index.tsx delete mode 100644 apps/activitypub/src/views/Inbox/index.tsx delete mode 100644 apps/activitypub/src/views/Notifications/index.tsx delete mode 100644 apps/activitypub/src/views/Preferences/index.tsx delete mode 100644 apps/activitypub/src/views/Profile/index.tsx rename apps/activitypub/src/views/{Explore/Explore.tsx => explore/explore.tsx} (96%) create mode 100644 apps/activitypub/src/views/explore/index.tsx rename apps/activitypub/src/views/{Feed/components/FeedInput.tsx => feed/components/feed-input.tsx} (90%) rename apps/activitypub/src/views/{Feed/components/FeedList.tsx => feed/components/feed-list.tsx} (96%) rename apps/activitypub/src/views/{Feed/components/SuggestedProfiles.tsx => feed/components/suggested-profiles.tsx} (97%) rename apps/activitypub/src/views/{Feed/Feed.tsx => feed/feed.tsx} (91%) rename apps/activitypub/src/views/{Feed/Note.tsx => feed/note.tsx} (97%) rename apps/activitypub/src/views/{Inbox/components/Customizer.tsx => inbox/components/customizer.tsx} (100%) rename apps/activitypub/src/views/{Inbox/components/InboxList.tsx => inbox/components/inbox-list.tsx} (98%) rename apps/activitypub/src/views/{Inbox/components/Reader.tsx => inbox/components/reader.tsx} (98%) rename apps/activitypub/src/views/{Inbox/Inbox.tsx => inbox/inbox.tsx} (90%) create mode 100644 apps/activitypub/src/views/inbox/index.tsx rename apps/activitypub/src/views/{Notifications/components/NotificationIcon.tsx => notifications/components/notification-icon.tsx} (100%) rename apps/activitypub/src/views/{Notifications/components/NotificationItem.tsx => notifications/components/notification-item.tsx} (98%) create mode 100644 apps/activitypub/src/views/notifications/index.tsx rename apps/activitypub/src/views/{Notifications/Notifications.tsx => notifications/notifications.tsx} (97%) rename apps/activitypub/src/views/{Preferences/components/BlueskySharing.tsx => preferences/components/bluesky-sharing.tsx} (99%) rename apps/activitypub/src/views/{Preferences/components/DotsPattern.tsx => preferences/components/dots-pattern.tsx} (100%) rename apps/activitypub/src/views/{Preferences/components/EditProfile.tsx => preferences/components/edit-profile.tsx} (100%) rename apps/activitypub/src/views/{Preferences/components/Moderation.tsx => preferences/components/moderation.tsx} (97%) rename apps/activitypub/src/views/{Preferences/components/Profile.tsx => preferences/components/profile.tsx} (99%) rename apps/activitypub/src/views/{Preferences/components/Settings.tsx => preferences/components/settings.tsx} (99%) create mode 100644 apps/activitypub/src/views/preferences/index.tsx rename apps/activitypub/src/views/{Preferences/Preferences.tsx => preferences/preferences.tsx} (85%) rename apps/activitypub/src/views/{Profile/components/ActorList.tsx => profile/components/actor-list.tsx} (95%) rename apps/activitypub/src/views/{Profile/components/Likes.tsx => profile/components/likes.tsx} (98%) rename apps/activitypub/src/views/{Profile/components/Posts.tsx => profile/components/posts.tsx} (98%) rename apps/activitypub/src/views/{Profile/components/ProfileMenu.tsx => profile/components/profile-menu.tsx} (99%) rename apps/activitypub/src/views/{Profile/components/ProfilePage.tsx => profile/components/profile-page.tsx} (97%) rename apps/activitypub/src/views/{Profile/components/UnblockButton.tsx => profile/components/unblock-button.tsx} (96%) rename apps/activitypub/src/views/{Profile/components/UnblockDialog.tsx => profile/components/unblock-dialog.tsx} (100%) create mode 100644 apps/activitypub/src/views/profile/index.tsx rename apps/activitypub/src/views/{Profile/Profile.tsx => profile/profile.tsx} (94%) diff --git a/apps/activitypub/package.json b/apps/activitypub/package.json index 3aeb26d28df..c2b924a939e 100644 --- a/apps/activitypub/package.json +++ b/apps/activitypub/package.json @@ -1,6 +1,6 @@ { "name": "@tryghost/activitypub", - "version": "3.0.4", + "version": "3.0.5", "license": "MIT", "repository": { "type": "git", diff --git a/apps/activitypub/src/App.tsx b/apps/activitypub/src/app.tsx similarity index 100% rename from apps/activitypub/src/App.tsx rename to apps/activitypub/src/app.tsx diff --git a/apps/activitypub/src/components/activities/ActivityItem.tsx b/apps/activitypub/src/components/activities/activity-item.tsx similarity index 100% rename from apps/activitypub/src/components/activities/ActivityItem.tsx rename to apps/activitypub/src/components/activities/activity-item.tsx diff --git a/apps/activitypub/src/components/articleBodyStyles.ts b/apps/activitypub/src/components/article-body-styles.ts similarity index 100% rename from apps/activitypub/src/components/articleBodyStyles.ts rename to apps/activitypub/src/components/article-body-styles.ts diff --git a/apps/activitypub/src/components/feed/DeletedFeedItem.tsx b/apps/activitypub/src/components/feed/deleted-feed-item.tsx similarity index 100% rename from apps/activitypub/src/components/feed/DeletedFeedItem.tsx rename to apps/activitypub/src/components/feed/deleted-feed-item.tsx diff --git a/apps/activitypub/src/components/feed/FeedItemMenu.tsx b/apps/activitypub/src/components/feed/feed-item-menu.tsx similarity index 100% rename from apps/activitypub/src/components/feed/FeedItemMenu.tsx rename to apps/activitypub/src/components/feed/feed-item-menu.tsx diff --git a/apps/activitypub/src/components/feed/FeedItemStats.tsx b/apps/activitypub/src/components/feed/feed-item-stats.tsx similarity index 99% rename from apps/activitypub/src/components/feed/FeedItemStats.tsx rename to apps/activitypub/src/components/feed/feed-item-stats.tsx index 8e64d7b1eaa..42079cab5a7 100644 --- a/apps/activitypub/src/components/feed/FeedItemStats.tsx +++ b/apps/activitypub/src/components/feed/feed-item-stats.tsx @@ -1,4 +1,4 @@ -import NewNoteModal from '@components/modals/NewNoteModal'; +import NewNoteModal from '@components/modals/new-note-modal'; import React, {useEffect, useRef, useState} from 'react'; import {ActorProperties, ObjectProperties} from '@tryghost/admin-x-framework/api/activitypub'; import {AnimatedNumber, Button, LucideIcon, formatNumber} from '@tryghost/shade'; diff --git a/apps/activitypub/src/components/feed/FeedItem.tsx b/apps/activitypub/src/components/feed/feed-item.tsx similarity index 99% rename from apps/activitypub/src/components/feed/FeedItem.tsx rename to apps/activitypub/src/components/feed/feed-item.tsx index 387927a2d23..2bf519e0309 100644 --- a/apps/activitypub/src/components/feed/FeedItem.tsx +++ b/apps/activitypub/src/components/feed/feed-item.tsx @@ -1,14 +1,14 @@ -import FeedItemMenu from './FeedItemMenu'; +import FeedItemMenu from './feed-item-menu'; import React, {useEffect, useRef, useState} from 'react'; import {ActorProperties, ObjectProperties} from '@tryghost/admin-x-framework/api/activitypub'; import {Button, H4, LucideIcon, Skeleton} from '@tryghost/shade'; import {toast} from 'sonner'; -import APAvatar from '../global/APAvatar'; -import ImageLightbox, {useLightboxImages} from '../global/ImageLightbox'; -import ProfilePreviewHoverCard from '../global/ProfilePreviewHoverCard'; +import APAvatar from '../global/ap-avatar'; +import ImageLightbox, {useLightboxImages} from '../global/image-lightbox'; +import ProfilePreviewHoverCard from '../global/profile-preview-hover-card'; -import FeedItemStats from './FeedItemStats'; +import FeedItemStats from './feed-item-stats'; import clsx from 'clsx'; import getReadingTime from '../../utils/get-reading-time'; import getUsername from '../../utils/get-username'; diff --git a/apps/activitypub/src/components/feed/TableOfContents.tsx b/apps/activitypub/src/components/feed/table-of-contents.tsx similarity index 100% rename from apps/activitypub/src/components/feed/TableOfContents.tsx rename to apps/activitypub/src/components/feed/table-of-contents.tsx diff --git a/apps/activitypub/src/components/global/APAvatar.tsx b/apps/activitypub/src/components/global/ap-avatar.tsx similarity index 100% rename from apps/activitypub/src/components/global/APAvatar.tsx rename to apps/activitypub/src/components/global/ap-avatar.tsx diff --git a/apps/activitypub/src/components/global/APReplyBox.tsx b/apps/activitypub/src/components/global/ap-reply-box.tsx similarity index 95% rename from apps/activitypub/src/components/global/APReplyBox.tsx rename to apps/activitypub/src/components/global/ap-reply-box.tsx index 3e2383d3a21..05561b78d9d 100644 --- a/apps/activitypub/src/components/global/APReplyBox.tsx +++ b/apps/activitypub/src/components/global/ap-reply-box.tsx @@ -1,7 +1,7 @@ import React, {HTMLProps, useState} from 'react'; -import APAvatar from './APAvatar'; -import NewNoteModal from '@components/modals/NewNoteModal'; +import APAvatar from './ap-avatar'; +import NewNoteModal from '@components/modals/new-note-modal'; import getUsername from '../../utils/get-username'; import {ActorProperties, ObjectProperties} from '@tryghost/admin-x-framework/api/activitypub'; import {useUserDataForUser} from '@hooks/use-activity-pub-queries'; diff --git a/apps/activitypub/src/components/global/BackButton.tsx b/apps/activitypub/src/components/global/back-button.tsx similarity index 100% rename from apps/activitypub/src/components/global/BackButton.tsx rename to apps/activitypub/src/components/global/back-button.tsx diff --git a/apps/activitypub/src/components/global/EmptyViewIndicator.tsx b/apps/activitypub/src/components/global/empty-view-indicator.tsx similarity index 100% rename from apps/activitypub/src/components/global/EmptyViewIndicator.tsx rename to apps/activitypub/src/components/global/empty-view-indicator.tsx diff --git a/apps/activitypub/src/components/global/FollowButton.tsx b/apps/activitypub/src/components/global/follow-button.tsx similarity index 100% rename from apps/activitypub/src/components/global/FollowButton.tsx rename to apps/activitypub/src/components/global/follow-button.tsx diff --git a/apps/activitypub/src/components/global/ImageLightbox.tsx b/apps/activitypub/src/components/global/image-lightbox.tsx similarity index 99% rename from apps/activitypub/src/components/global/ImageLightbox.tsx rename to apps/activitypub/src/components/global/image-lightbox.tsx index 2691530742f..dbf1e306b76 100644 --- a/apps/activitypub/src/components/global/ImageLightbox.tsx +++ b/apps/activitypub/src/components/global/image-lightbox.tsx @@ -1,7 +1,7 @@ import React, {useCallback, useEffect, useState} from 'react'; import {Button, Dialog, DialogClose, DialogContent, LucideIcon} from '@tryghost/shade'; import {ObjectProperties} from '@tryghost/admin-x-framework/api/activitypub'; -import {getAttachment} from '@components/feed/FeedItem'; +import {getAttachment} from '@components/feed/feed-item'; export interface LightboxImage { url: string; diff --git a/apps/activitypub/src/components/global/ProfilePreviewHoverCard.tsx b/apps/activitypub/src/components/global/profile-preview-hover-card.tsx similarity index 99% rename from apps/activitypub/src/components/global/ProfilePreviewHoverCard.tsx rename to apps/activitypub/src/components/global/profile-preview-hover-card.tsx index 961d5cc68c5..4560f2f7dbb 100644 --- a/apps/activitypub/src/components/global/ProfilePreviewHoverCard.tsx +++ b/apps/activitypub/src/components/global/profile-preview-hover-card.tsx @@ -1,4 +1,4 @@ -import FollowButton from './FollowButton'; +import FollowButton from './follow-button'; import React, {useEffect, useState} from 'react'; import getUsername from '../../utils/get-username'; import {Account} from '@src/api/activitypub'; diff --git a/apps/activitypub/src/components/global/Separator.tsx b/apps/activitypub/src/components/global/separator.tsx similarity index 100% rename from apps/activitypub/src/components/global/Separator.tsx rename to apps/activitypub/src/components/global/separator.tsx diff --git a/apps/activitypub/src/components/global/ShowRepliesButton.tsx b/apps/activitypub/src/components/global/show-replies-button.tsx similarity index 100% rename from apps/activitypub/src/components/global/ShowRepliesButton.tsx rename to apps/activitypub/src/components/global/show-replies-button.tsx diff --git a/apps/activitypub/src/components/global/SuggestedProfiles.tsx b/apps/activitypub/src/components/global/suggested-profiles.tsx similarity index 95% rename from apps/activitypub/src/components/global/SuggestedProfiles.tsx rename to apps/activitypub/src/components/global/suggested-profiles.tsx index 1d67716fcde..95faa439323 100644 --- a/apps/activitypub/src/components/global/SuggestedProfiles.tsx +++ b/apps/activitypub/src/components/global/suggested-profiles.tsx @@ -1,7 +1,7 @@ -import APAvatar from './APAvatar'; -import ActivityItem from '../activities/ActivityItem'; -import FollowButton from './FollowButton'; -import ProfilePreviewHoverCard from '@components/global/ProfilePreviewHoverCard'; +import APAvatar from './ap-avatar'; +import ActivityItem from '../activities/activity-item'; +import FollowButton from './follow-button'; +import ProfilePreviewHoverCard from '@components/global/profile-preview-hover-card'; import React from 'react'; import {type Account} from '../../api/activitypub'; import {Skeleton} from '@tryghost/shade'; diff --git a/apps/activitypub/src/components/layout/Error/index.ts b/apps/activitypub/src/components/layout/Error/index.ts deleted file mode 100644 index de801561ea0..00000000000 --- a/apps/activitypub/src/components/layout/Error/index.ts +++ /dev/null @@ -1 +0,0 @@ -export {default} from './Error'; diff --git a/apps/activitypub/src/components/layout/Header/index.tsx b/apps/activitypub/src/components/layout/Header/index.tsx deleted file mode 100644 index 0e9c8972da3..00000000000 --- a/apps/activitypub/src/components/layout/Header/index.tsx +++ /dev/null @@ -1 +0,0 @@ -export {default} from './Header'; diff --git a/apps/activitypub/src/components/layout/Onboarding/index.tsx b/apps/activitypub/src/components/layout/Onboarding/index.tsx deleted file mode 100644 index 693bf82dc72..00000000000 --- a/apps/activitypub/src/components/layout/Onboarding/index.tsx +++ /dev/null @@ -1 +0,0 @@ -export {default, useOnboardingStatus} from './Onboarding'; diff --git a/apps/activitypub/src/components/layout/Sidebar/index.tsx b/apps/activitypub/src/components/layout/Sidebar/index.tsx deleted file mode 100644 index 9a4831443a4..00000000000 --- a/apps/activitypub/src/components/layout/Sidebar/index.tsx +++ /dev/null @@ -1 +0,0 @@ -export {default} from './Sidebar'; diff --git a/apps/activitypub/src/components/layout/Error/Error.tsx b/apps/activitypub/src/components/layout/error/error.tsx similarity index 98% rename from apps/activitypub/src/components/layout/Error/Error.tsx rename to apps/activitypub/src/components/layout/error/error.tsx index 8019efa5f31..52ac33e92bf 100644 --- a/apps/activitypub/src/components/layout/Error/Error.tsx +++ b/apps/activitypub/src/components/layout/error/error.tsx @@ -1,6 +1,6 @@ -import Layout from '@components/layout/Layout'; +import Layout from '@components/layout/layout'; import {Button, H4, LucideIcon} from '@tryghost/shade'; -import {EmptyViewIcon, EmptyViewIndicator} from '@src/components/global/EmptyViewIndicator'; +import {EmptyViewIcon, EmptyViewIndicator} from '@src/components/global/empty-view-indicator'; import {useNavigate} from '@tryghost/admin-x-framework'; import {useRouteError} from 'react-router'; diff --git a/apps/activitypub/src/components/layout/error/index.ts b/apps/activitypub/src/components/layout/error/index.ts new file mode 100644 index 00000000000..d740cfdc899 --- /dev/null +++ b/apps/activitypub/src/components/layout/error/index.ts @@ -0,0 +1 @@ +export {default} from './error'; diff --git a/apps/activitypub/src/components/layout/Header/Header.tsx b/apps/activitypub/src/components/layout/header/header.tsx similarity index 98% rename from apps/activitypub/src/components/layout/Header/Header.tsx rename to apps/activitypub/src/components/layout/header/header.tsx index fdcc8159921..fd32d006c26 100644 --- a/apps/activitypub/src/components/layout/Header/Header.tsx +++ b/apps/activitypub/src/components/layout/header/header.tsx @@ -2,7 +2,7 @@ import React from 'react'; import {Button, H1, LucideIcon} from '@tryghost/shade'; import {useNavigationStack, useRouteHasParams} from '@tryghost/admin-x-framework'; -import BackButton from '@src/components/global/BackButton'; +import BackButton from '@src/components/global/back-button'; import useActiveRoute from '@src/hooks/use-active-route'; import {useCurrentPage} from '@src/hooks/use-current-page'; diff --git a/apps/activitypub/src/components/layout/header/index.tsx b/apps/activitypub/src/components/layout/header/index.tsx new file mode 100644 index 00000000000..d2c82545f88 --- /dev/null +++ b/apps/activitypub/src/components/layout/header/index.tsx @@ -0,0 +1 @@ +export {default} from './header'; diff --git a/apps/activitypub/src/components/layout/Header/SearchInput.tsx b/apps/activitypub/src/components/layout/header/search-input.tsx similarity index 100% rename from apps/activitypub/src/components/layout/Header/SearchInput.tsx rename to apps/activitypub/src/components/layout/header/search-input.tsx diff --git a/apps/activitypub/src/components/layout/index.tsx b/apps/activitypub/src/components/layout/index.tsx index 59f9dfc0eff..7697cdd23c4 100644 --- a/apps/activitypub/src/components/layout/index.tsx +++ b/apps/activitypub/src/components/layout/index.tsx @@ -1 +1 @@ -export {default} from './Layout'; +export {default} from './layout'; diff --git a/apps/activitypub/src/components/layout/Layout.tsx b/apps/activitypub/src/components/layout/layout.tsx similarity index 94% rename from apps/activitypub/src/components/layout/Layout.tsx rename to apps/activitypub/src/components/layout/layout.tsx index 2b49a288439..fab7cedb586 100644 --- a/apps/activitypub/src/components/layout/Layout.tsx +++ b/apps/activitypub/src/components/layout/layout.tsx @@ -1,8 +1,8 @@ -import Header from './Header'; -import NewNoteModal from '@components/modals/NewNoteModal'; -import Onboarding, {useOnboardingStatus} from './Onboarding'; +import Header from './header'; +import NewNoteModal from '@components/modals/new-note-modal'; +import Onboarding, {useOnboardingStatus} from './onboarding'; import React, {useRef, useState} from 'react'; -import Sidebar from './Sidebar'; +import Sidebar from './sidebar'; import {Navigate, ScrollRestoration} from '@tryghost/admin-x-framework'; import {useAppBasePath} from '@src/hooks/use-app-base-path'; import {useCurrentPage} from '@src/hooks/use-current-page'; diff --git a/apps/activitypub/src/components/layout/Onboarding/components/Header.tsx b/apps/activitypub/src/components/layout/onboarding/components/header.tsx similarity index 100% rename from apps/activitypub/src/components/layout/Onboarding/components/Header.tsx rename to apps/activitypub/src/components/layout/onboarding/components/header.tsx diff --git a/apps/activitypub/src/components/layout/onboarding/index.tsx b/apps/activitypub/src/components/layout/onboarding/index.tsx new file mode 100644 index 00000000000..77b1b94fa53 --- /dev/null +++ b/apps/activitypub/src/components/layout/onboarding/index.tsx @@ -0,0 +1 @@ +export {default, useOnboardingStatus} from './onboarding'; diff --git a/apps/activitypub/src/components/layout/Onboarding/Onboarding.tsx b/apps/activitypub/src/components/layout/onboarding/onboarding.tsx similarity index 100% rename from apps/activitypub/src/components/layout/Onboarding/Onboarding.tsx rename to apps/activitypub/src/components/layout/onboarding/onboarding.tsx diff --git a/apps/activitypub/src/components/layout/Onboarding/Step1.tsx b/apps/activitypub/src/components/layout/onboarding/step-1.tsx similarity index 99% rename from apps/activitypub/src/components/layout/Onboarding/Step1.tsx rename to apps/activitypub/src/components/layout/onboarding/step-1.tsx index eb0a1a51701..b552830f75e 100644 --- a/apps/activitypub/src/components/layout/Onboarding/Step1.tsx +++ b/apps/activitypub/src/components/layout/onboarding/step-1.tsx @@ -1,4 +1,4 @@ -import APAvatar from '@src/components/global/APAvatar'; +import APAvatar from '@src/components/global/ap-avatar'; import React, {useState} from 'react'; import apNodes from '@assets/images/onboarding/ap-nodes.png'; import apNodesDark from '@assets/images/onboarding/ap-nodes-dark.png'; diff --git a/apps/activitypub/src/components/layout/Onboarding/Step2.tsx b/apps/activitypub/src/components/layout/onboarding/step-2.tsx similarity index 99% rename from apps/activitypub/src/components/layout/Onboarding/Step2.tsx rename to apps/activitypub/src/components/layout/onboarding/step-2.tsx index 6c2d29b5401..940762f495e 100644 --- a/apps/activitypub/src/components/layout/Onboarding/Step2.tsx +++ b/apps/activitypub/src/components/layout/onboarding/step-2.tsx @@ -1,4 +1,4 @@ -import Header from './components/Header'; +import Header from './components/header'; import React, {ReactNode} from 'react'; import apDashedLines from '@assets/images/onboarding/ap-dashed-lines.png'; import apDashedLinesDark from '@assets/images/onboarding/ap-dashed-lines-dark.png'; diff --git a/apps/activitypub/src/components/layout/Onboarding/Step3.tsx b/apps/activitypub/src/components/layout/onboarding/step-3.tsx similarity index 99% rename from apps/activitypub/src/components/layout/Onboarding/Step3.tsx rename to apps/activitypub/src/components/layout/onboarding/step-3.tsx index d4672836a96..2a421c3f2cb 100644 --- a/apps/activitypub/src/components/layout/Onboarding/Step3.tsx +++ b/apps/activitypub/src/components/layout/onboarding/step-3.tsx @@ -1,4 +1,4 @@ -import Header from './components/Header'; +import Header from './components/header'; import React, {ReactNode, useEffect, useState} from 'react'; import caseyAvatar from '@assets/images/onboarding/avatar-casey.png'; import creatorScienceAvatar from '@assets/images/onboarding/avatar-creator-science.png'; @@ -18,7 +18,7 @@ import tangleCover from '@assets/images/onboarding/cover-tangle.png'; import {Avatar, AvatarFallback, AvatarImage, Button, H1, LucideIcon, Separator} from '@tryghost/shade'; import {useAccountForUser, useTopicsForUser} from '@src/hooks/use-activity-pub-queries'; import {useNavigateWithBasePath} from '@src/hooks/use-navigate-with-base-path'; -import {useOnboardingStatus} from './Onboarding'; +import {useOnboardingStatus} from './onboarding'; const MenuItem: React.FC<{ children?: ReactNode, diff --git a/apps/activitypub/src/components/layout/Sidebar/FeedbackBox.tsx b/apps/activitypub/src/components/layout/sidebar/feedback-box.tsx similarity index 100% rename from apps/activitypub/src/components/layout/Sidebar/FeedbackBox.tsx rename to apps/activitypub/src/components/layout/sidebar/feedback-box.tsx diff --git a/apps/activitypub/src/components/layout/sidebar/index.tsx b/apps/activitypub/src/components/layout/sidebar/index.tsx new file mode 100644 index 00000000000..736e161681a --- /dev/null +++ b/apps/activitypub/src/components/layout/sidebar/index.tsx @@ -0,0 +1 @@ +export {default} from './sidebar'; diff --git a/apps/activitypub/src/components/layout/Sidebar/Recommendations.tsx b/apps/activitypub/src/components/layout/sidebar/recommendations.tsx similarity index 95% rename from apps/activitypub/src/components/layout/Sidebar/Recommendations.tsx rename to apps/activitypub/src/components/layout/sidebar/recommendations.tsx index 6081ece3597..19092185863 100644 --- a/apps/activitypub/src/components/layout/Sidebar/Recommendations.tsx +++ b/apps/activitypub/src/components/layout/sidebar/recommendations.tsx @@ -1,7 +1,7 @@ import * as React from 'react'; -import APAvatar from '@components/global/APAvatar'; -import ActivityItem from '@components/activities/ActivityItem'; -import ProfilePreviewHoverCard from '@components/global/ProfilePreviewHoverCard'; +import APAvatar from '@components/global/ap-avatar'; +import ActivityItem from '@components/activities/activity-item'; +import ProfilePreviewHoverCard from '@components/global/profile-preview-hover-card'; import {Button, H4, LucideIcon, Skeleton} from '@tryghost/shade'; import {handleProfileClick} from '@utils/handle-profile-click'; import {useNavigateWithBasePath} from '@src/hooks/use-navigate-with-base-path'; diff --git a/apps/activitypub/src/components/layout/Sidebar/SidebarMenuLink.tsx b/apps/activitypub/src/components/layout/sidebar/sidebar-menu-link.tsx similarity index 100% rename from apps/activitypub/src/components/layout/Sidebar/SidebarMenuLink.tsx rename to apps/activitypub/src/components/layout/sidebar/sidebar-menu-link.tsx diff --git a/apps/activitypub/src/components/layout/Sidebar/Sidebar.tsx b/apps/activitypub/src/components/layout/sidebar/sidebar.tsx similarity index 95% rename from apps/activitypub/src/components/layout/Sidebar/Sidebar.tsx rename to apps/activitypub/src/components/layout/sidebar/sidebar.tsx index 82b3e38dbd9..37785d48c9f 100644 --- a/apps/activitypub/src/components/layout/Sidebar/Sidebar.tsx +++ b/apps/activitypub/src/components/layout/sidebar/sidebar.tsx @@ -1,10 +1,10 @@ import * as React from 'react'; -import FeedbackBox from './FeedbackBox'; -import NewNoteModal from '@src/components/modals/NewNoteModal'; -import Recommendations from './Recommendations'; -import Search from '@src/components/modals/Search'; -import SearchInput from '../Header/SearchInput'; -import SidebarMenuLink from './SidebarMenuLink'; +import FeedbackBox from './feedback-box'; +import NewNoteModal from '@src/components/modals/new-note-modal'; +import Recommendations from './recommendations'; +import Search from '@src/components/modals/search'; +import SearchInput from '../header/search-input'; +import SidebarMenuLink from './sidebar-menu-link'; import {Button, Dialog, DialogContent, DialogTrigger, LucideIcon} from '@tryghost/shade'; import {useAppBasePath} from '@src/hooks/use-app-base-path'; import {useCurrentUser} from '@tryghost/admin-x-framework/api/current-user'; diff --git a/apps/activitypub/src/components/modals/NewNoteModal.tsx b/apps/activitypub/src/components/modals/new-note-modal.tsx similarity index 99% rename from apps/activitypub/src/components/modals/NewNoteModal.tsx rename to apps/activitypub/src/components/modals/new-note-modal.tsx index da2887ae41c..8861712a159 100644 --- a/apps/activitypub/src/components/modals/NewNoteModal.tsx +++ b/apps/activitypub/src/components/modals/new-note-modal.tsx @@ -1,6 +1,6 @@ import * as FormPrimitive from '@radix-ui/react-form'; -import APAvatar from '@components/global/APAvatar'; -import FeedItem from '@components/feed/FeedItem'; +import APAvatar from '@components/global/ap-avatar'; +import FeedItem from '@components/feed/feed-item'; import getUsername from '@utils/get-username'; import {ActorProperties, ObjectProperties} from '@tryghost/admin-x-framework/api/activitypub'; import {Button, Dialog, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle, DialogTrigger, Input, LoadingIndicator, LucideIcon, Skeleton} from '@tryghost/shade'; diff --git a/apps/activitypub/src/components/modals/Search.tsx b/apps/activitypub/src/components/modals/search.tsx similarity index 97% rename from apps/activitypub/src/components/modals/Search.tsx rename to apps/activitypub/src/components/modals/search.tsx index 0f6fa97f151..359aa9a2dac 100644 --- a/apps/activitypub/src/components/modals/Search.tsx +++ b/apps/activitypub/src/components/modals/search.tsx @@ -1,11 +1,11 @@ -import APAvatar from '@components/global/APAvatar'; -import ActivityItem from '@components/activities/ActivityItem'; -import FollowButton from '@components/global/FollowButton'; -import ProfilePreviewHoverCard from '../global/ProfilePreviewHoverCard'; +import APAvatar from '@components/global/ap-avatar'; +import ActivityItem from '@components/activities/activity-item'; +import FollowButton from '@components/global/follow-button'; +import ProfilePreviewHoverCard from '../global/profile-preview-hover-card'; import React, {useEffect, useMemo, useRef, useState} from 'react'; import {ActorProperties} from '@tryghost/admin-x-framework/api/activitypub'; import {Button, H4, Input, LoadingIndicator, LucideIcon, NoValueLabel, NoValueLabelIcon} from '@tryghost/shade'; -import {SuggestedProfiles} from '../global/SuggestedProfiles'; +import {SuggestedProfiles} from '../global/suggested-profiles'; import {useAccountForUser, useSearchForUser, useSuggestedProfilesForUser, useTopicsForUser} from '@hooks/use-activity-pub-queries'; import {useDebounce} from 'use-debounce'; import {useNavigateWithBasePath} from '@src/hooks/use-navigate-with-base-path'; diff --git a/apps/activitypub/src/components/TopicFilter.tsx b/apps/activitypub/src/components/topic-filter.tsx similarity index 100% rename from apps/activitypub/src/components/TopicFilter.tsx rename to apps/activitypub/src/components/topic-filter.tsx diff --git a/apps/activitypub/src/index.tsx b/apps/activitypub/src/index.tsx index cb20f2b5899..74d98a5b9cf 100644 --- a/apps/activitypub/src/index.tsx +++ b/apps/activitypub/src/index.tsx @@ -1,5 +1,5 @@ import './styles/index.css'; -import App from './App'; +import App from './app'; export { App as AdminXApp diff --git a/apps/activitypub/src/routes.tsx b/apps/activitypub/src/routes.tsx index f8ac66ebac3..e0f1c5fad1b 100644 --- a/apps/activitypub/src/routes.tsx +++ b/apps/activitypub/src/routes.tsx @@ -1,17 +1,17 @@ -import BlueskySharing from '@views/Preferences/components/BlueskySharing'; -import Error from '@components/layout/Error'; -import Explore from '@views/Explore'; -import Feed from './views/Feed/Feed'; -import Inbox from '@views/Inbox'; -import Moderation from '@views/Preferences/components/Moderation'; -import Note from './views/Feed/Note'; -import Notifications from '@views/Notifications'; -import Onboarding from '@components/layout/Onboarding'; -import OnboardingStep1 from '@components/layout/Onboarding/Step1'; -import OnboardingStep2 from '@components/layout/Onboarding/Step2'; -import OnboardingStep3 from '@components/layout/Onboarding/Step3'; -import Preferences from '@views/Preferences'; -import Profile from '@views/Profile'; +import BlueskySharing from '@views/preferences/components/bluesky-sharing'; +import ErrorPage from '@components/layout/error'; +import Explore from '@views/explore'; +import Feed from './views/feed/feed'; +import Inbox from '@views/inbox'; +import Moderation from '@views/preferences/components/moderation'; +import Note from './views/feed/note'; +import Notifications from '@views/notifications'; +import Onboarding from '@components/layout/onboarding'; +import OnboardingStep1 from '@components/layout/onboarding/step-1'; +import OnboardingStep2 from '@components/layout/onboarding/step-2'; +import OnboardingStep3 from '@components/layout/onboarding/step-3'; +import Preferences from '@views/preferences'; +import Profile from '@views/profile'; import {Navigate, Outlet, RouteObject} from '@tryghost/admin-x-framework'; const basePath = import.meta.env.VITE_TEST ? '' : 'activitypub'; @@ -27,7 +27,7 @@ export const routes: CustomRouteObject[] = [ // Root route that defines the app's base path path: basePath, element: , - errorElement: , // This will catch all errors in child routes + errorElement: , // This will catch all errors in child routes handle: 'activitypub-basepath', children: [ { @@ -147,7 +147,7 @@ export const routes: CustomRouteObject[] = [ }, { path: '*', - element: + element: } ] } diff --git a/apps/activitypub/src/standalone.tsx b/apps/activitypub/src/standalone.tsx index dd723c833c7..c4419c578c8 100644 --- a/apps/activitypub/src/standalone.tsx +++ b/apps/activitypub/src/standalone.tsx @@ -1,5 +1,5 @@ import './styles/index.css'; -import App from './App.tsx'; +import App from './app.tsx'; import renderStandaloneApp from '@tryghost/admin-x-framework/test/render'; renderStandaloneApp(App, {}); diff --git a/apps/activitypub/src/views/Explore/index.tsx b/apps/activitypub/src/views/Explore/index.tsx deleted file mode 100644 index 69f9d9c33da..00000000000 --- a/apps/activitypub/src/views/Explore/index.tsx +++ /dev/null @@ -1 +0,0 @@ -export {default} from './Explore'; diff --git a/apps/activitypub/src/views/Inbox/index.tsx b/apps/activitypub/src/views/Inbox/index.tsx deleted file mode 100644 index 73f043d35d1..00000000000 --- a/apps/activitypub/src/views/Inbox/index.tsx +++ /dev/null @@ -1 +0,0 @@ -export {default} from './Inbox'; diff --git a/apps/activitypub/src/views/Notifications/index.tsx b/apps/activitypub/src/views/Notifications/index.tsx deleted file mode 100644 index 47525d48703..00000000000 --- a/apps/activitypub/src/views/Notifications/index.tsx +++ /dev/null @@ -1 +0,0 @@ -export {default} from './Notifications'; diff --git a/apps/activitypub/src/views/Preferences/index.tsx b/apps/activitypub/src/views/Preferences/index.tsx deleted file mode 100644 index 1294ce63a1e..00000000000 --- a/apps/activitypub/src/views/Preferences/index.tsx +++ /dev/null @@ -1 +0,0 @@ -export {default} from './Preferences'; diff --git a/apps/activitypub/src/views/Profile/index.tsx b/apps/activitypub/src/views/Profile/index.tsx deleted file mode 100644 index 8585fc7dead..00000000000 --- a/apps/activitypub/src/views/Profile/index.tsx +++ /dev/null @@ -1 +0,0 @@ -export {default} from './Profile'; diff --git a/apps/activitypub/src/views/Explore/Explore.tsx b/apps/activitypub/src/views/explore/explore.tsx similarity index 96% rename from apps/activitypub/src/views/Explore/Explore.tsx rename to apps/activitypub/src/views/explore/explore.tsx index fd42ed80122..cce5e61b4ef 100644 --- a/apps/activitypub/src/views/Explore/Explore.tsx +++ b/apps/activitypub/src/views/explore/explore.tsx @@ -1,15 +1,15 @@ -import APAvatar from '@src/components/global/APAvatar'; -import FollowButton from '@src/components/global/FollowButton'; +import APAvatar from '@src/components/global/ap-avatar'; +import FollowButton from '@src/components/global/follow-button'; import Layout from '@components/layout'; -import ProfilePreviewHoverCard from '@components/global/ProfilePreviewHoverCard'; +import ProfilePreviewHoverCard from '@components/global/profile-preview-hover-card'; import React, {useEffect} from 'react'; -import TopicFilter, {type Topic} from '@src/components/TopicFilter'; +import TopicFilter, {type Topic} from '@src/components/topic-filter'; import {type Account, type ExploreAccount} from '@src/api/activitypub'; import {Button, H4, LoadingIndicator, LucideIcon, Skeleton} from '@tryghost/shade'; import {openLinksInNewTab, stripHtml} from '@src/utils/content-formatters'; import {useAccountForUser, useExploreProfilesForUserByTopic} from '@hooks/use-activity-pub-queries'; import {useNavigateWithBasePath} from '@src/hooks/use-navigate-with-base-path'; -import {useOnboardingStatus} from '@src/components/layout/Onboarding'; +import {useOnboardingStatus} from '@src/components/layout/onboarding'; import {useParams} from '@tryghost/admin-x-framework'; interface ExploreProfileProps { diff --git a/apps/activitypub/src/views/explore/index.tsx b/apps/activitypub/src/views/explore/index.tsx new file mode 100644 index 00000000000..625f16d884c --- /dev/null +++ b/apps/activitypub/src/views/explore/index.tsx @@ -0,0 +1 @@ +export {default} from './explore'; diff --git a/apps/activitypub/src/views/Feed/components/FeedInput.tsx b/apps/activitypub/src/views/feed/components/feed-input.tsx similarity index 90% rename from apps/activitypub/src/views/Feed/components/FeedInput.tsx rename to apps/activitypub/src/views/feed/components/feed-input.tsx index dc590727a8a..9e31e91dcac 100644 --- a/apps/activitypub/src/views/Feed/components/FeedInput.tsx +++ b/apps/activitypub/src/views/feed/components/feed-input.tsx @@ -1,5 +1,5 @@ -import APAvatar from '@src/components/global/APAvatar'; -import NewNoteModal from '@src/components/modals/NewNoteModal'; +import APAvatar from '@src/components/global/ap-avatar'; +import NewNoteModal from '@src/components/modals/new-note-modal'; import {ActorProperties} from '@tryghost/admin-x-framework/api/activitypub'; const FeedInput: React.FC<{user?: ActorProperties}> = ({user}) => { diff --git a/apps/activitypub/src/views/Feed/components/FeedList.tsx b/apps/activitypub/src/views/feed/components/feed-list.tsx similarity index 96% rename from apps/activitypub/src/views/Feed/components/FeedList.tsx rename to apps/activitypub/src/views/feed/components/feed-list.tsx index e50bb7c1ddb..6e2ce7af334 100644 --- a/apps/activitypub/src/views/Feed/components/FeedList.tsx +++ b/apps/activitypub/src/views/feed/components/feed-list.tsx @@ -1,12 +1,12 @@ -import FeedInput from './FeedInput'; -import FeedItem from '@src/components/feed/FeedItem'; +import FeedInput from './feed-input'; +import FeedItem from '@src/components/feed/feed-item'; import Layout from '@src/components/layout'; -import NewNoteModal from '@src/components/modals/NewNoteModal'; -import SuggestedProfiles from './SuggestedProfiles'; +import NewNoteModal from '@src/components/modals/new-note-modal'; +import SuggestedProfiles from './suggested-profiles'; import {Activity} from '@src/api/activitypub'; import {ActorProperties} from '@tryghost/admin-x-framework/api/activitypub'; import {Button, LoadingIndicator, LucideIcon, Separator} from '@tryghost/shade'; -import {EmptyViewIcon, EmptyViewIndicator} from '@src/components/global/EmptyViewIndicator'; +import {EmptyViewIcon, EmptyViewIndicator} from '@src/components/global/empty-view-indicator'; import {isPendingActivity} from '@src/utils/pending-activity'; import {useEffect, useRef} from 'react'; import {useNavigateWithBasePath} from '@src/hooks/use-navigate-with-base-path'; diff --git a/apps/activitypub/src/views/Feed/components/SuggestedProfiles.tsx b/apps/activitypub/src/views/feed/components/suggested-profiles.tsx similarity index 97% rename from apps/activitypub/src/views/Feed/components/SuggestedProfiles.tsx rename to apps/activitypub/src/views/feed/components/suggested-profiles.tsx index c2d9641ee2c..e2473d6eb15 100644 --- a/apps/activitypub/src/views/Feed/components/SuggestedProfiles.tsx +++ b/apps/activitypub/src/views/feed/components/suggested-profiles.tsx @@ -1,6 +1,6 @@ -import APAvatar from '@src/components/global/APAvatar'; -import FollowButton from '@src/components/global/FollowButton'; -import ProfilePreviewHoverCard from '@components/global/ProfilePreviewHoverCard'; +import APAvatar from '@src/components/global/ap-avatar'; +import FollowButton from '@src/components/global/follow-button'; +import ProfilePreviewHoverCard from '@components/global/profile-preview-hover-card'; import {Account} from '@src/api/activitypub'; import {Button, H4, LucideIcon, Separator, Skeleton} from '@tryghost/shade'; import {useEffect, useRef, useState} from 'react'; diff --git a/apps/activitypub/src/views/Feed/Feed.tsx b/apps/activitypub/src/views/feed/feed.tsx similarity index 91% rename from apps/activitypub/src/views/Feed/Feed.tsx rename to apps/activitypub/src/views/feed/feed.tsx index 11f04ab9b4a..73fefda4332 100644 --- a/apps/activitypub/src/views/Feed/Feed.tsx +++ b/apps/activitypub/src/views/feed/feed.tsx @@ -1,5 +1,5 @@ -import Error from '@components/layout/Error'; -import FeedList from './components/FeedList'; +import Error from '@components/layout/error'; +import FeedList from './components/feed-list'; import React from 'react'; import {isApiError} from '@src/api/activitypub'; import { diff --git a/apps/activitypub/src/views/Feed/Note.tsx b/apps/activitypub/src/views/feed/note.tsx similarity index 97% rename from apps/activitypub/src/views/Feed/Note.tsx rename to apps/activitypub/src/views/feed/note.tsx index d9798c207aa..07949ea3ce2 100644 --- a/apps/activitypub/src/views/Feed/Note.tsx +++ b/apps/activitypub/src/views/feed/note.tsx @@ -1,14 +1,14 @@ -import APAvatar from '@src/components/global/APAvatar'; -import APReplyBox from '@src/components/global/APReplyBox'; -import DeletedFeedItem from '@src/components/feed/DeletedFeedItem'; -import FeedItem from '@components/feed/FeedItem'; -import Layout from '@src/components/layout/Layout'; -import ProfilePreviewHoverCard from '@components/global/ProfilePreviewHoverCard'; +import APAvatar from '@src/components/global/ap-avatar'; +import APReplyBox from '@src/components/global/ap-reply-box'; +import DeletedFeedItem from '@src/components/feed/deleted-feed-item'; +import FeedItem from '@components/feed/feed-item'; +import Layout from '@src/components/layout/layout'; +import ProfilePreviewHoverCard from '@components/global/profile-preview-hover-card'; import React, {useEffect, useRef, useState} from 'react'; -import ShowRepliesButton from '@src/components/global/ShowRepliesButton'; +import ShowRepliesButton from '@src/components/global/show-replies-button'; import getUsername from '@src/utils/get-username'; import {Activity} from '@tryghost/admin-x-framework/api/activitypub'; -import {EmptyViewIcon, EmptyViewIndicator} from '@src/components/global/EmptyViewIndicator'; +import {EmptyViewIcon, EmptyViewIndicator} from '@src/components/global/empty-view-indicator'; import {LoadingIndicator, LucideIcon, Skeleton} from '@tryghost/shade'; import {handleProfileClick} from '@src/utils/handle-profile-click'; import {isPendingActivity} from '@src/utils/pending-activity'; diff --git a/apps/activitypub/src/views/Inbox/components/Customizer.tsx b/apps/activitypub/src/views/inbox/components/customizer.tsx similarity index 100% rename from apps/activitypub/src/views/Inbox/components/Customizer.tsx rename to apps/activitypub/src/views/inbox/components/customizer.tsx diff --git a/apps/activitypub/src/views/Inbox/components/InboxList.tsx b/apps/activitypub/src/views/inbox/components/inbox-list.tsx similarity index 98% rename from apps/activitypub/src/views/Inbox/components/InboxList.tsx rename to apps/activitypub/src/views/inbox/components/inbox-list.tsx index 69b859c8429..311be99eaf2 100644 --- a/apps/activitypub/src/views/Inbox/components/InboxList.tsx +++ b/apps/activitypub/src/views/inbox/components/inbox-list.tsx @@ -1,7 +1,7 @@ -import FeedItem from '@src/components/feed/FeedItem'; +import FeedItem from '@src/components/feed/feed-item'; import Layout from '@src/components/layout'; -import Reader from './Reader'; -import TopicFilter, {Topic} from '@src/components/TopicFilter'; +import Reader from './reader'; +import TopicFilter, {Topic} from '@src/components/topic-filter'; import {Activity} from '@src/api/activitypub'; import {Button, Dialog, DialogContent, DialogDescription, DialogHeader, DialogTitle, EmptyIndicator, LoadingIndicator, LucideIcon, Separator} from '@tryghost/shade'; import {isPendingActivity} from '@src/utils/pending-activity'; diff --git a/apps/activitypub/src/views/Inbox/components/Reader.tsx b/apps/activitypub/src/views/inbox/components/reader.tsx similarity index 98% rename from apps/activitypub/src/views/Inbox/components/Reader.tsx rename to apps/activitypub/src/views/inbox/components/reader.tsx index fc8398aa70c..9d0ae8729b5 100644 --- a/apps/activitypub/src/views/Inbox/components/Reader.tsx +++ b/apps/activitypub/src/views/inbox/components/reader.tsx @@ -1,22 +1,22 @@ -import Customizer, {COLOR_OPTIONS, type ColorOption, type FontSize, useCustomizerSettings} from './Customizer'; +import Customizer, {COLOR_OPTIONS, type ColorOption, type FontSize, useCustomizerSettings} from './customizer'; import React, {useCallback, useEffect, useRef, useState} from 'react'; -import ShowRepliesButton from '@src/components/global/ShowRepliesButton'; +import ShowRepliesButton from '@src/components/global/show-replies-button'; import getUsername from '../../../utils/get-username'; import {LoadingIndicator, Skeleton} from '@tryghost/shade'; import {renderTimestamp} from '../../../utils/render-timestamp'; import {useReplyChainData} from '@hooks/use-reply-chain-data'; -import APAvatar from '@src/components/global/APAvatar'; -import APReplyBox from '@src/components/global/APReplyBox'; -import BackButton from '@src/components/global/BackButton'; -import DeletedFeedItem from '@src/components/feed/DeletedFeedItem'; -import FeedItem from '@src/components/feed/FeedItem'; -import FeedItemStats from '@src/components/feed/FeedItemStats'; -import FollowButton from '@src/components/global/FollowButton'; -import ProfilePreviewHoverCard from '@components/global/ProfilePreviewHoverCard'; -import TableOfContents, {TOCItem} from '@src/components/feed/TableOfContents'; -import articleBodyStyles from '@src/components/articleBodyStyles'; +import APAvatar from '@src/components/global/ap-avatar'; +import APReplyBox from '@src/components/global/ap-reply-box'; +import BackButton from '@src/components/global/back-button'; +import DeletedFeedItem from '@src/components/feed/deleted-feed-item'; +import FeedItem from '@src/components/feed/feed-item'; +import FeedItemStats from '@src/components/feed/feed-item-stats'; +import FollowButton from '@src/components/global/follow-button'; +import ProfilePreviewHoverCard from '@components/global/profile-preview-hover-card'; +import TableOfContents, {TOCItem} from '@src/components/feed/table-of-contents'; +import articleBodyStyles from '@src/components/article-body-styles'; import getReadingTime from '../../../utils/get-reading-time'; import {Activity} from '@src/api/activitypub'; import {cardsCSS, cardsJS} from '@src/utils/cards-assets'; diff --git a/apps/activitypub/src/views/Inbox/Inbox.tsx b/apps/activitypub/src/views/inbox/inbox.tsx similarity index 90% rename from apps/activitypub/src/views/Inbox/Inbox.tsx rename to apps/activitypub/src/views/inbox/inbox.tsx index 1b40997e9bf..7cc948bee73 100644 --- a/apps/activitypub/src/views/Inbox/Inbox.tsx +++ b/apps/activitypub/src/views/inbox/inbox.tsx @@ -1,7 +1,7 @@ -import Error from '@components/layout/Error'; -import InboxList from './components/InboxList'; +import Error from '@components/layout/error'; +import InboxList from './components/inbox-list'; import React, {useState} from 'react'; -import {Topic} from '@src/components/TopicFilter'; +import {Topic} from '@src/components/topic-filter'; import {isApiError} from '@src/api/activitypub'; import {useDiscoveryFeedForUser, useInboxForUser} from '@hooks/use-activity-pub-queries'; diff --git a/apps/activitypub/src/views/inbox/index.tsx b/apps/activitypub/src/views/inbox/index.tsx new file mode 100644 index 00000000000..2024584ca65 --- /dev/null +++ b/apps/activitypub/src/views/inbox/index.tsx @@ -0,0 +1 @@ +export {default} from './inbox'; diff --git a/apps/activitypub/src/views/Notifications/components/NotificationIcon.tsx b/apps/activitypub/src/views/notifications/components/notification-icon.tsx similarity index 100% rename from apps/activitypub/src/views/Notifications/components/NotificationIcon.tsx rename to apps/activitypub/src/views/notifications/components/notification-icon.tsx diff --git a/apps/activitypub/src/views/Notifications/components/NotificationItem.tsx b/apps/activitypub/src/views/notifications/components/notification-item.tsx similarity index 98% rename from apps/activitypub/src/views/Notifications/components/NotificationItem.tsx rename to apps/activitypub/src/views/notifications/components/notification-item.tsx index a075ad10776..3d1e27eb16e 100644 --- a/apps/activitypub/src/views/Notifications/components/NotificationItem.tsx +++ b/apps/activitypub/src/views/notifications/components/notification-item.tsx @@ -1,4 +1,4 @@ -import NotificationIcon, {NotificationIconSize, NotificationType} from './NotificationIcon'; +import NotificationIcon, {NotificationIconSize, NotificationType} from './notification-icon'; import React from 'react'; // Context to share common props between compound components diff --git a/apps/activitypub/src/views/notifications/index.tsx b/apps/activitypub/src/views/notifications/index.tsx new file mode 100644 index 00000000000..69a1db57178 --- /dev/null +++ b/apps/activitypub/src/views/notifications/index.tsx @@ -0,0 +1 @@ +export {default} from './notifications'; diff --git a/apps/activitypub/src/views/Notifications/Notifications.tsx b/apps/activitypub/src/views/notifications/notifications.tsx similarity index 97% rename from apps/activitypub/src/views/Notifications/Notifications.tsx rename to apps/activitypub/src/views/notifications/notifications.tsx index 0835914e940..733ba2af0be 100644 --- a/apps/activitypub/src/views/Notifications/Notifications.tsx +++ b/apps/activitypub/src/views/notifications/notifications.tsx @@ -2,19 +2,19 @@ import React, {useEffect, useRef} from 'react'; import {ActorProperties} from '@tryghost/admin-x-framework/api/activitypub'; import {Button, LoadingIndicator, LucideIcon, Skeleton} from '@tryghost/shade'; -import APAvatar from '@components/global/APAvatar'; -import Error from '@components/layout/Error'; -import FeedItemStats from '@components/feed/FeedItemStats'; -import FollowButton from '@components/global/FollowButton'; +import APAvatar from '@components/global/ap-avatar'; +import ErrorPage from '@components/layout/error'; +import FeedItemStats from '@components/feed/feed-item-stats'; +import FollowButton from '@components/global/follow-button'; import Layout from '@components/layout'; -import NotificationIcon from './components/NotificationIcon'; -import NotificationItem from './components/NotificationItem'; -import ProfilePreviewHoverCard from '@components/global/ProfilePreviewHoverCard'; -import Separator from '@components/global/Separator'; -import {EmptyViewIcon, EmptyViewIndicator} from '@src/components/global/EmptyViewIndicator'; +import NotificationIcon from './components/notification-icon'; +import NotificationItem from './components/notification-item'; +import ProfilePreviewHoverCard from '@components/global/profile-preview-hover-card'; +import Separator from '@components/global/separator'; +import {EmptyViewIcon, EmptyViewIndicator} from '@src/components/global/empty-view-indicator'; import {Notification, isApiError} from '@src/api/activitypub'; import {handleProfileClick} from '@utils/handle-profile-click'; -import {renderFeedAttachment} from '@components/feed/FeedItem'; +import {renderFeedAttachment} from '@components/feed/feed-item'; import {renderTimestamp} from '@src/utils/render-timestamp'; import {stripHtml} from '@src/utils/content-formatters'; import {useNavigateWithBasePath} from '@src/hooks/use-navigate-with-base-path'; @@ -283,7 +283,7 @@ const Notifications: React.FC = () => { }; if (error && isApiError(error)) { - return ; + return ; } return ( diff --git a/apps/activitypub/src/views/Preferences/components/BlueskySharing.tsx b/apps/activitypub/src/views/preferences/components/bluesky-sharing.tsx similarity index 99% rename from apps/activitypub/src/views/Preferences/components/BlueskySharing.tsx rename to apps/activitypub/src/views/preferences/components/bluesky-sharing.tsx index d0ecbd58455..642c9fa84a7 100644 --- a/apps/activitypub/src/views/Preferences/components/BlueskySharing.tsx +++ b/apps/activitypub/src/views/preferences/components/bluesky-sharing.tsx @@ -1,5 +1,5 @@ -import APAvatar from '@src/components/global/APAvatar'; -import EditProfile from '@src/views/Preferences/components/EditProfile'; +import APAvatar from '@src/components/global/ap-avatar'; +import EditProfile from '@src/views/preferences/components/edit-profile'; import Layout from '@src/components/layout'; import React, {useCallback, useEffect, useRef, useState} from 'react'; import {AlertDialog, diff --git a/apps/activitypub/src/views/Preferences/components/DotsPattern.tsx b/apps/activitypub/src/views/preferences/components/dots-pattern.tsx similarity index 100% rename from apps/activitypub/src/views/Preferences/components/DotsPattern.tsx rename to apps/activitypub/src/views/preferences/components/dots-pattern.tsx diff --git a/apps/activitypub/src/views/Preferences/components/EditProfile.tsx b/apps/activitypub/src/views/preferences/components/edit-profile.tsx similarity index 100% rename from apps/activitypub/src/views/Preferences/components/EditProfile.tsx rename to apps/activitypub/src/views/preferences/components/edit-profile.tsx diff --git a/apps/activitypub/src/views/Preferences/components/Moderation.tsx b/apps/activitypub/src/views/preferences/components/moderation.tsx similarity index 97% rename from apps/activitypub/src/views/Preferences/components/Moderation.tsx rename to apps/activitypub/src/views/preferences/components/moderation.tsx index 3cc5f614e5a..c1599af5a35 100644 --- a/apps/activitypub/src/views/Preferences/components/Moderation.tsx +++ b/apps/activitypub/src/views/preferences/components/moderation.tsx @@ -1,7 +1,7 @@ -import APAvatar from '@src/components/global/APAvatar'; -import ActivityItem from '@src/components/activities/ActivityItem'; -import Layout from '@src/components/layout'; -import ProfilePreviewHoverCard from '@components/global/ProfilePreviewHoverCard'; +import APAvatar from '@components/global/ap-avatar'; +import ActivityItem from '@components/activities/activity-item'; +import Layout from '@components/layout'; +import ProfilePreviewHoverCard from '@components/global/profile-preview-hover-card'; import React, {useState} from 'react'; import {Account} from '@src/api/activitypub'; import {Button, H2, LucideIcon, NoValueLabel, NoValueLabelIcon, Skeleton, Tabs, TabsContent, TabsList, TabsTrigger} from '@tryghost/shade'; diff --git a/apps/activitypub/src/views/Preferences/components/Profile.tsx b/apps/activitypub/src/views/preferences/components/profile.tsx similarity index 99% rename from apps/activitypub/src/views/Preferences/components/Profile.tsx rename to apps/activitypub/src/views/preferences/components/profile.tsx index ee92db17e26..bc254074534 100644 --- a/apps/activitypub/src/views/Preferences/components/Profile.tsx +++ b/apps/activitypub/src/views/preferences/components/profile.tsx @@ -1,7 +1,7 @@ import {memo, useCallback, useEffect, useRef, useState} from 'react'; -import APAvatar from '@src/components/global/APAvatar'; -import DotsPattern from './DotsPattern'; +import APAvatar from '@src/components/global/ap-avatar'; +import DotsPattern from './dots-pattern'; import ProfileCardShadow from '@assets/images/profile-card-shadow.png'; import ProfileCardShadowSquare from '@assets/images/profile-card-shadow-square.png'; import html2canvas from 'html2canvas-objectfit-fix'; diff --git a/apps/activitypub/src/views/Preferences/components/Settings.tsx b/apps/activitypub/src/views/preferences/components/settings.tsx similarity index 99% rename from apps/activitypub/src/views/Preferences/components/Settings.tsx rename to apps/activitypub/src/views/preferences/components/settings.tsx index 83436ce165e..7ad056fac3a 100644 --- a/apps/activitypub/src/views/Preferences/components/Settings.tsx +++ b/apps/activitypub/src/views/preferences/components/settings.tsx @@ -1,4 +1,4 @@ -import EditProfile from './EditProfile'; +import EditProfile from './edit-profile'; import React, {useState} from 'react'; import {Account} from '@src/api/activitypub'; import {Button, Dialog, DialogContent, DialogHeader, DialogTitle, DialogTrigger, H4, LucideIcon, cn} from '@tryghost/shade'; diff --git a/apps/activitypub/src/views/preferences/index.tsx b/apps/activitypub/src/views/preferences/index.tsx new file mode 100644 index 00000000000..235668f1a9b --- /dev/null +++ b/apps/activitypub/src/views/preferences/index.tsx @@ -0,0 +1 @@ +export {default} from './preferences'; diff --git a/apps/activitypub/src/views/Preferences/Preferences.tsx b/apps/activitypub/src/views/preferences/preferences.tsx similarity index 85% rename from apps/activitypub/src/views/Preferences/Preferences.tsx rename to apps/activitypub/src/views/preferences/preferences.tsx index 66f2a4a0e73..debcf379e5b 100644 --- a/apps/activitypub/src/views/Preferences/Preferences.tsx +++ b/apps/activitypub/src/views/preferences/preferences.tsx @@ -1,8 +1,8 @@ -import Error from '@components/layout/Error'; +import Error from '@components/layout/error'; import Layout from '@components/layout'; -import Profile from './components/Profile'; +import Profile from './components/profile'; import React from 'react'; -import Settings from './components/Settings'; +import Settings from './components/settings'; import {isApiError} from '@src/api/activitypub'; import {useAccountForUser} from '@hooks/use-activity-pub-queries'; diff --git a/apps/activitypub/src/views/Profile/components/ActorList.tsx b/apps/activitypub/src/views/profile/components/actor-list.tsx similarity index 95% rename from apps/activitypub/src/views/Profile/components/ActorList.tsx rename to apps/activitypub/src/views/profile/components/actor-list.tsx index 8d7390f8e42..6ed76aa87a9 100644 --- a/apps/activitypub/src/views/Profile/components/ActorList.tsx +++ b/apps/activitypub/src/views/profile/components/actor-list.tsx @@ -1,7 +1,7 @@ -import APAvatar from '@src/components/global/APAvatar'; -import ActivityItem from '@src/components/activities/ActivityItem'; -import FollowButton from '@src/components/global/FollowButton'; -import ProfilePreviewHoverCard from '@components/global/ProfilePreviewHoverCard'; +import APAvatar from '@src/components/global/ap-avatar'; +import ActivityItem from '@src/components/activities/activity-item'; +import FollowButton from '@src/components/global/follow-button'; +import ProfilePreviewHoverCard from '@components/global/profile-preview-hover-card'; import React, {useEffect, useRef} from 'react'; import getName from '@src/utils/get-name'; import getUsername from '@src/utils/get-username'; diff --git a/apps/activitypub/src/views/Profile/components/Likes.tsx b/apps/activitypub/src/views/profile/components/likes.tsx similarity index 98% rename from apps/activitypub/src/views/Profile/components/Likes.tsx rename to apps/activitypub/src/views/profile/components/likes.tsx index 561625c1270..4bf253f56c9 100644 --- a/apps/activitypub/src/views/Profile/components/Likes.tsx +++ b/apps/activitypub/src/views/profile/components/likes.tsx @@ -1,4 +1,4 @@ -import FeedItem from '@src/components/feed/FeedItem'; +import FeedItem from '@src/components/feed/feed-item'; import {Activity} from '@src/api/activitypub'; import {LoadingIndicator, LucideIcon, NoValueLabel, NoValueLabelIcon, Separator} from '@tryghost/shade'; import {useEffect, useRef} from 'react'; diff --git a/apps/activitypub/src/views/Profile/components/Posts.tsx b/apps/activitypub/src/views/profile/components/posts.tsx similarity index 98% rename from apps/activitypub/src/views/Profile/components/Posts.tsx rename to apps/activitypub/src/views/profile/components/posts.tsx index f40d61f29a4..9722933abd8 100644 --- a/apps/activitypub/src/views/Profile/components/Posts.tsx +++ b/apps/activitypub/src/views/profile/components/posts.tsx @@ -1,4 +1,4 @@ -import FeedItem from '@src/components/feed/FeedItem'; +import FeedItem from '@src/components/feed/feed-item'; import {Activity} from '@src/api/activitypub'; import {LoadingIndicator, LucideIcon, NoValueLabel, NoValueLabelIcon, Separator} from '@tryghost/shade'; import {useEffect, useRef} from 'react'; diff --git a/apps/activitypub/src/views/Profile/components/ProfileMenu.tsx b/apps/activitypub/src/views/profile/components/profile-menu.tsx similarity index 99% rename from apps/activitypub/src/views/Profile/components/ProfileMenu.tsx rename to apps/activitypub/src/views/profile/components/profile-menu.tsx index 13bfa885b7a..dd7913662af 100644 --- a/apps/activitypub/src/views/Profile/components/ProfileMenu.tsx +++ b/apps/activitypub/src/views/profile/components/profile-menu.tsx @@ -1,5 +1,5 @@ import React, {useState} from 'react'; -import UnblockDialog from './UnblockDialog'; +import UnblockDialog from './unblock-dialog'; import {Account} from '@src/api/activitypub'; import { AlertDialog, diff --git a/apps/activitypub/src/views/Profile/components/ProfilePage.tsx b/apps/activitypub/src/views/profile/components/profile-page.tsx similarity index 97% rename from apps/activitypub/src/views/Profile/components/ProfilePage.tsx rename to apps/activitypub/src/views/profile/components/profile-page.tsx index 17eccebb3f0..1895ce54844 100644 --- a/apps/activitypub/src/views/Profile/components/ProfilePage.tsx +++ b/apps/activitypub/src/views/profile/components/profile-page.tsx @@ -1,20 +1,20 @@ -import APAvatar from '@src/components/global/APAvatar'; -import EditProfile from '@src/views/Preferences/components/EditProfile'; -import FollowButton from '@src/components/global/FollowButton'; +import APAvatar from '@src/components/global/ap-avatar'; +import EditProfile from '@src/views/preferences/components/edit-profile'; +import FollowButton from '@src/components/global/follow-button'; import Layout from '@src/components/layout'; -import ProfileMenu from './ProfileMenu'; -import UnblockButton from './UnblockButton'; +import ProfileMenu from './profile-menu'; +import UnblockButton from './unblock-button'; import {Account} from '@src/api/activitypub'; import {Badge, Button, Dialog, DialogContent, DialogHeader, DialogTitle, DialogTrigger, H2, H4, LucideIcon, NoValueLabel, NoValueLabelIcon, Skeleton, Tabs, TabsContent, TabsList, TabsTrigger, TabsTriggerCount, abbreviateNumber} from '@tryghost/shade'; -import {EmptyViewIcon, EmptyViewIndicator} from '@src/components/global/EmptyViewIndicator'; -import {SettingAction} from '@src/views/Preferences/components/Settings'; +import {EmptyViewIcon, EmptyViewIndicator} from '@src/components/global/empty-view-indicator'; +import {SettingAction} from '@src/views/preferences/components/settings'; import {openLinksInNewTab, stripHtml} from '@src/utils/content-formatters'; import {toast} from 'sonner'; import {useAccountForUser, useBlockDomainMutationForUser, useBlockMutationForUser, useUnblockDomainMutationForUser, useUnblockMutationForUser} from '@src/hooks/use-activity-pub-queries'; import {useEffect, useMemo, useRef, useState} from 'react'; import {useLocation, useNavigationStack, useParams} from '@tryghost/admin-x-framework'; import {useNavigateWithBasePath} from '@src/hooks/use-navigate-with-base-path'; -import type {ProfileTab} from '../Profile'; +import type {ProfileTab} from '../profile'; const noop = () => {}; diff --git a/apps/activitypub/src/views/Profile/components/UnblockButton.tsx b/apps/activitypub/src/views/profile/components/unblock-button.tsx similarity index 96% rename from apps/activitypub/src/views/Profile/components/UnblockButton.tsx rename to apps/activitypub/src/views/profile/components/unblock-button.tsx index 12f7d304927..e1b66be20bf 100644 --- a/apps/activitypub/src/views/Profile/components/UnblockButton.tsx +++ b/apps/activitypub/src/views/profile/components/unblock-button.tsx @@ -1,5 +1,5 @@ import React, {useState} from 'react'; -import UnblockDialog from './UnblockDialog'; +import UnblockDialog from './unblock-dialog'; import {Account} from '@src/api/activitypub'; import {Button} from '@tryghost/shade'; diff --git a/apps/activitypub/src/views/Profile/components/UnblockDialog.tsx b/apps/activitypub/src/views/profile/components/unblock-dialog.tsx similarity index 100% rename from apps/activitypub/src/views/Profile/components/UnblockDialog.tsx rename to apps/activitypub/src/views/profile/components/unblock-dialog.tsx diff --git a/apps/activitypub/src/views/profile/index.tsx b/apps/activitypub/src/views/profile/index.tsx new file mode 100644 index 00000000000..905b30cbd66 --- /dev/null +++ b/apps/activitypub/src/views/profile/index.tsx @@ -0,0 +1 @@ +export {default} from './profile'; diff --git a/apps/activitypub/src/views/Profile/Profile.tsx b/apps/activitypub/src/views/profile/profile.tsx similarity index 94% rename from apps/activitypub/src/views/Profile/Profile.tsx rename to apps/activitypub/src/views/profile/profile.tsx index 7faa0cde1dc..d2a5f158ff0 100644 --- a/apps/activitypub/src/views/Profile/Profile.tsx +++ b/apps/activitypub/src/views/profile/profile.tsx @@ -1,8 +1,8 @@ -import ActorList from './components/ActorList'; -import Error from '@components/layout/Error'; -import Likes from './components/Likes'; -import Posts from './components/Posts'; -import ProfilePage from './components/ProfilePage'; +import ActorList from './components/actor-list'; +import ErrorPage from '@components/layout/error'; +import Likes from './components/likes'; +import Posts from './components/posts'; +import ProfilePage from './components/profile-page'; import React, {useEffect} from 'react'; import {Activity, isApiError} from '@src/api/activitypub'; import {useAccountFollowsForUser, useAccountForUser, usePostsByAccount, usePostsLikedByAccount} from '@hooks/use-activity-pub-queries'; @@ -146,7 +146,7 @@ const Profile: React.FC = ({}) => { }, [params.handle, refetch]); if (accountError && isApiError(accountError) && accountError.statusCode !== 404) { - return ; + return ; } const customFields = Object.keys(account?.customFields || {}).map((key) => { From 68220b44a66fbed942abd387a215eb81a55dbb5d Mon Sep 17 00:00:00 2001 From: Michael Barrett Date: Wed, 10 Dec 2025 10:40:09 +0000 Subject: [PATCH 2/4] Fix Error shadowing --- apps/activitypub/src/routes.tsx | 6 +++--- apps/activitypub/src/views/feed/feed.tsx | 4 ++-- apps/activitypub/src/views/inbox/inbox.tsx | 4 ++-- apps/activitypub/src/views/notifications/notifications.tsx | 4 ++-- apps/activitypub/src/views/preferences/preferences.tsx | 4 ++-- apps/activitypub/src/views/profile/profile.tsx | 4 ++-- 6 files changed, 13 insertions(+), 13 deletions(-) diff --git a/apps/activitypub/src/routes.tsx b/apps/activitypub/src/routes.tsx index e0f1c5fad1b..dba3df5dfe5 100644 --- a/apps/activitypub/src/routes.tsx +++ b/apps/activitypub/src/routes.tsx @@ -1,5 +1,5 @@ +import AppError from '@components/layout/error'; import BlueskySharing from '@views/preferences/components/bluesky-sharing'; -import ErrorPage from '@components/layout/error'; import Explore from '@views/explore'; import Feed from './views/feed/feed'; import Inbox from '@views/inbox'; @@ -27,7 +27,7 @@ export const routes: CustomRouteObject[] = [ // Root route that defines the app's base path path: basePath, element: , - errorElement: , // This will catch all errors in child routes + errorElement: , // This will catch all errors in child routes handle: 'activitypub-basepath', children: [ { @@ -147,7 +147,7 @@ export const routes: CustomRouteObject[] = [ }, { path: '*', - element: + element: } ] } diff --git a/apps/activitypub/src/views/feed/feed.tsx b/apps/activitypub/src/views/feed/feed.tsx index 73fefda4332..bb713511703 100644 --- a/apps/activitypub/src/views/feed/feed.tsx +++ b/apps/activitypub/src/views/feed/feed.tsx @@ -1,4 +1,4 @@ -import Error from '@components/layout/error'; +import AppError from '@components/layout/error'; import FeedList from './components/feed-list'; import React from 'react'; import {isApiError} from '@src/api/activitypub'; @@ -16,7 +16,7 @@ const Feed: React.FC = () => { const {data: user} = useUserDataForUser('index'); if (error && isApiError(error)) { - return ; + return ; } return { const topicNotFound = error && isApiError(error) && error.statusCode === 404 && topic !== 'following'; if (error && isApiError(error) && !topicNotFound) { - return ; + return ; } const activities = topicNotFound ? [] : (data?.pages.flatMap(page => page.posts) ?? Array.from({length: 5}, (_, index) => ({id: `placeholder-${index}`, object: {}}))); diff --git a/apps/activitypub/src/views/notifications/notifications.tsx b/apps/activitypub/src/views/notifications/notifications.tsx index 733ba2af0be..dd0ca7d4f44 100644 --- a/apps/activitypub/src/views/notifications/notifications.tsx +++ b/apps/activitypub/src/views/notifications/notifications.tsx @@ -3,7 +3,7 @@ import {ActorProperties} from '@tryghost/admin-x-framework/api/activitypub'; import {Button, LoadingIndicator, LucideIcon, Skeleton} from '@tryghost/shade'; import APAvatar from '@components/global/ap-avatar'; -import ErrorPage from '@components/layout/error'; +import AppError from '@components/layout/error'; import FeedItemStats from '@components/feed/feed-item-stats'; import FollowButton from '@components/global/follow-button'; import Layout from '@components/layout'; @@ -283,7 +283,7 @@ const Notifications: React.FC = () => { }; if (error && isApiError(error)) { - return ; + return ; } return ( diff --git a/apps/activitypub/src/views/preferences/preferences.tsx b/apps/activitypub/src/views/preferences/preferences.tsx index debcf379e5b..c942b78c482 100644 --- a/apps/activitypub/src/views/preferences/preferences.tsx +++ b/apps/activitypub/src/views/preferences/preferences.tsx @@ -1,4 +1,4 @@ -import Error from '@components/layout/error'; +import AppError from '@components/layout/error'; import Layout from '@components/layout'; import Profile from './components/profile'; import React from 'react'; @@ -10,7 +10,7 @@ const Preferences: React.FC = () => { const {data: account, isLoading: isLoadingAccount, error: accountError} = useAccountForUser('index', 'me'); if (accountError && isApiError(accountError)) { - return ; + return ; } return ( diff --git a/apps/activitypub/src/views/profile/profile.tsx b/apps/activitypub/src/views/profile/profile.tsx index d2a5f158ff0..e2ba7acdadb 100644 --- a/apps/activitypub/src/views/profile/profile.tsx +++ b/apps/activitypub/src/views/profile/profile.tsx @@ -1,5 +1,5 @@ import ActorList from './components/actor-list'; -import ErrorPage from '@components/layout/error'; +import AppError from '@components/layout/error'; import Likes from './components/likes'; import Posts from './components/posts'; import ProfilePage from './components/profile-page'; @@ -146,7 +146,7 @@ const Profile: React.FC = ({}) => { }, [params.handle, refetch]); if (accountError && isApiError(accountError) && accountError.statusCode !== 404) { - return ; + return ; } const customFields = Object.keys(account?.customFields || {}).map((key) => { From 5cf2b1fe8d7eb691e3efdc330a854a65f494c38b Mon Sep 17 00:00:00 2001 From: Michael Barrett Date: Wed, 10 Dec 2025 11:24:55 +0000 Subject: [PATCH 3/4] Add eslint rules --- apps/activitypub/.eslintrc.cjs | 3 +++ apps/activitypub/test/.eslintrc.cjs | 6 +++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/apps/activitypub/.eslintrc.cjs b/apps/activitypub/.eslintrc.cjs index 952b37443d0..eab59b3c4dc 100644 --- a/apps/activitypub/.eslintrc.cjs +++ b/apps/activitypub/.eslintrc.cjs @@ -20,6 +20,9 @@ module.exports = { 'no-shadow': 'off', '@typescript-eslint/no-shadow': 'error', + // Enforce kebab-case (lowercase with hyphens) for all filenames + 'ghost/filenames/match-regex': ['error', '^[a-z0-9.-]+$', false], + // sort multiple import lines into alphabetical groups 'ghost/sort-imports-es6-autofix/sort-imports-es6': ['error', { memberSyntaxSortOrder: ['none', 'all', 'single', 'multiple'] diff --git a/apps/activitypub/test/.eslintrc.cjs b/apps/activitypub/test/.eslintrc.cjs index 42f8e77355a..7e1fcbff2b4 100644 --- a/apps/activitypub/test/.eslintrc.cjs +++ b/apps/activitypub/test/.eslintrc.cjs @@ -2,5 +2,9 @@ module.exports = { plugins: ['ghost'], extends: [ 'plugin:ghost/ts-test' - ] + ], + rules: { + // Enforce kebab-case (lowercase with hyphens) for all filenames + 'ghost/filenames/match-regex': ['error', '^[a-z0-9.-]+$', false] + } }; From b734bc4de911901d85efeb0e06c0dd19ad379b55 Mon Sep 17 00:00:00 2001 From: tomerqodo Date: Wed, 21 Jan 2026 15:50:37 +0200 Subject: [PATCH 4/4] update pr --- apps/activitypub/src/components/feed/feed-item-stats.tsx | 2 +- apps/activitypub/src/components/topic-filter.tsx | 4 ++-- apps/activitypub/src/routes.tsx | 2 +- apps/activitypub/src/views/feed/components/feed-list.tsx | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/apps/activitypub/src/components/feed/feed-item-stats.tsx b/apps/activitypub/src/components/feed/feed-item-stats.tsx index 42079cab5a7..7663f617a1e 100644 --- a/apps/activitypub/src/components/feed/feed-item-stats.tsx +++ b/apps/activitypub/src/components/feed/feed-item-stats.tsx @@ -60,6 +60,7 @@ const FeedItemStats: React.FC = ({ const handleLikeClick = async (e: React.MouseEvent) => { e.stopPropagation(); + setIsLiked(!isLiked); if (!isLiked) { likeMutation.mutate(object.id, { onError() { @@ -69,7 +70,6 @@ const FeedItemStats: React.FC = ({ } else { unlikeMutation.mutate(object.id); } - setIsLiked(!isLiked); onLikeClick(); }; diff --git a/apps/activitypub/src/components/topic-filter.tsx b/apps/activitypub/src/components/topic-filter.tsx index 16a0c4e2d10..2fc17a41e37 100644 --- a/apps/activitypub/src/components/topic-filter.tsx +++ b/apps/activitypub/src/components/topic-filter.tsx @@ -46,9 +46,9 @@ const TopicFilter: React.FC = ({currentTopic, onTopicChange, e className="flex w-full min-w-0 max-w-full snap-x snap-mandatory gap-2 overflow-x-auto [-ms-overflow-style:none] [scrollbar-width:none] [&::-webkit-scrollbar]:hidden" onScroll={handleScroll} > - {filteredTopics.map(({slug, name}) => ( + {filteredTopics.map(({slug, name}, index) => (