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(placeholder): add placeholder slot #1626

Open
wants to merge 15 commits into
base: main
Choose a base branch
from

Conversation

danekslama
Copy link

@danekslama danekslama commented Dec 10, 2024

πŸ”— Linked issue

resolves #1307

❓ Type of change

  • πŸ“– Documentation (updates to the documentation or readme)
  • 🐞 Bug fix (a non-breaking change that fixes an issue)
  • πŸ‘Œ Enhancement (improving an existing functionality)
  • ✨ New feature (a non-breaking change that adds functionality)
  • 🧹 Chore (updates to the build process or auxiliary tools and libraries)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)

πŸ“š Description

This PR add a placeholder slot for NuxtImg component

docs/content/2.usage/1.nuxt-img.md Outdated Show resolved Hide resolved
docs/content/2.usage/1.nuxt-img.md Outdated Show resolved Hide resolved
@danekslama danekslama requested a review from Baroshem December 13, 2024 19:18
@danekslama danekslama requested a review from danielroe December 19, 2024 10:48
Copy link
Collaborator

@Baroshem Baroshem left a comment

Choose a reason for hiding this comment

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

Nice work! :)

@danekslama danekslama requested a review from Baroshem December 19, 2024 13:00
@codecov-commenter
Copy link

codecov-commenter commented Dec 20, 2024

Codecov Report

Attention: Patch coverage is 69.23077% with 4 lines in your changes missing coverage. Please review.

Project coverage is 62.78%. Comparing base (a2db479) to head (66a9a6b).

Files with missing lines Patch % Lines
src/runtime/components/NuxtImg.vue 66.66% 4 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1626      +/-   ##
==========================================
- Coverage   62.87%   62.78%   -0.09%     
==========================================
  Files          79       79              
  Lines        3539     3547       +8     
  Branches      413      413              
==========================================
+ Hits         2225     2227       +2     
- Misses       1285     1291       +6     
  Partials       29       29              

β˜” View full report in Codecov by Sentry.
πŸ“’ Have feedback on the report? Share it here.

@danekslama danekslama requested a review from danielroe December 27, 2024 11:06
@danekslama
Copy link
Author

I added the custom prop which acts similarly to the NuxtLink custom prop. I also updated the docs to show how to create custom placeholders with it.

Copy link
Member

@danielroe danielroe left a comment

Choose a reason for hiding this comment

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

Great - this is very promising!

Would you be able to add some tests? πŸ™

@danekslama
Copy link
Author

I'll be honest, I'm fairly new to unit testing, but I have some experience with Cypress. I added a test to check if the placeholder functionality and attribute fallthrough work as expected when the custom prop is set, and it seems they do.

@danekslama danekslama requested a review from danielroe December 28, 2024 11:37
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.

Placeholder slot for <NuxtImg>
4 participants