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

Unfolding thread only unfolds first status #446

Closed
1 task done
ghost opened this issue Apr 26, 2018 · 6 comments
Closed
1 task done

Unfolding thread only unfolds first status #446

ghost opened this issue Apr 26, 2018 · 6 comments
Labels

Comments

@ghost
Copy link

ghost commented Apr 26, 2018

(our fork is caught up to commit f4ed382)

When using the Show more for all feature, only the first status' CW is unfolded.
Tested in Firefox and Chrome.

screen shot 2018-04-26 at 12 08 07


  • I searched or browsed the repo’s other issues to ensure this is not a duplicate.
@ClearlyClaire
Copy link

I can reproduce it, and I'm pretty sure it worked some time ago, so something may have been wrong when rebasing the changes… having a look…

@ClearlyClaire
Copy link

Update: componentWillReceiveProps doesn't seem to be called at all, neither from the “Show more for all” feature nor from enabling/disabling collapsed toots.
This is most likely a change in React.JS lifecycles either due to upgrading React.JS a short while ago or making use of the new getSnapshotBeforeUpdate lifecycle method. Investigating further…

@ClearlyClaire
Copy link

This is indeed caused by defining getSnapshotBeforeUpdate although this isn't clearly documented in React.JS…
The correct thing to do is probably to switch to the new getDerivedStateFromProps lifecycle, as componentWillReceiveProps is considered unsafe/obsolete anyway, but that new method don't let us inspect the old props, so switching over isn't completely straightforward.

@ClearlyClaire
Copy link

I'm afraid I really don't get how React.JS work. I attempted translating the current componentWillReceiveProps to getDerivedStateFromProps and while I think I got it right… returning a state change does not trigger a rendering with this new state… things like pressing a key in the composer will cause a re-rendering. But I'm extremely confused as to why it doesn't render getDerivedStateFromProps's result immediately.

TL;DR: I can't React.JS, please help

@ClearlyClaire
Copy link

ClearlyClaire commented Apr 26, 2018

Turned out to be a bug in react-redux or one of its dependencies. Updating it to 5.0.7 fixed rendering not being triggered as a result of property changes. I'll clean up my mess and come with a proper fix tomorrow.

@ClearlyClaire
Copy link

This has been fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant