feat: use line height preference in super editor (skip e2e) (#2045)

This commit is contained in:
Aman Harwara
2022-11-23 18:05:15 +05:30
committed by GitHub
parent 8755001f7e
commit 87cd31ae5d
62 changed files with 145 additions and 91 deletions

View File

@@ -30,6 +30,8 @@ import FloatingTextFormatToolbarPlugin from '../Lexical/Plugins/FloatingTextForm
import FloatingLinkEditorPlugin from '../Lexical/Plugins/FloatingLinkEditorPlugin'; import FloatingLinkEditorPlugin from '../Lexical/Plugins/FloatingLinkEditorPlugin';
import {truncateString} from './Utils'; import {truncateString} from './Utils';
import {SuperEditorContentId} from './Constants'; import {SuperEditorContentId} from './Constants';
import {classNames} from '@standardnotes/utils';
import {EditorLineHeight} from '@standardnotes/snjs';
type BlocksEditorProps = { type BlocksEditorProps = {
onChange: (value: string, preview: string) => void; onChange: (value: string, preview: string) => void;
@@ -38,6 +40,7 @@ type BlocksEditorProps = {
previewLength: number; previewLength: number;
spellcheck?: boolean; spellcheck?: boolean;
ignoreFirstChange?: boolean; ignoreFirstChange?: boolean;
lineHeight?: EditorLineHeight;
}; };
export const BlocksEditor: FunctionComponent<BlocksEditorProps> = ({ export const BlocksEditor: FunctionComponent<BlocksEditorProps> = ({
@@ -47,6 +50,7 @@ export const BlocksEditor: FunctionComponent<BlocksEditorProps> = ({
previewLength, previewLength,
spellcheck, spellcheck,
ignoreFirstChange = false, ignoreFirstChange = false,
lineHeight,
}) => { }) => {
const [didIgnoreFirstChange, setDidIgnoreFirstChange] = useState(false); const [didIgnoreFirstChange, setDidIgnoreFirstChange] = useState(false);
const handleChange = useCallback( const handleChange = useCallback(
@@ -98,7 +102,11 @@ export const BlocksEditor: FunctionComponent<BlocksEditorProps> = ({
<div className="editor" ref={onRef}> <div className="editor" ref={onRef}>
<ContentEditable <ContentEditable
id={SuperEditorContentId} id={SuperEditorContentId}
className={`ContentEditable__root overflow-y-auto ${className}`} className={classNames(
'ContentEditable__root overflow-y-auto',
lineHeight && `leading-${lineHeight.toLowerCase()}`,
className,
)}
spellCheck={spellcheck} spellCheck={spellcheck}
/> />
</div> </div>

View File

@@ -1,4 +1,5 @@
export * from './Utils/Utils' export * from './Utils/Utils'
export * from './Utils/ClassNames'
export * from './Uuid/UuidGenerator' export * from './Uuid/UuidGenerator'
export * from './Uuid/UuidMap' export * from './Uuid/UuidMap'
export * from './Uuid/Utils' export * from './Uuid/Utils'

View File

@@ -1,7 +1,7 @@
import { ForwardedRef, forwardRef, MouseEventHandler } from 'react' import { ForwardedRef, forwardRef, MouseEventHandler } from 'react'
import Icon from '@/Components/Icon/Icon' import Icon from '@/Components/Icon/Icon'
import { IconType } from '@standardnotes/snjs' import { IconType } from '@standardnotes/snjs'
import { classNames } from '@/Utils/ConcatenateClassNames' import { classNames } from '@standardnotes/utils'
type Props = { type Props = {
onClick: () => void onClick: () => void

View File

@@ -20,7 +20,7 @@ import { ViewControllerManager } from '@/Controllers/ViewControllerManager'
import { ChallengeModalValues } from './ChallengeModalValues' import { ChallengeModalValues } from './ChallengeModalValues'
import { InputValue } from './InputValue' import { InputValue } from './InputValue'
import { isMobileScreen } from '@/Utils' import { isMobileScreen } from '@/Utils'
import { classNames } from '@/Utils/ConcatenateClassNames' import { classNames } from '@standardnotes/utils'
type Props = { type Props = {
application: WebApplication application: WebApplication

View File

@@ -1,4 +1,4 @@
import { classNames } from '@/Utils/ConcatenateClassNames' import { classNames } from '@standardnotes/utils'
import { ComponentPropsWithoutRef } from 'react' import { ComponentPropsWithoutRef } from 'react'
import Icon from '../Icon/Icon' import Icon from '../Icon/Icon'

View File

@@ -6,7 +6,7 @@ import { CalendarMonth } from './CalendarMonth'
import { CalendarMonths } from './Constants' import { CalendarMonths } from './Constants'
import { insertMonths, insertMonthsWithTarget } from './CalendarUtilts' import { insertMonths, insertMonthsWithTarget } from './CalendarUtilts'
import { InfiniteScrollerInterface, InfinteScroller } from '../InfiniteScroller/InfiniteScroller' import { InfiniteScrollerInterface, InfinteScroller } from '../InfiniteScroller/InfiniteScroller'
import { classNames } from '@/Utils/ConcatenateClassNames' import { classNames } from '@standardnotes/utils'
import { LoggingDomain, log } from '@/Logging' import { LoggingDomain, log } from '@/Logging'
import { usePrevious } from './usePrevious' import { usePrevious } from './usePrevious'
import { isMobileScreen } from '@/Utils' import { isMobileScreen } from '@/Utils'

View File

@@ -11,7 +11,7 @@ import { SelectedItemsController } from '@/Controllers/SelectedItemsController'
import { NavigationController } from '@/Controllers/Navigation/NavigationController' import { NavigationController } from '@/Controllers/Navigation/NavigationController'
import { NotesController } from '@/Controllers/NotesController/NotesController' import { NotesController } from '@/Controllers/NotesController/NotesController'
import { ElementIds } from '@/Constants/ElementIDs' import { ElementIds } from '@/Constants/ElementIDs'
import { classNames } from '@/Utils/ConcatenateClassNames' import { classNames } from '@standardnotes/utils'
import { ContentType, SNTag } from '@standardnotes/snjs' import { ContentType, SNTag } from '@standardnotes/snjs'
type Props = { type Props = {

View File

@@ -30,7 +30,7 @@ import { useResponsiveAppPane } from '../ResponsivePane/ResponsivePaneProvider'
import { StreamingFileReader } from '@standardnotes/filepicker' import { StreamingFileReader } from '@standardnotes/filepicker'
import SearchBar from '../SearchBar/SearchBar' import SearchBar from '../SearchBar/SearchBar'
import { SearchOptionsController } from '@/Controllers/SearchOptionsController' import { SearchOptionsController } from '@/Controllers/SearchOptionsController'
import { classNames } from '@/Utils/ConcatenateClassNames' import { classNames } from '@standardnotes/utils'
import { MediaQueryBreakpoints, useMediaQuery } from '@/Hooks/useMediaQuery' import { MediaQueryBreakpoints, useMediaQuery } from '@/Hooks/useMediaQuery'
import { useFileDragNDrop } from '../FileDragNDropProvider/FileDragNDropProvider' import { useFileDragNDrop } from '../FileDragNDropProvider/FileDragNDropProvider'
import { LinkingController } from '@/Controllers/LinkingController' import { LinkingController } from '@/Controllers/LinkingController'

View File

@@ -9,7 +9,7 @@ import { DisplayableListItemProps } from './Types/DisplayableListItemProps'
import { useResponsiveAppPane } from '../ResponsivePane/ResponsivePaneProvider' import { useResponsiveAppPane } from '../ResponsivePane/ResponsivePaneProvider'
import { AppPaneId } from '../ResponsivePane/AppPaneMetadata' import { AppPaneId } from '../ResponsivePane/AppPaneMetadata'
import { useContextMenuEvent } from '@/Hooks/useContextMenuEvent' import { useContextMenuEvent } from '@/Hooks/useContextMenuEvent'
import { classNames } from '@/Utils/ConcatenateClassNames' import { classNames } from '@standardnotes/utils'
import { formatSizeToReadableString } from '@standardnotes/filepicker' import { formatSizeToReadableString } from '@standardnotes/filepicker'
import { getIconForFileType } from '@/Utils/Items/Icons/getIconForFileType' import { getIconForFileType } from '@/Utils/Items/Icons/getIconForFileType'
import { useApplication } from '../ApplicationView/ApplicationProvider' import { useApplication } from '../ApplicationView/ApplicationProvider'

View File

@@ -1,7 +1,7 @@
import { WebApplication } from '@/Application/Application' import { WebApplication } from '@/Application/Application'
import { memo, useCallback, useMemo, useRef, useState } from 'react' import { memo, useCallback, useMemo, useRef, useState } from 'react'
import Icon from '../../Icon/Icon' import Icon from '../../Icon/Icon'
import { classNames } from '@/Utils/ConcatenateClassNames' import { classNames } from '@standardnotes/utils'
import Popover from '@/Components/Popover/Popover' import Popover from '@/Components/Popover/Popover'
import DisplayOptionsMenu from './DisplayOptionsMenu' import DisplayOptionsMenu from './DisplayOptionsMenu'
import { NavigationMenuButton } from '@/Components/NavigationMenu/NavigationMenu' import { NavigationMenuButton } from '@/Components/NavigationMenu/NavigationMenu'

View File

@@ -20,7 +20,7 @@ import { DisplayOptionsMenuProps } from './DisplayOptionsMenuProps'
import { PrefDefaults } from '@/Constants/PrefDefaults' import { PrefDefaults } from '@/Constants/PrefDefaults'
import NewNotePreferences from './NewNotePreferences' import NewNotePreferences from './NewNotePreferences'
import { PreferenceMode } from './PreferenceMode' import { PreferenceMode } from './PreferenceMode'
import { classNames } from '@/Utils/ConcatenateClassNames' import { classNames } from '@standardnotes/utils'
import NoSubscriptionBanner from '@/Components/NoSubscriptionBanner/NoSubscriptionBanner' import NoSubscriptionBanner from '@/Components/NoSubscriptionBanner/NoSubscriptionBanner'
const DailyEntryModeEnabled = true const DailyEntryModeEnabled = true

View File

@@ -9,7 +9,7 @@ import { AnyTag } from '@/Controllers/Navigation/AnyTagType'
import { PreferenceMode } from './PreferenceMode' import { PreferenceMode } from './PreferenceMode'
import dayjs from 'dayjs' import dayjs from 'dayjs'
import { EditorOption, getDropdownItemsForAllEditors } from '@/Utils/DropdownItemsForEditors' import { EditorOption, getDropdownItemsForAllEditors } from '@/Utils/DropdownItemsForEditors'
import { classNames } from '@/Utils/ConcatenateClassNames' import { classNames } from '@standardnotes/utils'
import { NoteTitleFormatOptions } from './NoteTitleFormatOptions' import { NoteTitleFormatOptions } from './NoteTitleFormatOptions'
const PrefChangeDebounceTimeInMs = 25 const PrefChangeDebounceTimeInMs = 25

View File

@@ -13,7 +13,7 @@ import { useContextMenuEvent } from '@/Hooks/useContextMenuEvent'
import ListItemNotePreviewText from './ListItemNotePreviewText' import ListItemNotePreviewText from './ListItemNotePreviewText'
import { ListItemTitle } from './ListItemTitle' import { ListItemTitle } from './ListItemTitle'
import { log, LoggingDomain } from '@/Logging' import { log, LoggingDomain } from '@/Logging'
import { classNames } from '@/Utils/ConcatenateClassNames' import { classNames } from '@standardnotes/utils'
import { getIconAndTintForNoteType } from '@/Utils/Items/Icons/getIconAndTintForNoteType' import { getIconAndTintForNoteType } from '@/Utils/Items/Icons/getIconAndTintForNoteType'
const NoteListItem: FunctionComponent<DisplayableListItemProps<SNNote>> = ({ const NoteListItem: FunctionComponent<DisplayableListItemProps<SNNote>> = ({

View File

@@ -2,7 +2,7 @@ import { WebApplication } from '@/Application/Application'
import { FeaturesController } from '@/Controllers/FeaturesController' import { FeaturesController } from '@/Controllers/FeaturesController'
import { FilesController } from '@/Controllers/FilesController' import { FilesController } from '@/Controllers/FilesController'
import { usePremiumModal } from '@/Hooks/usePremiumModal' import { usePremiumModal } from '@/Hooks/usePremiumModal'
import { classNames } from '@/Utils/ConcatenateClassNames' import { classNames } from '@standardnotes/utils'
import { isHandlingFileDrag } from '@/Utils/DragTypeCheck' import { isHandlingFileDrag } from '@/Utils/DragTypeCheck'
import { StreamingFileReader } from '@standardnotes/filepicker' import { StreamingFileReader } from '@standardnotes/filepicker'
import { FileItem } from '@standardnotes/snjs' import { FileItem } from '@standardnotes/snjs'

View File

@@ -1,4 +1,4 @@
import { classNames } from '@/Utils/ConcatenateClassNames' import { classNames } from '@standardnotes/utils'
import { useRef } from 'react' import { useRef } from 'react'
import AccountMenu, { AccountMenuProps } from '../AccountMenu/AccountMenu' import AccountMenu, { AccountMenuProps } from '../AccountMenu/AccountMenu'
import Icon from '../Icon/Icon' import Icon from '../Icon/Icon'

View File

@@ -1,6 +1,6 @@
import { WebApplication } from '@/Application/Application' import { WebApplication } from '@/Application/Application'
import { QuickSettingsController } from '@/Controllers/QuickSettingsController' import { QuickSettingsController } from '@/Controllers/QuickSettingsController'
import { classNames } from '@/Utils/ConcatenateClassNames' import { classNames } from '@standardnotes/utils'
import { useRef } from 'react' import { useRef } from 'react'
import Icon from '../Icon/Icon' import Icon from '../Icon/Icon'
import Popover from '../Popover/Popover' import Popover from '../Popover/Popover'

View File

@@ -1,7 +1,7 @@
import { FunctionComponent } from 'react' import { FunctionComponent } from 'react'
import { VectorIconNameOrEmoji } from '@standardnotes/snjs' import { VectorIconNameOrEmoji } from '@standardnotes/snjs'
import { IconNameToSvgMapping } from './IconNameToSvgMapping' import { IconNameToSvgMapping } from './IconNameToSvgMapping'
import { classNames } from '@/Utils/ConcatenateClassNames' import { classNames } from '@standardnotes/utils'
import { LexicalIconName, LexicalIconNameToSvgMapping } from './LexicalIcons' import { LexicalIconName, LexicalIconNameToSvgMapping } from './LexicalIcons'
type Props = { type Props = {

View File

@@ -1,4 +1,4 @@
import { classNames } from '@/Utils/ConcatenateClassNames' import { classNames } from '@standardnotes/utils'
import { EmojiString, Platform, VectorIconNameOrEmoji } from '@standardnotes/snjs' import { EmojiString, Platform, VectorIconNameOrEmoji } from '@standardnotes/snjs'
import { FunctionComponent, useMemo, useRef, useState } from 'react' import { FunctionComponent, useMemo, useRef, useState } from 'react'
import Dropdown from '../Dropdown/Dropdown' import Dropdown from '../Dropdown/Dropdown'

View File

@@ -11,7 +11,7 @@ import {
import { Disclosure, DisclosurePanel } from '@reach/disclosure' import { Disclosure, DisclosurePanel } from '@reach/disclosure'
import { useCloseOnBlur } from '@/Hooks/useCloseOnBlur' import { useCloseOnBlur } from '@/Hooks/useCloseOnBlur'
import { observer } from 'mobx-react-lite' import { observer } from 'mobx-react-lite'
import { classNames } from '@/Utils/ConcatenateClassNames' import { classNames } from '@standardnotes/utils'
import { FOCUSABLE_BUT_NOT_TABBABLE } from '@/Constants/Constants' import { FOCUSABLE_BUT_NOT_TABBABLE } from '@/Constants/Constants'
import LinkedItemSearchResults from './LinkedItemSearchResults' import LinkedItemSearchResults from './LinkedItemSearchResults'
import { LinkingController } from '@/Controllers/LinkingController' import { LinkingController } from '@/Controllers/LinkingController'

View File

@@ -1,5 +1,5 @@
import { LinkingController } from '@/Controllers/LinkingController' import { LinkingController } from '@/Controllers/LinkingController'
import { classNames } from '@/Utils/ConcatenateClassNames' import { classNames } from '@standardnotes/utils'
import { KeyboardKey } from '@standardnotes/ui-services' import { KeyboardKey } from '@standardnotes/ui-services'
import { observer } from 'mobx-react-lite' import { observer } from 'mobx-react-lite'
import { KeyboardEventHandler, MouseEventHandler, useEffect, useRef, useState } from 'react' import { KeyboardEventHandler, MouseEventHandler, useEffect, useRef, useState } from 'react'

View File

@@ -5,7 +5,7 @@ import LinkedItemBubble from './LinkedItemBubble'
import { useCallback, useEffect, useMemo, useState } from 'react' import { useCallback, useEffect, useMemo, useState } from 'react'
import { useResponsiveAppPane } from '../ResponsivePane/ResponsivePaneProvider' import { useResponsiveAppPane } from '../ResponsivePane/ResponsivePaneProvider'
import { ElementIds } from '@/Constants/ElementIDs' import { ElementIds } from '@/Constants/ElementIDs'
import { classNames } from '@/Utils/ConcatenateClassNames' import { classNames } from '@standardnotes/utils'
import { ContentType } from '@standardnotes/snjs' import { ContentType } from '@standardnotes/snjs'
import { LinkableItem } from '@/Utils/Items/Search/LinkableItem' import { LinkableItem } from '@/Utils/Items/Search/LinkableItem'
import { ItemLink } from '@/Utils/Items/Search/ItemLink' import { ItemLink } from '@/Utils/Items/Search/ItemLink'

View File

@@ -1,5 +1,5 @@
import { splitQueryInString } from '@/Utils' import { splitQueryInString } from '@/Utils'
import { classNames } from '@/Utils/ConcatenateClassNames' import { classNames } from '@standardnotes/utils'
import { getTitleForLinkedTag } from '@/Utils/Items/Display/getTitleForLinkedTag' import { getTitleForLinkedTag } from '@/Utils/Items/Display/getTitleForLinkedTag'
import { getIconForItem } from '@/Utils/Items/Icons/getIconForItem' import { getIconForItem } from '@/Utils/Items/Icons/getIconForItem'
import { LinkableItem } from '@/Utils/Items/Search/LinkableItem' import { LinkableItem } from '@/Utils/Items/Search/LinkableItem'

View File

@@ -1,4 +1,4 @@
import { classNames } from '@/Utils/ConcatenateClassNames' import { classNames } from '@standardnotes/utils'
import Icon from '../Icon/Icon' import Icon from '../Icon/Icon'
type Props = { type Props = {

View File

@@ -2,7 +2,7 @@ import { FeatureName } from '@/Controllers/FeatureName'
import { FeaturesController } from '@/Controllers/FeaturesController' import { FeaturesController } from '@/Controllers/FeaturesController'
import { FilesController } from '@/Controllers/FilesController' import { FilesController } from '@/Controllers/FilesController'
import { LinkingController } from '@/Controllers/LinkingController' import { LinkingController } from '@/Controllers/LinkingController'
import { classNames } from '@/Utils/ConcatenateClassNames' import { classNames } from '@standardnotes/utils'
import { getLinkingSearchResults } from '@/Utils/Items/Search/getSearchResults' import { getLinkingSearchResults } from '@/Utils/Items/Search/getSearchResults'
import { observer } from 'mobx-react-lite' import { observer } from 'mobx-react-lite'
import { ChangeEventHandler, useEffect, useRef, useState } from 'react' import { ChangeEventHandler, useEffect, useRef, useState } from 'react'

View File

@@ -1,6 +1,6 @@
import { FilesController } from '@/Controllers/FilesController' import { FilesController } from '@/Controllers/FilesController'
import { LinkingController } from '@/Controllers/LinkingController' import { LinkingController } from '@/Controllers/LinkingController'
import { classNames } from '@/Utils/ConcatenateClassNames' import { classNames } from '@standardnotes/utils'
import { formatDateForContextMenu } from '@/Utils/DateUtils' import { formatDateForContextMenu } from '@/Utils/DateUtils'
import { getIconForItem } from '@/Utils/Items/Icons/getIconForItem' import { getIconForItem } from '@/Utils/Items/Icons/getIconForItem'
import { LinkableItem } from '@/Utils/Items/Search/LinkableItem' import { LinkableItem } from '@/Utils/Items/Search/LinkableItem'

View File

@@ -6,7 +6,7 @@ import { IconType } from '@standardnotes/snjs'
import { FOCUSABLE_BUT_NOT_TABBABLE } from '@/Constants/Constants' import { FOCUSABLE_BUT_NOT_TABBABLE } from '@/Constants/Constants'
import { MenuItemType } from './MenuItemType' import { MenuItemType } from './MenuItemType'
import RadioIndicator from '../Radio/RadioIndicator' import RadioIndicator from '../Radio/RadioIndicator'
import { classNames } from '@/Utils/ConcatenateClassNames' import { classNames } from '@standardnotes/utils'
import { PlatformedKeyboardShortcut } from '@standardnotes/ui-services' import { PlatformedKeyboardShortcut } from '@standardnotes/ui-services'
import { KeyboardShortcutIndicator } from '../KeyboardShortcutIndicator/KeyboardShortcutIndicator' import { KeyboardShortcutIndicator } from '../KeyboardShortcutIndicator/KeyboardShortcutIndicator'

View File

@@ -1,5 +1,5 @@
import { WebApplication } from '@/Application/Application' import { WebApplication } from '@/Application/Application'
import { classNames } from '@/Utils/ConcatenateClassNames' import { classNames } from '@standardnotes/utils'
import Button from '../Button/Button' import Button from '../Button/Button'
import Icon from '../Icon/Icon' import Icon from '../Icon/Icon'
import { PremiumFeatureIconClass, PremiumFeatureIconName } from '../Icon/PremiumFeatureIcon' import { PremiumFeatureIconClass, PremiumFeatureIconName } from '../Icon/PremiumFeatureIcon'

View File

@@ -1,6 +1,6 @@
import { ElementIds } from '@/Constants/ElementIDs' import { ElementIds } from '@/Constants/ElementIDs'
import { PrefDefaults } from '@/Constants/PrefDefaults' import { PrefDefaults } from '@/Constants/PrefDefaults'
import { classNames } from '@/Utils/ConcatenateClassNames' import { classNames } from '@standardnotes/utils'
import { ReactNode, useCallback, useState } from 'react' import { ReactNode, useCallback, useState } from 'react'
import { IconType, PrefKey } from '@standardnotes/snjs' import { IconType, PrefKey } from '@standardnotes/snjs'
import Icon from '../Icon/Icon' import Icon from '../Icon/Icon'

View File

@@ -10,7 +10,7 @@ import { PrefDefaults } from '@/Constants/PrefDefaults'
import { StringDeleteNote, STRING_DELETE_LOCKED_ATTEMPT, STRING_DELETE_PLACEHOLDER_ATTEMPT } from '@/Constants/Strings' import { StringDeleteNote, STRING_DELETE_LOCKED_ATTEMPT, STRING_DELETE_PLACEHOLDER_ATTEMPT } from '@/Constants/Strings'
import { log, LoggingDomain } from '@/Logging' import { log, LoggingDomain } from '@/Logging'
import { debounce, isDesktopApplication, isMobileScreen } from '@/Utils' import { debounce, isDesktopApplication, isMobileScreen } from '@/Utils'
import { classNames } from '@/Utils/ConcatenateClassNames' import { classNames } from '@standardnotes/utils'
import { import {
ApplicationEvent, ApplicationEvent,
ComponentArea, ComponentArea,

View File

@@ -5,7 +5,7 @@ import { PrefDefaults } from '@/Constants/PrefDefaults'
import { log, LoggingDomain } from '@/Logging' import { log, LoggingDomain } from '@/Logging'
import { Disposer } from '@/Types/Disposer' import { Disposer } from '@/Types/Disposer'
import { EditorEventSource } from '@/Types/EditorEventSource' import { EditorEventSource } from '@/Types/EditorEventSource'
import { classNames } from '@/Utils/ConcatenateClassNames' import { classNames } from '@standardnotes/utils'
import { getPlaintextFontSize } from '@/Utils/getPlaintextFontSize' import { getPlaintextFontSize } from '@/Utils/getPlaintextFontSize'
import { import {
ApplicationEvent, ApplicationEvent,

View File

@@ -1,4 +1,4 @@
import { classNames } from '@/Utils/ConcatenateClassNames' import { classNames } from '@standardnotes/utils'
export const PopoverClassNames = classNames( export const PopoverClassNames = classNames(
'z-dropdown-menu w-full', 'z-dropdown-menu w-full',

View File

@@ -1,6 +1,6 @@
import { WebApplication } from '@/Application/Application' import { WebApplication } from '@/Application/Application'
import { isPayloadSourceRetrieved } from '@standardnotes/snjs' import { ApplicationEvent, EditorLineHeight, isPayloadSourceRetrieved, PrefKey } from '@standardnotes/snjs'
import { FunctionComponent, useCallback, useEffect, useRef } from 'react' import { FunctionComponent, useCallback, useEffect, useRef, useState } from 'react'
import { BlocksEditor, BlocksEditorComposer } from '@standardnotes/blocks-editor' import { BlocksEditor, BlocksEditorComposer } from '@standardnotes/blocks-editor'
import { ItemSelectionPlugin } from './Plugins/ItemSelectionPlugin/ItemSelectionPlugin' import { ItemSelectionPlugin } from './Plugins/ItemSelectionPlugin/ItemSelectionPlugin'
import { FileNode } from './Plugins/EncryptedFilePlugin/Nodes/FileNode' import { FileNode } from './Plugins/EncryptedFilePlugin/Nodes/FileNode'
@@ -22,6 +22,7 @@ import {
ChangeEditorFunction, ChangeEditorFunction,
} from './Plugins/ChangeContentCallback/ChangeContentCallback' } from './Plugins/ChangeContentCallback/ChangeContentCallback'
import PasswordPlugin from './Plugins/PasswordPlugin/PasswordPlugin' import PasswordPlugin from './Plugins/PasswordPlugin/PasswordPlugin'
import { PrefDefaults } from '@/Constants/PrefDefaults'
const NotePreviewCharLimit = 160 const NotePreviewCharLimit = 160
@@ -44,6 +45,8 @@ export const SuperEditor: FunctionComponent<Props> = ({
const changeEditorFunction = useRef<ChangeEditorFunction>() const changeEditorFunction = useRef<ChangeEditorFunction>()
const ignoreNextChange = useRef(false) const ignoreNextChange = useRef(false)
const [lineHeight, setLineHeight] = useState<EditorLineHeight>(PrefDefaults[PrefKey.EditorLineHeight])
const handleChange = useCallback( const handleChange = useCallback(
async (value: string, preview: string) => { async (value: string, preview: string) => {
if (ignoreNextChange.current === true) { if (ignoreNextChange.current === true) {
@@ -90,6 +93,20 @@ export const SuperEditor: FunctionComponent<Props> = ({
return disposer return disposer
}, [controller, controller.item.uuid]) }, [controller, controller.item.uuid])
const reloadPreferences = useCallback(() => {
const lineHeight = application.getPreference(PrefKey.EditorLineHeight, PrefDefaults[PrefKey.EditorLineHeight])
setLineHeight(lineHeight)
}, [application])
useEffect(() => {
reloadPreferences()
return application.addSingleEventObserver(ApplicationEvent.PreferencesChanged, async () => {
reloadPreferences()
})
}, [reloadPreferences, application])
return ( return (
<div className="relative h-full w-full"> <div className="relative h-full w-full">
<ErrorBoundary> <ErrorBoundary>
@@ -106,6 +123,7 @@ export const SuperEditor: FunctionComponent<Props> = ({
className="relative h-full resize-none px-6 py-4 text-base focus:shadow-none focus:outline-none" className="relative h-full resize-none px-6 py-4 text-base focus:shadow-none focus:outline-none"
previewLength={NotePreviewCharLimit} previewLength={NotePreviewCharLimit}
spellcheck={spellcheck} spellcheck={spellcheck}
lineHeight={lineHeight}
> >
<ItemSelectionPlugin currentNote={note.current} /> <ItemSelectionPlugin currentNote={note.current} />
<FilePlugin /> <FilePlugin />

View File

@@ -105,7 +105,7 @@ export const SuperNoteImporter: FunctionComponent<Props> = ({ note, application,
<BlocksEditor <BlocksEditor
onChange={handleChange} onChange={handleChange}
ignoreFirstChange={false} ignoreFirstChange={false}
className="relative relative resize-none text-base focus:shadow-none focus:outline-none" className="relative resize-none text-base focus:shadow-none focus:outline-none"
previewLength={NotePreviewCharLimit} previewLength={NotePreviewCharLimit}
spellcheck={note.spellcheck} spellcheck={note.spellcheck}
> >

View File

@@ -24,7 +24,7 @@ import { getNoteBlob, getNoteFileName } from '@/Utils/NoteExportUtils'
import { shareSelectedNotes } from '@/NativeMobileWeb/ShareSelectedNotes' import { shareSelectedNotes } from '@/NativeMobileWeb/ShareSelectedNotes'
import { downloadSelectedNotesOnAndroid } from '@/NativeMobileWeb/DownloadSelectedNotesOnAndroid' import { downloadSelectedNotesOnAndroid } from '@/NativeMobileWeb/DownloadSelectedNotesOnAndroid'
import ProtectedUnauthorizedLabel from '../ProtectedItemOverlay/ProtectedUnauthorizedLabel' import ProtectedUnauthorizedLabel from '../ProtectedItemOverlay/ProtectedUnauthorizedLabel'
import { classNames } from '@/Utils/ConcatenateClassNames' import { classNames } from '@standardnotes/utils'
import { MenuItemIconSize } from '@/Constants/TailwindClassNames' import { MenuItemIconSize } from '@/Constants/TailwindClassNames'
import { KeyboardShortcutIndicator } from '../KeyboardShortcutIndicator/KeyboardShortcutIndicator' import { KeyboardShortcutIndicator } from '../KeyboardShortcutIndicator/KeyboardShortcutIndicator'

View File

@@ -1,6 +1,6 @@
import { Component, createRef, MouseEventHandler } from 'react' import { Component, createRef, MouseEventHandler } from 'react'
import { debounce } from '@/Utils' import { debounce } from '@/Utils'
import { classNames } from '@/Utils/ConcatenateClassNames' import { classNames } from '@standardnotes/utils'
export type ResizeFinishCallback = ( export type ResizeFinishCallback = (
lastWidth: number, lastWidth: number,

View File

@@ -3,7 +3,7 @@ import { observer } from 'mobx-react-lite'
import { FunctionComponent, useCallback, useMemo } from 'react' import { FunctionComponent, useCallback, useMemo } from 'react'
import Icon from '@/Components/Icon/Icon' import Icon from '@/Components/Icon/Icon'
import { NotesController } from '@/Controllers/NotesController/NotesController' import { NotesController } from '@/Controllers/NotesController/NotesController'
import { classNames } from '@/Utils/ConcatenateClassNames' import { classNames } from '@standardnotes/utils'
import { keyboardStringForShortcut, PIN_NOTE_COMMAND } from '@standardnotes/ui-services' import { keyboardStringForShortcut, PIN_NOTE_COMMAND } from '@standardnotes/ui-services'
import { useCommandService } from '../ApplicationView/CommandProvider' import { useCommandService } from '../ApplicationView/CommandProvider'

View File

@@ -1,6 +1,6 @@
import { useDocumentRect } from '@/Hooks/useDocumentRect' import { useDocumentRect } from '@/Hooks/useDocumentRect'
import { useAutoElementRect } from '@/Hooks/useElementRect' import { useAutoElementRect } from '@/Hooks/useElementRect'
import { classNames } from '@/Utils/ConcatenateClassNames' import { classNames } from '@standardnotes/utils'
import { useCallback, useLayoutEffect, useState } from 'react' import { useCallback, useLayoutEffect, useState } from 'react'
import Icon from '../Icon/Icon' import Icon from '../Icon/Icon'
import Portal from '../Portal/Portal' import Portal from '../Portal/Portal'

View File

@@ -0,0 +1,57 @@
import { WebApplication } from '@/Application/Application'
import Dropdown from '@/Components/Dropdown/Dropdown'
import { PrefDefaults } from '@/Constants/PrefDefaults'
import { EditorLineHeight, PrefKey } from '@standardnotes/snjs'
import { useMemo, useState } from 'react'
import { Subtitle, Title, Text } from '../../PreferencesComponents/Content'
import PreferencesGroup from '../../PreferencesComponents/PreferencesGroup'
import PreferencesSegment from '../../PreferencesComponents/PreferencesSegment'
type Props = {
application: WebApplication
}
const EditorDefaults = ({ application }: Props) => {
const [lineHeight, setLineHeight] = useState(() =>
application.getPreference(PrefKey.EditorLineHeight, PrefDefaults[PrefKey.EditorLineHeight]),
)
const handleLineHeightChange = (value: string) => {
setLineHeight(value as EditorLineHeight)
void application.setPreference(PrefKey.EditorLineHeight, value as EditorLineHeight)
}
const lineHeightDropdownOptions = useMemo(
() =>
Object.values(EditorLineHeight).map((lineHeight) => ({
label: lineHeight,
value: lineHeight,
})),
[],
)
return (
<PreferencesGroup>
<PreferencesSegment>
<Title>Editor Defaults</Title>
<div>
<div>
<Subtitle>Line height</Subtitle>
<Text>Sets the line height (leading) in plaintext & Super notes</Text>
<div className="mt-2">
<Dropdown
id="def-line-height"
label="Select the line height for plaintext notes"
items={lineHeightDropdownOptions}
value={lineHeight}
onChange={handleLineHeightChange}
/>
</div>
</div>
</div>
</PreferencesSegment>
</PreferencesGroup>
)
}
export default EditorDefaults

View File

@@ -11,6 +11,7 @@ import PreferencesPane from '../../PreferencesComponents/PreferencesPane'
import PlaintextDefaults from './PlaintextDefaults' import PlaintextDefaults from './PlaintextDefaults'
import Persistence from './Persistence' import Persistence from './Persistence'
import SmartViews from './SmartViews/SmartViews' import SmartViews from './SmartViews/SmartViews'
import EditorDefaults from './EditorDefaults'
type Props = { type Props = {
viewControllerManager: ViewControllerManager viewControllerManager: ViewControllerManager
@@ -22,6 +23,7 @@ const General: FunctionComponent<Props> = ({ viewControllerManager, application,
<PreferencesPane> <PreferencesPane>
<Persistence application={application} /> <Persistence application={application} />
<PlaintextDefaults application={application} /> <PlaintextDefaults application={application} />
<EditorDefaults application={application} />
<Defaults application={application} /> <Defaults application={application} />
<Tools application={application} /> <Tools application={application} />
<SmartViews application={application} featuresController={viewControllerManager.featuresController} /> <SmartViews application={application} featuresController={viewControllerManager.featuresController} />

View File

@@ -3,7 +3,7 @@ import Dropdown from '@/Components/Dropdown/Dropdown'
import HorizontalSeparator from '@/Components/Shared/HorizontalSeparator' import HorizontalSeparator from '@/Components/Shared/HorizontalSeparator'
import Switch from '@/Components/Switch/Switch' import Switch from '@/Components/Switch/Switch'
import { PrefDefaults } from '@/Constants/PrefDefaults' import { PrefDefaults } from '@/Constants/PrefDefaults'
import { EditorFontSize, EditorLineHeight, PrefKey } from '@standardnotes/snjs' import { EditorFontSize, PrefKey } from '@standardnotes/snjs'
import { useMemo, useState } from 'react' import { useMemo, useState } from 'react'
import { Subtitle, Title, Text } from '../../PreferencesComponents/Content' import { Subtitle, Title, Text } from '../../PreferencesComponents/Content'
import PreferencesGroup from '../../PreferencesComponents/PreferencesGroup' import PreferencesGroup from '../../PreferencesComponents/PreferencesGroup'
@@ -23,24 +23,6 @@ const PlaintextDefaults = ({ application }: Props) => {
application.setPreference(PrefKey.EditorMonospaceEnabled, !monospaceFont).catch(console.error) application.setPreference(PrefKey.EditorMonospaceEnabled, !monospaceFont).catch(console.error)
} }
const [lineHeight, setLineHeight] = useState(() =>
application.getPreference(PrefKey.EditorLineHeight, PrefDefaults[PrefKey.EditorLineHeight]),
)
const handleLineHeightChange = (value: string) => {
setLineHeight(value as EditorLineHeight)
void application.setPreference(PrefKey.EditorLineHeight, value as EditorLineHeight)
}
const lineHeightDropdownOptions = useMemo(
() =>
Object.values(EditorLineHeight).map((lineHeight) => ({
label: lineHeight,
value: lineHeight,
})),
[],
)
const [fontSize, setFontSize] = useState(() => const [fontSize, setFontSize] = useState(() =>
application.getPreference(PrefKey.EditorFontSize, PrefDefaults[PrefKey.EditorFontSize]), application.getPreference(PrefKey.EditorFontSize, PrefDefaults[PrefKey.EditorFontSize]),
) )
@@ -72,20 +54,6 @@ const PlaintextDefaults = ({ application }: Props) => {
<Switch onChange={toggleMonospaceFont} checked={monospaceFont} /> <Switch onChange={toggleMonospaceFont} checked={monospaceFont} />
</div> </div>
<HorizontalSeparator classes="my-4" /> <HorizontalSeparator classes="my-4" />
<div>
<Subtitle>Line height</Subtitle>
<Text>Sets the line height (leading) in plaintext notes</Text>
<div className="mt-2">
<Dropdown
id="def-line-height"
label="Select the line height for plaintext notes"
items={lineHeightDropdownOptions}
value={lineHeight}
onChange={handleLineHeightChange}
/>
</div>
</div>
<HorizontalSeparator classes="my-4" />
<div> <div>
<Subtitle>Font size</Subtitle> <Subtitle>Font size</Subtitle>
<Text>Sets the font size in plaintext notes</Text> <Text>Sets the font size in plaintext notes</Text>

View File

@@ -7,7 +7,7 @@ import PreferencesSegment from '@/Components/Preferences/PreferencesComponents/P
import { Title } from '@/Components/Preferences/PreferencesComponents/Content' import { Title } from '@/Components/Preferences/PreferencesComponents/Content'
import PreferencesGroup from '@/Components/Preferences/PreferencesComponents/PreferencesGroup' import PreferencesGroup from '@/Components/Preferences/PreferencesComponents/PreferencesGroup'
import Button from '@/Components/Button/Button' import Button from '@/Components/Button/Button'
import { classNames } from '@/Utils/ConcatenateClassNames' import { classNames } from '@standardnotes/utils'
type Props = { type Props = {
application: WebApplication application: WebApplication

View File

@@ -20,7 +20,7 @@ import Button from '@/Components/Button/Button'
import PreferencesGroup from '../../PreferencesComponents/PreferencesGroup' import PreferencesGroup from '../../PreferencesComponents/PreferencesGroup'
import PreferencesSegment from '../../PreferencesComponents/PreferencesSegment' import PreferencesSegment from '../../PreferencesComponents/PreferencesSegment'
import DecoratedPasswordInput from '@/Components/Input/DecoratedPasswordInput' import DecoratedPasswordInput from '@/Components/Input/DecoratedPasswordInput'
import { classNames } from '@/Utils/ConcatenateClassNames' import { classNames } from '@standardnotes/utils'
type Props = { type Props = {
application: WebApplication application: WebApplication

View File

@@ -1,4 +1,4 @@
import { classNames } from '@/Utils/ConcatenateClassNames' import { classNames } from '@standardnotes/utils'
import { FunctionComponent, MouseEventHandler, ReactNode } from 'react' import { FunctionComponent, MouseEventHandler, ReactNode } from 'react'
type Props = { type Props = {

View File

@@ -6,7 +6,7 @@ import PreferencesCanvas from './PreferencesCanvas'
import { PreferencesProps } from './PreferencesProps' import { PreferencesProps } from './PreferencesProps'
import { isIOS } from '@/Utils' import { isIOS } from '@/Utils'
import { useDisableBodyScrollOnMobile } from '@/Hooks/useDisableBodyScrollOnMobile' import { useDisableBodyScrollOnMobile } from '@/Hooks/useDisableBodyScrollOnMobile'
import { classNames } from '@/Utils/ConcatenateClassNames' import { classNames } from '@standardnotes/utils'
import { MediaQueryBreakpoints, useMediaQuery } from '@/Hooks/useMediaQuery' import { MediaQueryBreakpoints, useMediaQuery } from '@/Hooks/useMediaQuery'
import { useAndroidBackHandler } from '@/NativeMobileWeb/useAndroidBackHandler' import { useAndroidBackHandler } from '@/NativeMobileWeb/useAndroidBackHandler'
import { ESCAPE_COMMAND } from '@standardnotes/ui-services' import { ESCAPE_COMMAND } from '@standardnotes/ui-services'

View File

@@ -2,7 +2,7 @@ import { WebApplication } from '@/Application/Application'
import { FunctionComponent, MouseEventHandler, useCallback, useMemo } from 'react' import { FunctionComponent, MouseEventHandler, useCallback, useMemo } from 'react'
import Switch from '@/Components/Switch/Switch' import Switch from '@/Components/Switch/Switch'
import { isMobileScreen } from '@/Utils' import { isMobileScreen } from '@/Utils'
import { classNames } from '@/Utils/ConcatenateClassNames' import { classNames } from '@standardnotes/utils'
import { TOGGLE_FOCUS_MODE_COMMAND } from '@standardnotes/ui-services' import { TOGGLE_FOCUS_MODE_COMMAND } from '@standardnotes/ui-services'
import { KeyboardShortcutIndicator } from '../KeyboardShortcutIndicator/KeyboardShortcutIndicator' import { KeyboardShortcutIndicator } from '../KeyboardShortcutIndicator/KeyboardShortcutIndicator'

View File

@@ -21,7 +21,7 @@ import HorizontalSeparator from '../Shared/HorizontalSeparator'
import { QuickSettingsController } from '@/Controllers/QuickSettingsController' import { QuickSettingsController } from '@/Controllers/QuickSettingsController'
import PanelSettingsSection from './PanelSettingsSection' import PanelSettingsSection from './PanelSettingsSection'
import { PrefDefaults } from '@/Constants/PrefDefaults' import { PrefDefaults } from '@/Constants/PrefDefaults'
import { classNames } from '@/Utils/ConcatenateClassNames' import { classNames } from '@standardnotes/utils'
export const focusModeAnimationDuration = 1255 export const focusModeAnimationDuration = 1255

View File

@@ -8,7 +8,7 @@ import { ThemeItem } from './ThemeItem'
import RadioIndicator from '../Radio/RadioIndicator' import RadioIndicator from '../Radio/RadioIndicator'
import { PremiumFeatureIconClass, PremiumFeatureIconName } from '../Icon/PremiumFeatureIcon' import { PremiumFeatureIconClass, PremiumFeatureIconName } from '../Icon/PremiumFeatureIcon'
import { isMobileScreen } from '@/Utils' import { isMobileScreen } from '@/Utils'
import { classNames } from '@/Utils/ConcatenateClassNames' import { classNames } from '@standardnotes/utils'
type Props = { type Props = {
item: ThemeItem item: ThemeItem

View File

@@ -1,4 +1,4 @@
import { classNames } from '@/Utils/ConcatenateClassNames' import { classNames } from '@standardnotes/utils'
import { ComponentPropsWithoutRef } from 'react' import { ComponentPropsWithoutRef } from 'react'
import RadioIndicator from './RadioIndicator' import RadioIndicator from './RadioIndicator'

View File

@@ -1,6 +1,6 @@
import { useMemo, ReactNode } from 'react' import { useMemo, ReactNode } from 'react'
import { AppPaneId } from './AppPaneMetadata' import { AppPaneId } from './AppPaneMetadata'
import { classNames } from '@/Utils/ConcatenateClassNames' import { classNames } from '@standardnotes/utils'
import { useResponsiveAppPane } from './ResponsivePaneProvider' import { useResponsiveAppPane } from './ResponsivePaneProvider'
type Props = { type Props = {

View File

@@ -1,5 +1,5 @@
import { getPlatformString } from '@/Utils' import { getPlatformString } from '@/Utils'
import { classNames } from '@/Utils/ConcatenateClassNames' import { classNames } from '@standardnotes/utils'
import { DialogOverlay, DialogContent } from '@reach/dialog' import { DialogOverlay, DialogContent } from '@reach/dialog'
import { ReactNode } from 'react' import { ReactNode } from 'react'

View File

@@ -6,7 +6,7 @@ import HistoryModalFooter from './HistoryModalFooter'
import HistoryModalContentPane from './HistoryModalContentPane' import HistoryModalContentPane from './HistoryModalContentPane'
import { NoteHistoryController } from '@/Controllers/NoteHistory/NoteHistoryController' import { NoteHistoryController } from '@/Controllers/NoteHistory/NoteHistoryController'
import Icon from '../Icon/Icon' import Icon from '../Icon/Icon'
import { classNames } from '@/Utils/ConcatenateClassNames' import { classNames } from '@standardnotes/utils'
import { HistoryModalMobileTab } from './utils' import { HistoryModalMobileTab } from './utils'
const HistoryModalDialogContent = ({ const HistoryModalDialogContent = ({

View File

@@ -1,4 +1,4 @@
import { classNames } from '@/Utils/ConcatenateClassNames' import { classNames } from '@standardnotes/utils'
import { addToast, ToastType } from '@standardnotes/toast' import { addToast, ToastType } from '@standardnotes/toast'
import { useRef, useState } from 'react' import { useRef, useState } from 'react'
import Icon from '../Icon/Icon' import Icon from '../Icon/Icon'

View File

@@ -1,6 +1,6 @@
import { useRef, ReactNode } from 'react' import { useRef, ReactNode } from 'react'
import { AlertDialogContent, AlertDialogOverlay } from '@reach/alert-dialog' import { AlertDialogContent, AlertDialogOverlay } from '@reach/alert-dialog'
import { classNames } from '@/Utils/ConcatenateClassNames' import { classNames } from '@standardnotes/utils'
type Props = { type Props = {
children: ReactNode children: ReactNode

View File

@@ -1,4 +1,4 @@
import { classNames } from '@/Utils/ConcatenateClassNames' import { classNames } from '@standardnotes/utils'
import { Fragment, FunctionComponent, ReactNode } from 'react' import { Fragment, FunctionComponent, ReactNode } from 'react'
type Props = { type Props = {

View File

@@ -1,7 +1,7 @@
import { FunctionComponent, ReactNode, useEffect } from 'react' import { FunctionComponent, ReactNode, useEffect } from 'react'
import { AlertDialogLabel } from '@reach/alert-dialog' import { AlertDialogLabel } from '@reach/alert-dialog'
import Icon from '@/Components/Icon/Icon' import Icon from '@/Components/Icon/Icon'
import { classNames } from '@/Utils/ConcatenateClassNames' import { classNames } from '@standardnotes/utils'
import { useAndroidBackHandler } from '@/NativeMobileWeb/useAndroidBackHandler' import { useAndroidBackHandler } from '@/NativeMobileWeb/useAndroidBackHandler'
type Props = { type Props = {

View File

@@ -17,7 +17,7 @@ import { useTabState } from '../Tabs/useTabState'
import TabsContainer from '../Tabs/TabsContainer' import TabsContainer from '../Tabs/TabsContainer'
import CopyableCodeBlock from '../Shared/CopyableCodeBlock' import CopyableCodeBlock from '../Shared/CopyableCodeBlock'
import { Disclosure, DisclosureButton, DisclosurePanel } from '@reach/disclosure' import { Disclosure, DisclosureButton, DisclosurePanel } from '@reach/disclosure'
import { classNames } from '@/Utils/ConcatenateClassNames' import { classNames } from '@standardnotes/utils'
type Props = { type Props = {
controller: AddSmartViewModalController controller: AddSmartViewModalController

View File

@@ -1,4 +1,4 @@
import { classNames } from '@/Utils/ConcatenateClassNames' import { classNames } from '@standardnotes/utils'
import { ComponentPropsWithoutRef } from 'react' import { ComponentPropsWithoutRef } from 'react'
import { useTabStateContext } from './useTabState' import { useTabStateContext } from './useTabState'

View File

@@ -8,7 +8,7 @@ import { FunctionComponent, useCallback, useEffect, useMemo, useState } from 're
import PanelResizer, { PanelSide, ResizeFinishCallback, PanelResizeType } from '@/Components/PanelResizer/PanelResizer' import PanelResizer, { PanelSide, ResizeFinishCallback, PanelResizeType } from '@/Components/PanelResizer/PanelResizer'
import ResponsivePaneContent from '@/Components/ResponsivePane/ResponsivePaneContent' import ResponsivePaneContent from '@/Components/ResponsivePane/ResponsivePaneContent'
import { AppPaneId } from '@/Components/ResponsivePane/AppPaneMetadata' import { AppPaneId } from '@/Components/ResponsivePane/AppPaneMetadata'
import { classNames } from '@/Utils/ConcatenateClassNames' import { classNames } from '@standardnotes/utils'
import { useResponsiveAppPane } from '../ResponsivePane/ResponsivePaneProvider' import { useResponsiveAppPane } from '../ResponsivePane/ResponsivePaneProvider'
import UpgradeNow from '../Footer/UpgradeNow' import UpgradeNow from '../Footer/UpgradeNow'
import RoundIconButton from '../Button/RoundIconButton' import RoundIconButton from '../Button/RoundIconButton'

View File

@@ -1,6 +1,6 @@
import Icon from '@/Components/Icon/Icon' import Icon from '@/Components/Icon/Icon'
import { NavigationController } from '@/Controllers/Navigation/NavigationController' import { NavigationController } from '@/Controllers/Navigation/NavigationController'
import { classNames } from '@/Utils/ConcatenateClassNames' import { classNames } from '@standardnotes/utils'
import { observer } from 'mobx-react-lite' import { observer } from 'mobx-react-lite'
import { DragEventHandler, FunctionComponent, useCallback, useState } from 'react' import { DragEventHandler, FunctionComponent, useCallback, useState } from 'react'
import { TagDragDataFormat } from './DragNDrop' import { TagDragDataFormat } from './DragNDrop'

View File

@@ -15,7 +15,7 @@ import {
} from 'react' } from 'react'
import { AppPaneId } from '../ResponsivePane/AppPaneMetadata' import { AppPaneId } from '../ResponsivePane/AppPaneMetadata'
import { useResponsiveAppPane } from '../ResponsivePane/ResponsivePaneProvider' import { useResponsiveAppPane } from '../ResponsivePane/ResponsivePaneProvider'
import { classNames } from '@/Utils/ConcatenateClassNames' import { classNames } from '@standardnotes/utils'
import { FOCUSABLE_BUT_NOT_TABBABLE } from '@/Constants/Constants' import { FOCUSABLE_BUT_NOT_TABBABLE } from '@/Constants/Constants'
type Props = { type Props = {

View File

@@ -21,7 +21,7 @@ import {
} from 'react' } from 'react'
import { useResponsiveAppPane } from '../ResponsivePane/ResponsivePaneProvider' import { useResponsiveAppPane } from '../ResponsivePane/ResponsivePaneProvider'
import { AppPaneId } from '../ResponsivePane/AppPaneMetadata' import { AppPaneId } from '../ResponsivePane/AppPaneMetadata'
import { classNames } from '@/Utils/ConcatenateClassNames' import { classNames } from '@standardnotes/utils'
import { useFileDragNDrop } from '../FileDragNDropProvider/FileDragNDropProvider' import { useFileDragNDrop } from '../FileDragNDropProvider/FileDragNDropProvider'
import { LinkingController } from '@/Controllers/LinkingController' import { LinkingController } from '@/Controllers/LinkingController'
import { TagListSectionType } from './TagListSection' import { TagListSectionType } from './TagListSection'