Skip to content

Implement custom font settings#1088

Merged
Rokt33r merged 4 commits intoBoostIO:masterfrom
Komediruzecki:feature/add-customizable-font-preferences
Aug 14, 2021
Merged

Implement custom font settings#1088
Rokt33r merged 4 commits intoBoostIO:masterfrom
Komediruzecki:feature/add-customizable-font-preferences

Conversation

@Komediruzecki
Copy link
Copy Markdown
Contributor

Add font size and family to Account Preferences
Add translations keys and translations for all supported languages for new Settings
Update mobile and desktop app code mirror editor to respect font size and font families

Tested in desktop app

  • Changing font works

  • Changing font family works

  • Changing languages shows correct preferences descriptions

  • Changing font family loses focus after update (not sure why it happens here and not in local space)

Add font size and family to Account Preferences
Add translations keys and translations for all supported languages for new Settings
Update mobile and desktop app code mirror editor to respect font size and font families
@Komediruzecki Komediruzecki requested a review from Rokt33r August 12, 2021 09:32
},
[setFontSize]
)
useDebounce(
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • Changing font family loses focus after update (not sure why it happens here and not in local space)

@Rokt33r any ideas?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should provide key for form item. Otherwise, react think the input element is replaced by a new element so it won't keep the focus

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Our usage of react select might cause the issue.

},
[setFontSize]
)
useDebounce(
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should provide key for form item. Otherwise, react think the input element is replaced by a new element so it won't keep the focus

)

const { settings } = useSettings()
const fontSize = useMemo(() => {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't overuse memo hooks for simple getters for primitive types, string, number and boolean.

@Rokt33r Rokt33r merged commit f3c4412 into BoostIO:master Aug 14, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants