Consider creating Rails helper/ViewComponent for skeleton loader
Current server-rendered skeleton loaders rely on the deprecated GlSkeletonLoading Vue component's classes (.skeleton-line-[123]) for styling. Eventually that component will be removed, which will break these instances.
This issue is about creating a new skeleton loader helper or ViewComponent that does not rely on the deprecated styles. It should match the styling of the GlSkeletonLoader in GitLab UI.
At the time of writing, there are three uses of server rendered skeleton loaders:
ee/app/views/groups/saml_providers/show.html.haml#L37-40ee/app/views/projects/requirements_management/requirements/index.html.haml#L45-53- ee/app/views/projects/analytics/dashboards/index.html.haml#L5
There is also some CSS to remove, if possible:
- app/assets/stylesheets/page_bundles/_ide_theme_overrides.scss#L449-461
-
app/assets/stylesheets/framework/animations.scss#L161-222
- Note how this is very similar to what's in GitLab UI's deprecated
GlSkeletonLoadingstyles.
- Note how this is very similar to what's in GitLab UI's deprecated
- ee/app/assets/stylesheets/pages/requirements.scss#L74-89
Alternatives to consider
It seems a bit heavy-handed to create a helper or ViewComponent for two instances of markup that by design should only be briefly visible. So, here are a couple of alternative approaches to consider:
- Just delete these two server-rendered instances, and don't implement the helper/ViewComponent.
- Using the existing
gl_loading_iconhelper instead.
Edited by Elwyn Benson