feat(ui): generic Skeleton component and skeleton loading states - #3523
Draft
RitvikSardana wants to merge 3 commits into
Draft
feat(ui): generic Skeleton component and skeleton loading states#3523RitvikSardana wants to merge 3 commits into
RitvikSardana wants to merge 3 commits into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Adds a single generic
<Skeleton />component and uses it to replace spinners / blank screens with content-shaped loading states across the agent portal.The component (
desk/src/components/Skeleton/) has no per-screen configuration and two modes:variant(line/circle/box) andwidth/heightor utility classes. This is the primitive everything else composes.loading: renders the slotted component inert (inert,aria-hidden), walks the DOM and turns every leaf node (text, images, icons, buttons, inputs) into a gray pulse block at its real rendered size. Whenloadingturns false the slot renders untouched. Meant for presentational components fed mock props.The folder mirrors frappe-ui component conventions (
Skeleton.vue,types.ts,index.ts), so it can be lifted upstream into frappe-ui as-is later.Screens wired up (all bone composition, since these screens fetch their own data):
ListViewBuilder)TicketAgent.vue)DetailPageSkeleton: avatar header, 4 stat cards, tabs, list linesSkeletons show only on first load; reloads keep existing rows visible as before. Line widths vary deterministically (
(row + column) % 4) so rows read organic without randomness.How to test
cd desk && yarn dev, open the agent portal.yarn buildverified after each commit.Related issue
No linked issue — raised from an internal improvement idea; happy to open one if needed.