Skip to content
This repository was archived by the owner on Sep 30, 2024. It is now read-only.

svelte: Improve commit page loading state#62842

Merged
fkling merged 1 commit into
mainfrom
fkling/sk/commit-page-improvements
May 22, 2024
Merged

svelte: Improve commit page loading state#62842
fkling merged 1 commit into
mainfrom
fkling/sk/commit-page-improvements

Conversation

@fkling

@fkling fkling commented May 22, 2024

Copy link
Copy Markdown
Contributor

It was reported (Slack thread) that we show the old commit data when navigating to a different commit page.
The page was explicitly implemented to show the previously loaded data in case there is an error when fetching more data. But this also affects normal page navigation.

In this commit the implementation was changed to return the previously loaded data when an error occurs, which simplifies loading state and data rendering on the page itself.

Test plan

Manual testing + new integration test.

It was reported that we show the old commit data when navigating to a
different commit page.
The page was explicitly implemented to show the previously loaded data
in case there is an error when fetching more data. But this also affects
normal page navigation.

In this commit the implementation was changed to return the previously
loaded data when an error occurs, which simplifies loading state and
data rendering on the page itself.
@fkling fkling added the team/code-search Issues owned by the code search team label May 22, 2024
@fkling fkling requested a review from a team May 22, 2024 08:47
@fkling fkling self-assigned this May 22, 2024
@cla-bot cla-bot Bot added the cla-signed label May 22, 2024

@vovakulikov vovakulikov left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested manually, not a blocker but with big commits (I usually test on DefinitelyTyped repository) we still show old content as we fetch the new one, so with big commits when it takes senseable time to fetch new commit data it looks like a freeze.

My suggestion here would be to add some inline loader state (maybe against the link which cases transition, or some global loading indicator somewhere at the top of the page.

list-style: none;

li {
li:not(:last-child) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Found not that easy to read selectors with not operator, maybe & + & would be simpler here

@vovakulikov vovakulikov left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approve since code LGTM

@fkling

fkling commented May 22, 2024

Copy link
Copy Markdown
Contributor Author

we still show old content as we fetch the new one

@vovakulikov do you mean the commit information (title, message, ...)?

Showing some kind of navigation indicator is a general problem. We have to find a solution that works across the app. Other places have that issue too (e.g when using fuzzy finder). That requires some design input (cc @taiyab)

@fkling fkling merged commit d24b981 into main May 22, 2024
@fkling fkling deleted the fkling/sk/commit-page-improvements branch May 22, 2024 10:28
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

cla-signed team/code-search Issues owned by the code search team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants