-
Notifications
You must be signed in to change notification settings - Fork 414
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
Channel page caching #1750
Channel page caching #1750
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Two very small changes.
src/renderer/page/channel/view.jsx
Outdated
<span className="empty">{__('No content found.')}</span> | ||
) : ( | ||
null | ||
); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe
...
) : !fetching && <span className="empty">{__('No content found.')}</span>;
To avoid the nested ternarys
src/renderer/page/channel/view.jsx
Outdated
<h1>{name}</h1> | ||
<h1> | ||
{name} | ||
{fetching ? <BusyIndicator /> : null} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
{!fetching && <BusyIndicator />}
This is great. So much smoother. |
I also cleaned up types in |
Issue #1255
Moves
<BusyIndicator>
to title bar.Refactors
contentList
to show "No content found" only after fetch is complete;null
while fetching.There is still some chance that a user will click the wrong tile but the update is very fast and pretty smooth. The best way I see to prevent this is to disable navigation for ~1sec following the update. This could be done by adding a throttle property to the state along with corresponding actions, reducers, and a thunk in doNavigate, or migrating from thunks to middleware, both of which seem well beyond the scope of this issue.