A fully open source & end-to-end encrypted note taking alternative to Evernote.
TypeScript asp-net-coredotnet-coreelectronfosshacktoberfestnote-managmentnote-takingnote-taking-appnotebooknotesnotes-appopen-sourceopensourceprivacyproductivityreactreact-nativereactjsself-hosted
web: fix ui for longer language strings
Abdullah Atta29cb444746a2
diff --git a/apps/web/src/components/auth-container/index.jsx b/apps/web/src/components/auth-container/index.jsxindex 45ae1086c..c38662a1a 100644--- a/apps/web/src/components/auth-container/index.jsx+++ b/apps/web/src/components/auth-container/index.jsx@@ -208,18 +208,20 @@ function AuthContainer(props) {{version.status === "fulfilled" &&version.value.instance !== "default" ? (<>- Using{" "}- {version.value.instance + ` (v${version.value.version})`}+ {strings.usingInstance(+ version.value.instance,+ version.value.version+ )}</>) : (- <>Using official Notesnook instance.</>+ <>{strings.usingOfficialInstance()}</>)}</Text><Buttonvariant="anchor"onClick={() => SettingsDialog.show({ activeSection: "servers" })}>- Configure+ {strings.configure()}</Button></Flex></Flex>diff --git a/apps/web/src/components/dialog/index.tsx b/apps/web/src/components/dialog/index.tsxindex a3c8f6c46..1c4a48fcd 100644--- a/apps/web/src/components/dialog/index.tsx+++ b/apps/web/src/components/dialog/index.tsx@@ -137,7 +137,9 @@ function BaseDialog(props: React.PropsWithChildren<DialogProps>) {sx={{fontSize: "subheading",textAlign: props.textAlignment || "left",- color: "paragraph"+ color: "paragraph",+ overflowWrap: "anywhere",+ wordSpacing: "wrap"}}>{props.title}@@ -148,7 +150,9 @@ function BaseDialog(props: React.PropsWithChildren<DialogProps>) {variant="body"sx={{textAlign: props.textAlignment || "left",- color: "var(--paragraph-secondary)"+ color: "var(--paragraph-secondary)",+ overflowWrap: "anywhere",+ wordSpacing: "wrap"}}>{props.description}@@ -205,6 +209,12 @@ export function DialogButton(props: DialogButtonProps) {variant="dialog"disabled={props.disabled}onClick={props.disabled ? undefined : props.onClick}+ sx={{+ maxWidth: "100%",+ textOverflow: "ellipsis",+ overflow: "hidden",+ whiteSpace: "nowrap"+ }}>{props.loading ? <Loading size={16} color="accent" /> : props.text}</Button>diff --git a/apps/web/src/components/properties/index.tsx b/apps/web/src/components/properties/index.tsxindex 3c17d929e..23ed47c04 100644--- a/apps/web/src/components/properties/index.tsx+++ b/apps/web/src/components/properties/index.tsx@@ -189,16 +189,24 @@ function EditorProperties(props: EditorPropertiesProps) {sx={{borderBottom: "1px solid var(--separator)",alignItems: "center",- justifyContent: "space-between"+ justifyContent: "space-between",+ gap: 1}}>- <Text variant="subBody" sx={{ fontSize: "body" }}>+ <Text+ variant="subBody"+ sx={{+ fontSize: "body",+ overflow: "hidden",+ textOverflow: "ellipsis"+ }}+ >{item.label}</Text><TextclassName="selectable"variant="subBody"- sx={{ fontSize: "body" }}+ sx={{ fontSize: "body", flexShrink: 0 }}>{item.value(session.note[item.key])}</Text>diff --git a/apps/web/src/components/properties/toggle.tsx b/apps/web/src/components/properties/toggle.tsxindex e16eb81ff..ee5179fa2 100644--- a/apps/web/src/components/properties/toggle.tsx+++ b/apps/web/src/components/properties/toggle.tsx@@ -39,22 +39,36 @@ function Toggle(props: ToggleProps) {cursor: "pointer",alignItems: "center",justifyContent: "space-between",+ gap: 1,"& label": { width: "auto", flexShrink: 0 }}}data-test-id={props.testId}onClick={() => onToggle(!isOn)}>- <Text- variant="body"- sx={{ alignItems: "center", color: "paragraph", display: "flex" }}+ <Flex+ sx={{+ alignItems: "center",++ display: "flex"+ }}data-test-id={`toggle-state-${isOn ? "on" : "off"}`}><ToggleIcon size={13} sx={{ flexShrink: 0, mr: 1 }} />- {label}- </Text>+ <Text+ variant="body"+ sx={{+ color: "paragraph",+ overflow: "hidden",+ textOverflow: "ellipsis",+ whiteSpace: "nowrap"+ }}+ >+ {label}+ </Text>+ </Flex><Switch- sx={{ m: 0, bg: isOn ? "accent" : "icon-secondary" }}+ sx={{ m: 0, bg: isOn ? "accent" : "icon-secondary", flexShrink: 0 }}checked={isOn}onClick={(e) => e.stopPropagation()}/>diff --git a/apps/web/src/dialogs/settings/components/customize-toolbar.tsx b/apps/web/src/dialogs/settings/components/customize-toolbar.tsxindex ebca58951..50b95face 100644--- a/apps/web/src/dialogs/settings/components/customize-toolbar.tsx+++ b/apps/web/src/dialogs/settings/components/customize-toolbar.tsx@@ -119,7 +119,10 @@ export function CustomizeToolbar() {<Labelkey={preset.id}variant="text.body"- sx={{ alignItems: "center", width: "auto" }}+ sx={{+ alignItems: "center",+ width: "auto"+ }}><inputid={preset.id.toString()}@@ -143,7 +146,15 @@ export function CustomizeToolbar() {setCurrentPreset(getPreset(value as PresetId));}}/>- <span style={{ marginLeft: 5 }}>{preset.title}</span>+ <span+ style={{+ marginLeft: 5,+ overflow: "hidden",+ textOverflow: "ellipsis"+ }}+ >+ {preset.title}+ </span>{preset.id === "custom" && !isUserPremium() ? (<Pro color="accent" size={18} sx={{ ml: 1 }} />) : null}diff --git a/apps/web/src/dialogs/settings/index.tsx b/apps/web/src/dialogs/settings/index.tsxindex a1b61fd3e..2c1251604 100644--- a/apps/web/src/dialogs/settings/index.tsx+++ b/apps/web/src/dialogs/settings/index.tsx@@ -331,7 +331,10 @@ function SettingsSideBar(props: SettingsSideBarProps) {fontWeight: "bold",color: "paragraph",mx: 3,- mb: 1+ mb: 1,+ overflow: "hidden",+ textOverflow: "ellipsis",+ wordSpacing: "nowrap"}}>{group.title}@@ -463,7 +466,7 @@ function SettingItem(props: { item: Setting }) {gap: 4}}>- <Flex sx={{ flexDirection: "column" }}>+ <Flex sx={{ flexDirection: "column", flexShrink: 0 }}><Text variant={"subtitle"}>{item.title}</Text>{item.description && (<Text@@ -480,7 +483,6 @@ function SettingItem(props: { item: Setting }) {<Flexsx={{alignItems: "center",- flexShrink: 0,justifyContent: "end",gap: 2,"& > label": { width: "auto" }@@ -592,7 +594,8 @@ function SelectComponent(border: "1px solid var(--border-secondary)",borderRadius: "5px",color: "var(--paragraph)",- padding: "5px"+ padding: "5px",+ overflow: "hidden"}}value={selectedOption.status === "fulfilled" ? selectedOption.value : undefineddiff --git a/packages/theme/src/theme/variants/button.ts b/packages/theme/src/theme/variants/button.tsindex a003a1c1f..6795fac0c 100644--- a/packages/theme/src/theme/variants/button.ts+++ b/packages/theme/src/theme/variants/button.ts@@ -44,6 +44,10 @@ export const createButtonVariant = (px: 2,py: "7.5px",+ overflow: "hidden",+ textOverflow: "ellipsis",+ whiteSpace: "nowrap",+transition: "transform 50ms ease-out",":hover:not(:disabled):not(:active)": {bg: background,