Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(kit): Skeleton add new directive #6934

Merged
merged 4 commits into from
Mar 18, 2024
Merged

feat(kit): Skeleton add new directive #6934

merged 4 commits into from
Mar 18, 2024

Conversation

waterplea
Copy link
Collaborator

Closes #

Copy link

lumberjack-bot bot commented Mar 1, 2024

Pull request was closed ✔️

All saved screenshots (for current PR) were deleted 🗑️

Copy link
Contributor

github-actions bot commented Mar 1, 2024

Visit the preview URL for this PR (updated for commit 7dd0e3d):

https://taiga-ui--pr6934-skeleton-c6qeypzv.web.app

(expires Tue, 19 Mar 2024 12:18:07 GMT)

🔥 via Firebase Hosting GitHub Action 🌎

Sign: 4b5ece1e114386f6a105425ef799091475b249eb

Copy link

bundlemon bot commented Mar 1, 2024

BundleMon

Files updated (2)
Status Path Size Limits
demo/browser/main.(hash).js
319.19KB (+592B +0.18%) +10%
demo/browser/runtime.(hash).js
36.53KB (+17B +0.05%) +10%
Unchanged files (3)
Status Path Size Limits
demo/browser/vendor.(hash).js
210.51KB +10%
demo/browser/styles.(hash).css
13.78KB +10%
demo/browser/polyfills.(hash).js
11.21KB +10%

Total files change +609B +0.1%

Groups updated (1)
Status Path Size Limits
demo/browser/*..js
2.2MB (-2.27KB -0.1%) -

Final result: ✅

View report in BundleMon website ➡️


Current branch size history | Target branch size history

@vladimirpotekhin vladimirpotekhin added the v4 4.0 candidate label Mar 4, 2024
@nsbarsukov nsbarsukov linked an issue Mar 5, 2024 that may be closed by this pull request
Comment on lines +10 to +20
<p>
<span
[tuiSkeleton]="
skeleton
? 'This text serves as the content behind the skeleton and depending on its length, the skeleton will adjust to fit it.'
: ''
"
>
{{ skeleton ? '' : 'This text will be replaced by a placeholder.' }}
</span>
</p>
Copy link
Member

Choose a reason for hiding this comment

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

Is this additional nesting is really required ?

Could we simplify example ?

Suggested change
<p>
<span
[tuiSkeleton]="
skeleton
? 'This text serves as the content behind the skeleton and depending on its length, the skeleton will adjust to fit it.'
: ''
"
>
{{ skeleton ? '' : 'This text will be replaced by a placeholder.' }}
</span>
</p>
<p
[tuiSkeleton]="
skeleton
? 'This text serves as the content behind the skeleton and depending on its length, the skeleton will adjust to fit it.'
: ''
"
>
{{ skeleton ? '' : 'This text will be replaced by a placeholder.' }}
</p>

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

It is there so the background is only where the text is — span is inline.

Comment on lines +30 to +34
public ngOnChanges({tuiSkeleton}: SimpleChanges): void {
this.animation?.cancel();

if (!tuiSkeleton.currentValue && !tuiSkeleton.firstChange) {
this.animation = this.el.animate(FADE, this.duration);
Copy link
Member

Choose a reason for hiding this comment

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

🚀

@splincode splincode merged commit d615221 into main Mar 18, 2024
28 checks passed
@splincode splincode deleted the skeleton branch March 18, 2024 14:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging this pull request may close these issues.

🚀 - New Skeleton API
4 participants