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

[stable7] feat: Add slot for description of NcEmptyContent #4170

Merged
merged 1 commit into from Jun 6, 2023

Conversation

backportbot-nextcloud[bot]
Copy link

@backportbot-nextcloud backportbot-nextcloud bot commented May 31, 2023

  • ⚠️ This backport had conflicts that were resolved with the 'ours' merge strategy and is likely incomplete

backport of #3895

@backportbot-nextcloud backportbot-nextcloud bot added enhancement New feature or request feature: emptycontent Related to the emptycontent component labels May 31, 2023
@backportbot-nextcloud backportbot-nextcloud bot added this to the 7.11.7 milestone May 31, 2023
@susnux
Copy link
Contributor

susnux commented May 31, 2023

Required also for older versions running 7.x

Signed-off-by: Ferdinand Thiessen <rpm@fthiessen.de>
@susnux susnux marked this pull request as ready for review May 31, 2023 13:26
@susnux susnux modified the milestones: 7.11.7, 7.12.0 May 31, 2023
Comment on lines 160 to 162
hasDescription() {
return this.description !== ''
return this.description !== '' || this.$slots.description?.[0]
},
Copy link
Contributor

Choose a reason for hiding this comment

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

Note: this is not well compatible with Vue 3 (by design). Isn't this.$slots.description enough to check if the description slot was passed?

Copy link
Contributor

Choose a reason for hiding this comment

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

As stable7 will not see vue3 (I guess) we should discuss this for the version on the master branch.

Nevertheless this is required to keep the behavior the same, as an empty slot = empty property should not show the description nodes.

Copy link
Contributor

Choose a reason for hiding this comment

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

Nevertheless this is required to keep the behavior the same, as an empty slot = empty property should not show the description nodes.

By empty slot do you mean this usage:

<NcEmptyContent>
<!-- nothing -->
</NcEmptyContent>

or this

<NcEmptyContent>
  <template #description></template>
</NcEmptyContent>

?

@ShGKme ShGKme merged commit 5709ed8 into stable7 Jun 6, 2023
11 checks passed
@ShGKme ShGKme deleted the backport/3895/stable7 branch June 6, 2023 21:37
@Pytal Pytal mentioned this pull request Jun 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request feature: emptycontent Related to the emptycontent component
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants