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

Better post loading support #3100

Merged
merged 1 commit into from
Oct 29, 2021
Merged

Better post loading support #3100

merged 1 commit into from
Oct 29, 2021

Conversation

askvortsov1
Copy link
Sponsor Member

Needed for https://github.com/flarum/core/issues/3043.

Some posts are loaded dynamically, and won't be immediately available. In this case, we show a loading indicator instead of displaying content. In this PR:

  • We redraw post content if loading state has chnaged
  • We show a loading indicator while loading

Needed for https://github.com/flarum/core/issues/3043.

Some posts are loaded dynamically, and won't be immediately available. In this case, we show a loading indicator instead of displaying content. In this PR:

- We redraw post content if loading state has chnaged
- We show a loading indicator while loading
askvortsov1 added a commit to flarum/tags that referenced this pull request Oct 11, 2021
Closes https://github.com/flarum/core/issues/3043

Depends on flarum/framework#3100

Before: https://i.imgur.com/TaYra03.png

After: https://i.imgur.com/VB0GAVq.png

**Questions for Reviewers**

The `ShowTagController` change introduces ambiguity for fetching by ID vs slug, but I'm not sure that's avoidable, as the alternative is a `bySlug` query parameter, which would be a breaking change.
@davwheat
Copy link
Member

davwheat commented Oct 11, 2021

I thought we had skeleton posts for things like this don’t we?

Oh this is just generic loading indicator support for child classes to use if desired, I think. Never mind then!

@askvortsov1 askvortsov1 added this to the 1.2 milestone Oct 29, 2021
@askvortsov1 askvortsov1 merged commit 2000727 into master Oct 29, 2021
@askvortsov1 askvortsov1 deleted the as/post-loading-support branch October 29, 2021 17:32
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.

None yet

3 participants