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

Show spinner while loading follow requests #23386

Merged
merged 1 commit into from
Feb 6, 2023

Conversation

c960657
Copy link
Contributor

@c960657 c960657 commented Feb 3, 2023

When clicking on Follow requests in the context menu above the compose form, I see a brief flash of the “Even though your account is not locked …” message instead of a loading spinner.

@ClearlyClaire
Copy link
Contributor

Sounds like a sensible change to me, although I'm unsure of how the “Even though your account is not locked” message would appear only while loading. Did I misunderstand that part?

@c960657
Copy link
Contributor Author

c960657 commented Feb 6, 2023

If the list is empty after loading is complete, the prepend block is only shown if alwaysPrepend is specified, and it isn't for this list.

@ClearlyClaire
Copy link
Contributor

But it should only show up if you either have a non-empty list or have a locked account, right?

@c960657
Copy link
Contributor Author

c960657 commented Feb 6, 2023

It should show up if your account is unlocked and the are pending follow requests.

But currently is shows up if your account is unlocked, even if there are no follow requests (but only while loading).

Perhaps it is worth changing ScrollableList so that prepend is never shown while loading, if there is an emptyMessage (unless alwaysPrepend is specified). This will prevent the short flash of prepend for all lists with prepend+emptyMessage, and will allow to remove my check for accountIds.size in the unlockedPrependMessage assignment.

     if (showLoading) {
       scrollableArea = (
         <div className='scrollable scrollable--flex' ref={this.setRef}>
           <div role='feed' className='item-list'>
-            {prepend}
+            {(!emptyMessage || alwaysPrepend) && prepend}
           </div>

@ClearlyClaire ClearlyClaire merged commit c1f32c9 into mastodon:main Feb 6, 2023
@ClearlyClaire
Copy link
Contributor

But currently is shows up if your account is unlocked, even if there are no follow requests (but only while loading).

I mean, the option to navigate to follow requests should not even be there in such a case.

btrd pushed a commit to btrd/mastodon that referenced this pull request Feb 22, 2023
@c960657 c960657 deleted the follow-requests-loading branch March 30, 2023 18:30
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