Skip to content

A fully open source & end-to-end encrypted note taking alternative to Evernote.

uniform sizes

ammarahm-eda663023be260
diff --git a/apps/mobile/src/components/ActionSheetComponent/index.js b/apps/mobile/src/components/ActionSheetComponent/index.js
index 55dd83dc1..ae1b5c61f 100644
--- a/apps/mobile/src/components/ActionSheetComponent/index.js
+++ b/apps/mobile/src/components/ActionSheetComponent/index.js
@@ -691,7 +691,7 @@ export const ActionSheetComponent = ({
/>
</PressableButton>
- <Paragraph size={SIZE.xs + 2} style={{textAlign: 'center'}}>
+ <Paragraph size={SIZE.xs + 1} style={{textAlign: 'center'}}>
{rowItem.title}
</Paragraph>
</View>
@@ -933,7 +933,7 @@ export const ActionSheetComponent = ({
<Icon
name="shield-key-outline"
color={colors.accent}
- size={SIZE.sm + SIZE.xs + 2}
+ size={SIZE.sm + SIZE.xs + 1}
/>
<View
diff --git a/apps/mobile/src/components/Announcements/cta.js b/apps/mobile/src/components/Announcements/cta.js
index d7fa4e8d2..20aabd1b1 100644
--- a/apps/mobile/src/components/Announcements/cta.js
+++ b/apps/mobile/src/components/Announcements/cta.js
@@ -82,7 +82,7 @@ export const Cta = ({actions, style = {}, color, inline}) => {
<Button
key={item.title}
title={item.title}
- fontSize={SIZE.xs + 1}
+ fontSize={SIZE.xs}
type="gray"
onPress={() => onPress(item)}
width={null}
diff --git a/apps/mobile/src/components/Header/title.js b/apps/mobile/src/components/Header/title.js
index ac44fd2f8..406f762ed 100644
--- a/apps/mobile/src/components/Header/title.js
+++ b/apps/mobile/src/components/Header/title.js
@@ -70,7 +70,7 @@ export const Title = ({heading, headerColor, screen, notebook}) => {
}}
color={headerColor}>
{notebook ? (
- <Paragraph numberOfLines={1} size={SIZE.xs + 2}>
+ <Paragraph numberOfLines={1} size={SIZE.xs + 1}>
{notebook?.title}
{'\n'}
</Paragraph>
diff --git a/apps/mobile/src/components/MergeEditor/index.js b/apps/mobile/src/components/MergeEditor/index.js
index 5bfc59784..81a73d21e 100644
--- a/apps/mobile/src/components/MergeEditor/index.js
+++ b/apps/mobile/src/components/MergeEditor/index.js
@@ -342,7 +342,7 @@ const MergeEditor = () => {
borderRadius: 100,
paddingHorizontal: 12
}}
- fontSize={SIZE.xs + 1}
+ fontSize={SIZE.xs}
/>
) : null}
<View style={{width: 10}} />
@@ -356,7 +356,7 @@ const MergeEditor = () => {
borderRadius: 100,
paddingHorizontal: 12
}}
- fontSize={SIZE.xs + 1}
+ fontSize={SIZE.xs}
accentText="light"
color={colors.errorText}
onPress={onPressDiscardFromPrimaryWebView}
@@ -387,7 +387,7 @@ const MergeEditor = () => {
marginLeft: 10
}}
type="accent"
- fontSize={SIZE.xs + 1}
+ fontSize={SIZE.xs}
title={keepContentFrom === 'primary' ? 'Undo' : 'Keep'}
onPress={onPressKeepFromPrimaryWebView}
/>
@@ -473,7 +473,7 @@ const MergeEditor = () => {
minWidth: 60
}}
type="accent"
- fontSize={SIZE.xs + 1}
+ fontSize={SIZE.xs}
onPress={onPressSaveCopyFromSecondaryWebView}
title="Save a copy"
/>
@@ -489,7 +489,7 @@ const MergeEditor = () => {
paddingHorizontal: 12,
minWidth: 60
}}
- fontSize={SIZE.xs + 1}
+ fontSize={SIZE.xs}
accentColor="red"
accentText="light"
onPress={onPressDiscardFromSecondaryWebView}
@@ -520,7 +520,7 @@ const MergeEditor = () => {
marginLeft: 10
}}
type="accent"
- fontSize={SIZE.xs + 1}
+ fontSize={SIZE.xs}
title={keepContentFrom === 'secondary' ? 'Undo' : 'Keep'}
onPress={onPressKeepFromSecondaryWebView}
/>
diff --git a/apps/mobile/src/components/MoveNoteDialog/index.js b/apps/mobile/src/components/MoveNoteDialog/index.js
index e0ac84fc0..a856bbd8f 100644
--- a/apps/mobile/src/components/MoveNoteDialog/index.js
+++ b/apps/mobile/src/components/MoveNoteDialog/index.js
@@ -465,7 +465,7 @@ const MoveNoteComponent = ({close, note, setNote}) => {
title="Remove"
type="error"
height={25}
- fontSize={SIZE.xs + 1}
+ fontSize={SIZE.xs}
style={{
margin: 1,
marginRight: 5,
diff --git a/apps/mobile/src/components/NoteItem/index.js b/apps/mobile/src/components/NoteItem/index.js
index ff2c2278f..f45a9931e 100644
--- a/apps/mobile/src/components/NoteItem/index.js
+++ b/apps/mobile/src/components/NoteItem/index.js
@@ -122,7 +122,7 @@ const NoteItem = ({item, isTrash, tags}) => {
height={20}
icon="book-outline"
type="grayBg"
- fontSize={SIZE.xs + 1}
+ fontSize={SIZE.xs}
iconSize={SIZE.sm}
textStyle={{
marginRight: 0
@@ -183,7 +183,7 @@ const NoteItem = ({item, isTrash, tags}) => {
) : null}
<TimeSince
style={{
- fontSize: SIZE.xs + 1,
+ fontSize: SIZE.xs,
color: colors.icon,
marginRight: 6
}}
@@ -201,7 +201,7 @@ const NoteItem = ({item, isTrash, tags}) => {
marginRight: 6
}}>
<Icon name="attachment" size={SIZE.md} color={colors.icon} />
- <Paragraph color={colors.icon} size={SIZE.xs + 1}>
+ <Paragraph color={colors.icon} size={SIZE.xs}>
10
</Paragraph>
</View>
@@ -254,7 +254,7 @@ const NoteItem = ({item, isTrash, tags}) => {
textDecorationLine: 'underline'
}}
hitSlop={{top: 8, bottom: 12, left: 0, right: 0}}
- fontSize={SIZE.xs + 1}
+ fontSize={SIZE.xs}
style={{
borderRadius: 5,
paddingHorizontal: 2,
diff --git a/apps/mobile/src/components/NotebookItem/index.js b/apps/mobile/src/components/NotebookItem/index.js
index 33c197d4f..a5fc305d1 100644
--- a/apps/mobile/src/components/NotebookItem/index.js
+++ b/apps/mobile/src/components/NotebookItem/index.js
@@ -93,7 +93,7 @@ export const NotebookItem = ({item, isTopic = false, notebookID, isTrash}) => {
fontFamily: null
}}
type="grayBg"
- fontSize={SIZE.xs + 1}
+ fontSize={SIZE.xs}
icon="bookmark-outline"
textStyle={{
marginRight: 0
@@ -125,7 +125,7 @@ export const NotebookItem = ({item, isTopic = false, notebookID, isTrash}) => {
}}>
<Paragraph
color={colors.accent}
- size={SIZE.xs + 1}
+ size={SIZE.xs}
style={{
marginRight: 6
}}>
@@ -136,7 +136,7 @@ export const NotebookItem = ({item, isTopic = false, notebookID, isTrash}) => {
<>
<Paragraph
color={colors.icon}
- size={SIZE.xs + 1}
+ size={SIZE.xs}
style={{
textAlignVertical: 'center',
marginRight: 6
@@ -146,7 +146,7 @@ export const NotebookItem = ({item, isTopic = false, notebookID, isTrash}) => {
</Paragraph>
<Paragraph
color={colors.accent}
- size={SIZE.xs + 1}
+ size={SIZE.xs}
style={{
textAlignVertical: 'center',
marginRight: 6
@@ -157,7 +157,7 @@ export const NotebookItem = ({item, isTopic = false, notebookID, isTrash}) => {
) : (
<Paragraph
color={colors.icon}
- size={SIZE.xs + 1}
+ size={SIZE.xs}
style={{
marginRight: 6
}}>
@@ -166,7 +166,7 @@ export const NotebookItem = ({item, isTopic = false, notebookID, isTrash}) => {
)}
<Paragraph
color={colors.icon}
- size={SIZE.xs + 1}
+ size={SIZE.xs}
style={{
marginRight: 6
}}>
diff --git a/apps/mobile/src/components/Premium/expiring.js b/apps/mobile/src/components/Premium/expiring.js
index 747bdd3fe..05453e90d 100644
--- a/apps/mobile/src/components/Premium/expiring.js
+++ b/apps/mobile/src/components/Premium/expiring.js
@@ -108,7 +108,7 @@ export const Expiring = () => {
await sleep(300);
eSendEvent(eOpenPremiumDialog, promo);
}}
- size={SIZE.xs + 2}
+ size={SIZE.xs + 1}
style={{
textDecorationLine: 'underline',
color: colors.icon,
@@ -161,7 +161,7 @@ export const Expiring = () => {
button: 'Continue'
});
}}
- fontSize={SIZE.xs + 1}
+ fontSize={SIZE.xs}
height={30}
style={{
marginBottom: 10
diff --git a/apps/mobile/src/components/Premium/group.js b/apps/mobile/src/components/Premium/group.js
index 560b805c7..2f5463ff7 100644
--- a/apps/mobile/src/components/Premium/group.js
+++ b/apps/mobile/src/components/Premium/group.js
@@ -50,7 +50,7 @@ export const Group = ({item, index}) => {
style={{
marginTop: 10
}}
- size={SIZE.xs + 1}
+ size={SIZE.xs}
color={colors.icon}>
{item.info}
</Paragraph>
diff --git a/apps/mobile/src/components/Premium/pricingitem.js b/apps/mobile/src/components/Premium/pricingitem.js
index b57b7a9c2..31a043961 100644
--- a/apps/mobile/src/components/Premium/pricingitem.js
+++ b/apps/mobile/src/components/Premium/pricingitem.js
@@ -32,7 +32,7 @@ export const PricingItem = ({product, onPress, compact}) => {
: 'Monthly'}
</Heading>
{product?.info && (
- <Paragraph size={SIZE.xs + 1}>{product.info}</Paragraph>
+ <Paragraph size={SIZE.xs}>{product.info}</Paragraph>
)}
</View>
)}
diff --git a/apps/mobile/src/components/Premium/pricingplans.js b/apps/mobile/src/components/Premium/pricingplans.js
index b5955702d..2ba1975a4 100644
--- a/apps/mobile/src/components/Premium/pricingplans.js
+++ b/apps/mobile/src/components/Premium/pricingplans.js
@@ -366,7 +366,7 @@ export const PricingPlans = ({
{!user ? (
<Paragraph
color={colors.icon}
- size={SIZE.xs + 1}
+ size={SIZE.xs}
style={{
alignSelf: 'center',
textAlign: 'center',
@@ -374,13 +374,13 @@ export const PricingPlans = ({
}}>
Upon signing up, your 14 day free trial of Notesnook Pro will be
activated automatically.{' '}
- <Paragraph size={SIZE.xs + 1} style={{fontWeight: 'bold'}}>
+ <Paragraph size={SIZE.xs} style={{fontWeight: 'bold'}}>
No credit card information is required.
</Paragraph>{' '}
Once the free trial period ends, your account will be downgraded to
basic free account.{' '}
<Paragraph
- size={SIZE.xs + 1}
+ size={SIZE.xs}
onPress={() => {
openLinkInBrowser('https://notesnook.com/#pricing', colors)
.catch(e => {})
@@ -401,7 +401,7 @@ export const PricingPlans = ({
{Platform.OS === 'ios' ? (
<Paragraph
textBreakStrategy="balanced"
- size={SIZE.xs + 1}
+ size={SIZE.xs}
color={colors.icon}
style={{
alignSelf: 'center',
@@ -414,7 +414,7 @@ export const PricingPlans = ({
</Paragraph>
) : (
<Paragraph
- size={SIZE.xs + 1}
+ size={SIZE.xs}
color={colors.icon}
style={{
alignSelf: 'center',
@@ -432,7 +432,7 @@ export const PricingPlans = ({
width: '100%'
}}>
<Paragraph
- size={SIZE.xs + 1}
+ size={SIZE.xs}
color={colors.icon}
style={{
maxWidth: '100%',
@@ -440,7 +440,7 @@ export const PricingPlans = ({
}}>
By subscribing, you agree to our{' '}
<Paragraph
- size={SIZE.xs + 1}
+ size={SIZE.xs}
onPress={() => {
openLinkInBrowser('https://notesnook.com/tos', colors)
.catch(e => {})
@@ -456,7 +456,7 @@ export const PricingPlans = ({
</Paragraph>
and{' '}
<Paragraph
- size={SIZE.xs + 1}
+ size={SIZE.xs}
onPress={() => {
openLinkInBrowser('https://notesnook.com/privacy', colors)
.catch(e => {})
diff --git a/apps/mobile/src/components/PublishNoteDialog/index.js b/apps/mobile/src/components/PublishNoteDialog/index.js
index a84a78740..085eb892d 100644
--- a/apps/mobile/src/components/PublishNoteDialog/index.js
+++ b/apps/mobile/src/components/PublishNoteDialog/index.js
@@ -189,7 +189,7 @@ const PublishNoteDialog = () => {
flexShrink: 1
}}>
<Heading size={SIZE.sm}>Published at:</Heading>
- <Paragraph size={SIZE.xs + 1} numberOfLines={1}>
+ <Paragraph size={SIZE.xs} numberOfLines={1}>
{publishUrl}
</Paragraph>
<Paragraph
@@ -198,7 +198,7 @@ const PublishNoteDialog = () => {
await openLinkInBrowser(publishUrl, colors.accent);
} catch (e) {}
}}
- size={SIZE.xs + 1}
+ size={SIZE.xs}
style={{
marginTop: 5,
color: colors.pri
@@ -349,7 +349,7 @@ const PublishNoteDialog = () => {
<Paragraph
color={colors.icon}
- size={SIZE.xs + 1}
+ size={SIZE.xs}
style={{
textAlign: 'center',
marginTop: 5,
diff --git a/apps/mobile/src/components/ResultDialog/ProFeatures.js b/apps/mobile/src/components/ResultDialog/ProFeatures.js
index 3eaa94a77..b18fc57df 100644
--- a/apps/mobile/src/components/ResultDialog/ProFeatures.js
+++ b/apps/mobile/src/components/ResultDialog/ProFeatures.js
@@ -66,7 +66,7 @@ export const ProFeatures = ({count = 6}) => {
await sleep(300);
eSendEvent(eOpenPremiumDialog);
}}
- size={SIZE.xs + 2}
+ size={SIZE.xs + 1}
style={{
textDecorationLine: 'underline',
color: colors.icon
diff --git a/apps/mobile/src/components/SimpleList/card.js b/apps/mobile/src/components/SimpleList/card.js
index c9ea0976a..bb62f3eac 100644
--- a/apps/mobile/src/components/SimpleList/card.js
+++ b/apps/mobile/src/components/SimpleList/card.js
@@ -54,7 +54,7 @@ export const Card = ({color}) => {
marginLeft: 10,
maxWidth: '70%'
}}>
- <Paragraph color={colors.icon} size={SIZE.xs + 1}>
+ <Paragraph color={colors.icon} size={SIZE.xs}>
{messageBoardState.message}
</Paragraph>
<Paragraph
diff --git a/apps/mobile/src/components/SimpleList/notebookheader.js b/apps/mobile/src/components/SimpleList/notebookheader.js
index e02d81521..c5d3233fd 100644
--- a/apps/mobile/src/components/SimpleList/notebookheader.js
+++ b/apps/mobile/src/components/SimpleList/notebookheader.js
@@ -48,7 +48,7 @@ export const NotebookHeader = ({notebook, onPress, onEditNotebook}) => {
borderRadius: 10,
paddingTop: 25
}}>
- <Paragraph color={colors.icon} size={SIZE.xs + 1}>
+ <Paragraph color={colors.icon} size={SIZE.xs}>
{new Date(notebook.dateEdited).toLocaleString()}
</Paragraph>
<View
@@ -101,7 +101,7 @@ export const NotebookHeader = ({notebook, onPress, onEditNotebook}) => {
fontStyle: 'italic',
fontFamily: null
}}
- size={SIZE.xs + 1}
+ size={SIZE.xs}
color={colors.icon}>
{notebook.topics.length === 1
? '1 topic'
diff --git a/apps/mobile/src/components/TagItem/index.js b/apps/mobile/src/components/TagItem/index.js
index e5bed724c..ee174e720 100644
--- a/apps/mobile/src/components/TagItem/index.js
+++ b/apps/mobile/src/components/TagItem/index.js
@@ -66,7 +66,7 @@ const TagItem = React.memo(
</Heading>
<Paragraph
color={colors.icon}
- size={SIZE.xs + 1}
+ size={SIZE.xs}
style={{
marginTop: 5
}}>
diff --git a/apps/mobile/src/utils/SizeUtils.js b/apps/mobile/src/utils/SizeUtils.js
index 9b459a238..4027e9d67 100644
--- a/apps/mobile/src/utils/SizeUtils.js
+++ b/apps/mobile/src/utils/SizeUtils.js
@@ -62,8 +62,8 @@ export const normalize = (size) => {
}
};
export const SIZE = {
- xxs: normalize(9) * scale.fontScale,
- xs: normalize(11) * scale.fontScale,
+ xxs: normalize(10.5) * scale.fontScale,
+ xs: normalize(12) * scale.fontScale,
sm: normalize(14.5) * scale.fontScale,
md: normalize(16) * scale.fontScale,
lg: normalize(22) * scale.fontScale,
@@ -73,8 +73,8 @@ export const SIZE = {
};
export function updateSize() {
- SIZE.xxs = normalize(9) * scale.fontScale;
- SIZE.xs = normalize(11) * scale.fontScale;
+ SIZE.xxs = normalize(10.5) * scale.fontScale;
+ SIZE.xs = normalize(12) * scale.fontScale;
SIZE.sm = normalize(14.5) * scale.fontScale;
SIZE.md = normalize(16) * scale.fontScale;
SIZE.lg = normalize(22) * scale.fontScale;