-
Notifications
You must be signed in to change notification settings - Fork 92
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
update below title slot styling #688
update below title slot styling #688
Conversation
lib/KCard/index.vue
Outdated
@@ -34,7 +34,7 @@ | |||
as progressive loading experience. | |||
--> | |||
<span | |||
v-if="$slots.thumbnailPlaceholder" | |||
v-if="$slots.thumbnailPlaceholder && !thumbnailSrc" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Even though the major function of the placeholder background and this slot's content is to serve as placeholder when the thumbnail is not available at all, it also has the additional function to show at least something while the image is loading over it. I've tried to explain with the comment above on line 33.
Adding this condition would break this additional feature. I assume there was a situation where not having the condition caused some unexpected problems - could you elaborate what was the motivation for this change? Perhaps we can think of a solution that would still allow us to keep the progressive loading experience.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The motivation around this was to prevent the placeholder from showing when the thumbnailSrc is provided.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually - on a second thought . we actually don't need both. This will do v-if="$slots.thumbnailPlaceholder"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
was to prevent the placeholder from showing when the thumbnailSrc is provided
Ah okay, well we'd want to show it even in this case, if the slot is provided, for the reasons I mentioned above - to achieve something being displayed below the image when it's still loading, for example on slower networks
So if
This will do
v-if="$slots.thumbnailPlaceholder"
is sufficient, let's just keep it that way.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good to go
22936ac
to
25d2956
Compare
Description
Issue addressed
Addresses #PR# HERE
Before/after screenshots
Changelog
[#688]
KCard
stylingKCard
[update below title slot styling #688] update below title slot styling #688
Steps to test
(optional) Implementation notes
At a high level, how did you implement this?
Does this introduce any tech-debt items?
Testing checklist
Reviewer guidance
After review
CHANGELOG.md
Comments