From 5ce8827a8cfc2425db20676a25ecbe5332f85685 Mon Sep 17 00:00:00 2001 From: Tom Moor Date: Tue, 30 Jan 2024 22:49:31 -0500 Subject: [PATCH] chore: Convert component to span by default --- app/components/CollectionDeleteDialog.tsx | 4 ++-- app/components/CommandBarItem.tsx | 2 +- app/components/CommentDeleteDialog.tsx | 2 +- app/components/DocumentExplorer.tsx | 4 +++- app/components/DuplicateDialog.tsx | 21 +++++++++---------- app/components/ErrorBoundary.tsx | 4 ++-- app/components/ExportDialog.tsx | 6 +++--- app/components/Input.tsx | 8 ++----- app/components/InputSelect.tsx | 3 ++- app/components/Modal.tsx | 8 ++----- .../Notifications/NotificationListItem.tsx | 8 +++---- app/components/Sharing/SharePopover.tsx | 2 +- .../Sidebar/components/SidebarButton.tsx | 2 +- app/components/Text.ts | 2 +- app/scenes/APITokenNew.tsx | 2 +- app/scenes/Collection/Empty.tsx | 2 +- app/scenes/CollectionEdit.tsx | 2 +- app/scenes/CollectionNew.tsx | 2 +- .../AddGroupsToCollection.tsx | 2 +- .../AddPeopleToCollection.tsx | 2 +- app/scenes/Document/components/Insights.tsx | 10 ++++----- app/scenes/DocumentDelete.tsx | 4 ++-- app/scenes/DocumentReparent.tsx | 2 +- app/scenes/GroupEdit.tsx | 2 +- app/scenes/GroupMembers/AddPeopleToGroup.tsx | 2 +- app/scenes/GroupMembers/GroupMembers.tsx | 4 ++-- app/scenes/GroupNew.tsx | 4 ++-- app/scenes/Invite.tsx | 4 ++-- app/scenes/Search/Search.tsx | 2 +- app/scenes/Settings/ApiKeys.tsx | 2 +- app/scenes/Settings/Details.tsx | 2 +- app/scenes/Settings/Export.tsx | 2 +- app/scenes/Settings/Features.tsx | 2 +- app/scenes/Settings/GoogleAnalytics.tsx | 2 +- app/scenes/Settings/Groups.tsx | 2 +- app/scenes/Settings/Import.tsx | 2 +- app/scenes/Settings/Members.tsx | 2 +- app/scenes/Settings/Notifications.tsx | 2 +- app/scenes/Settings/Preferences.tsx | 2 +- app/scenes/Settings/Profile.tsx | 2 +- app/scenes/Settings/Security.tsx | 4 ++-- app/scenes/Settings/Shares.tsx | 2 +- app/scenes/Settings/Templates.tsx | 2 +- app/scenes/Settings/Zapier.tsx | 2 +- .../Settings/components/HelpDisclosure.tsx | 2 +- .../Settings/components/ImportJSONDialog.tsx | 2 +- .../components/ImportMarkdownDialog.tsx | 2 +- .../components/ImportNotionDialog.tsx | 2 +- app/scenes/Settings/components/SettingRow.tsx | 6 +++++- app/scenes/TeamDelete.tsx | 4 ++-- app/scenes/TeamNew.tsx | 2 +- app/scenes/UserDelete.tsx | 4 ++-- plugins/slack/client/Settings.tsx | 4 ++-- .../slack/client/components/SlackListItem.tsx | 2 +- plugins/webhooks/client/Settings.tsx | 2 +- .../components/WebhookSubscriptionForm.tsx | 4 ++-- 56 files changed, 93 insertions(+), 97 deletions(-) diff --git a/app/components/CollectionDeleteDialog.tsx b/app/components/CollectionDeleteDialog.tsx index 78bcf9a98..7cab8ab97 100644 --- a/app/components/CollectionDeleteDialog.tsx +++ b/app/components/CollectionDeleteDialog.tsx @@ -41,7 +41,7 @@ function CollectionDeleteDialog({ collection, onSubmit }: Props) { danger > <> - + {team.defaultCollectionId === collection.id ? ( - + 0 ? ( <> {" "} - + then {" "} diff --git a/app/components/CommentDeleteDialog.tsx b/app/components/CommentDeleteDialog.tsx index 5e1e90285..eae67f317 100644 --- a/app/components/CommentDeleteDialog.tsx +++ b/app/components/CommentDeleteDialog.tsx @@ -33,7 +33,7 @@ function CommentDeleteDialog({ comment, onSubmit }: Props) { savingText={`${t("Deleting")}…`} danger > - + {hasChildComments ? ( Are you sure you want to permanently delete this entire comment diff --git a/app/components/DocumentExplorer.tsx b/app/components/DocumentExplorer.tsx index 5d6802f26..156f3c13d 100644 --- a/app/components/DocumentExplorer.tsx +++ b/app/components/DocumentExplorer.tsx @@ -389,7 +389,9 @@ function DocumentExplorer({ onSubmit, onSelect, items }: Props) { ) : ( - {t("No results found")}. + + {t("No results found")}. + )} diff --git a/app/components/DuplicateDialog.tsx b/app/components/DuplicateDialog.tsx index 534855c5d..2a6992ad6 100644 --- a/app/components/DuplicateDialog.tsx +++ b/app/components/DuplicateDialog.tsx @@ -5,6 +5,7 @@ import { DocumentValidation } from "@shared/validations"; import Document from "~/models/Document"; import ConfirmationDialog from "~/components/ConfirmationDialog"; import Input from "./Input"; +import Switch from "./Switch"; import Text from "./Text"; type Props = { @@ -55,17 +56,15 @@ function DuplicateDialog({ document, onSubmit }: Props) { defaultValue={defaultTitle} /> {document.publishedAt && !document.isTemplate && ( - + + + )} ); diff --git a/app/components/ErrorBoundary.tsx b/app/components/ErrorBoundary.tsx index ecf4766d7..0cc72ffff 100644 --- a/app/components/ErrorBoundary.tsx +++ b/app/components/ErrorBoundary.tsx @@ -82,7 +82,7 @@ class ErrorBoundary extends React.Component { )} - + Sorry, part of the application failed to load. This may be because it was updated since you opened the tab or because of a @@ -106,7 +106,7 @@ class ErrorBoundary extends React.Component { )} - + {collection && ( - +
- + {item.title} {item.description} @@ -137,7 +137,7 @@ function ExportDialog({ collection, onSubmit }: Props) { onChange={handleIncludeAttachmentsChange} />
- + {t("Include attachments")} diff --git a/app/components/Input.tsx b/app/components/Input.tsx index 7a06ec2ba..5e13ab264 100644 --- a/app/components/Input.tsx +++ b/app/components/Input.tsx @@ -245,9 +245,9 @@ function Input( {error && ( - + {error} - + )} @@ -260,8 +260,4 @@ export const TextWrapper = styled.span` margin-top: -16px; `; -export const StyledText = styled(Text)` - margin-bottom: 0; -`; - export default React.forwardRef(Input); diff --git a/app/components/InputSelect.tsx b/app/components/InputSelect.tsx index 858e4e641..271ca9907 100644 --- a/app/components/InputSelect.tsx +++ b/app/components/InputSelect.tsx @@ -42,6 +42,7 @@ export type Props = { labelHidden?: boolean; icon?: React.ReactNode; options: Option[]; + /** @deprecated Removing soon, do not use. */ note?: React.ReactNode; onChange?: (value: string | null) => void; }; @@ -206,7 +207,7 @@ const InputSelect = (props: Props) => { {note && ( - + {note} )} diff --git a/app/components/Modal.tsx b/app/components/Modal.tsx index 2af868f59..10f0118cb 100644 --- a/app/components/Modal.tsx +++ b/app/components/Modal.tsx @@ -89,11 +89,7 @@ const Modal: React.FC = ({ {children}
- {title && ( - - {title} - - )} + {title && {title}} @@ -127,7 +123,7 @@ const Modal: React.FC = ({ - {t("Back")} + {t("Back")} ) diff --git a/app/components/Notifications/NotificationListItem.tsx b/app/components/Notifications/NotificationListItem.tsx index bab0a78ea..8998a6671 100644 --- a/app/components/Notifications/NotificationListItem.tsx +++ b/app/components/Notifications/NotificationListItem.tsx @@ -45,15 +45,13 @@ function NotificationListItem({ notification, onNavigate }: Props) { - + {notification.actor?.name ?? t("Unknown")} {" "} {notification.eventText(t)}{" "} - - {notification.subject} - + {notification.subject} - +