Skip to content

Conversation

@Slendy
Copy link
Contributor

@Slendy Slendy commented Jul 14, 2023

This PR turns the major sections of profiles and levels on the website into their own pages that are loaded through iFrames to allow the website to mimic responsiveness. This way you can go through pages of comments without reloading the entire page. It also has the benefit of consolidating all the styling and logic for loading comments, photos, and scores into a single page.

Current drawbacks

When you click a link in an iframe it doesn't immediately load the page like you would expect because instead, the iframe travels to that link. My solution for this was to put a script in BaseLayout that would detect if the window is in an iframe, if it is then it sets the top-level window location to the current page location. It works fairly seamlessly but it does introduce some delay that some users might notice. There might be a better solution to this and I still have yet to try more solutions.

Closes #394, closes #604

Todos

  • Fix off by one error in pagination
  • Implement viewing different score types
  • Make pagination buttons look pretty
  • Snap parent page to the top of the frame whenever new page loads?
Pictures

image

image

image
image
image

@m88youngling
Copy link
Contributor

When I saw you mentioned iframes, I was at first concerned about links. Your workaround though is a clever way of getting around that issue, interesting!

@uhwot
Copy link
Contributor

uhwot commented Jul 17, 2023

I think you can use the attribute target="_parent" on links to make them open outside an iframe

Slendy added 2 commits July 18, 2023 02:31
Also fixes the off-by-one error in pagination and fixes response caching for game assets
Slendy added 2 commits August 3, 2023 20:20
# Conflicts:
#	ProjectLighthouse.Servers.Website/Pages/Partials/CommentsPartial.cshtml
#	ProjectLighthouse.Servers.Website/Pages/SlotPage.cshtml
#	ProjectLighthouse.Servers.Website/Pages/UserPage.cshtml
#	ProjectLighthouse.Servers.Website/Pages/UserPage.cshtml.cs
@Slendy Slendy mentioned this pull request Aug 4, 2023
6 tasks
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.

Level list on profile not showing all levels. Add pagination to comments, reviews, and photos on the website

3 participants