Skip to content

Conversation

@tbotnz
Copy link
Contributor

@tbotnz tbotnz commented May 20, 2025

Closes: #19550

The existing rack elevations template does not scale well, for e.g if the user has the pagination set 1000, the rack elevation template will try and make a rack http call for every rack when the page loads (#19550)

this PR does the following

  • introduce lazy loading so that racks are only loaded once they intersect with the viewport
  • spinner added to show while racks are being lazy loaded

@tbotnz tbotnz changed the title Refactor rack elevations template for lazy loading /dcim/rack-elevations/ #19550 Enhancement: Refactor rack elevations template for lazy loading /dcim/rack-elevations/ May 20, 2025
@jeremystretch jeremystretch self-requested a review June 3, 2025 12:34
@jeremystretch jeremystretch changed the base branch from develop to main June 3, 2025 12:38
hx-swap="outerHTML"
aria-label="{% trans 'Rack elevation' %}"
>
<div class="d-flex justify-content-center align-items-center" style="min-height: 200px; margin-left: 30px;">
Copy link
Member

Choose a reason for hiding this comment

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

Inline styles are generally not permitted. If these attributes are necessary, they should be declared under a class in the source Sass.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

line 2 of the template begs to differ, however point taken

@jnovinger
Copy link
Member

Closing in favor of #19823, which has inline styles moved to the racks.css custom stylesheet.

@jnovinger jnovinger closed this Jul 7, 2025
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 7, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Rack Elevation Lazy Loading

4 participants