Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

markdownStyle updates to emoji.fontSize aren't applied right away on iOS #448

Closed
VickyStash opened this issue Aug 1, 2024 · 4 comments
Closed
Labels
bug Something isn't working

Comments

@VickyStash
Copy link
Contributor

Problem

The markdownStyles-> emoji -> fontSize update doesn't re-render the input on iOS.
So any time new value is passed as emoji fontSize it's not applied right away, it works only after the input value is updated (something new got entered).

Steps to reproduce

  1. Update App.tsx example with the next updates:
// Specify default markdownStyle value
const [markdownStyle, setMarkdownStyle] = React.useState({emoji: {fontSize: 19}});

// Display markdownStyles to see how it's updated
<Text>Markdown style: {JSON.stringify(markdownStyle)}</Text>

...

// Add two buttons to update emoji font size
<Button
  title="Update emoji font size to 27"
  onPress={() =>
    setMarkdownStyle({
      emoji: {
        fontSize: 27,
      },
    })
  }
/>
<Button
  title="Update emoji font size to 19"
  onPress={() =>
    setMarkdownStyle({
      emoji: {
        fontSize: 19,
      },
    })
  }
/>
  1. Enter a couple of emojis and some text in the input
  2. Tap on buttons to update the emoji font size. See that the value inside markdownStyles is updated but it has no effect on the input. Enter a new chart to the input, the updated styles will be applied now.
markdown_bug.mp4

Platform

iOS

@VickyStash
Copy link
Contributor Author

^^ @parasharrajat

@tomekzaw tomekzaw changed the title markdownStyles updates to emoji.fontSize aren't applied right away on iOS markdownStyle updates to emoji.fontSize aren't applied right away on iOS Aug 1, 2024
@tomekzaw tomekzaw added the bug Something isn't working label Aug 1, 2024
@VickyStash
Copy link
Contributor Author

@tomekzaw Hi, I see you were working on the markdownStyles feature. Do you have the capacity to take a look at the issue or maybe you can at least share some thoughts to start with? This bug affects the enlarged emojis implementation.

@VickyStash
Copy link
Contributor Author

@tomekzaw @parasharrajat I've created a Draft PR with a fix for this issue. I'm going to test it over the E/App tomorrow and if everything is ok open the PR for the review.

I've noticed the fix also exists in this PR, but for some reason it wasn't progressed since May. @tomekzaw is there any reason for it?

@tomekzaw
Copy link
Collaborator

Fixed in #475

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants