-
Notifications
You must be signed in to change notification settings - Fork 88
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
Allow more than text on EmptyContent description #3082
Conversation
I cannot reproduce this @jotoeri, works when e.g. starting with no icon then toggling the icon like this <template #icon>
<Airplane v-if="show" />
</template> but doesn't when doing <template v-if="show" #icon>
<Airplane />
</template> |
You can have a look into nextcloud/forms#1308 What i'm trying to do is:
But the Text then doesn't show up. You can do it even more clear like this, where the icon does not show up:
However, here the icon shows up on the second EmptyContent:
|
Why not use the description? |
Currently the description is constrained to text-only and the EmptyContent on forms (created by you 😉) had a description-slot as well as an action-slot. This is why i went this way. But i'm also fine with opening the desc-slot to any content. |
We could put the |
Didnt test yet, but from your example above i also thought that could be a workaround. However:
|
Would be simpler to widen the description imho |
Signed-off-by: Jonas Rittershofer <[email protected]>
e6399f2
to
d47bc98
Compare
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.
Very good, this saves me this hacked solution of putting
in the description to show the buttons:
https://github.com/nextcloud/tasks/blob/0611f1b897c4681035b7e6541247dd4dcc9cea44/src/components/TaskCreateDialog.vue#L77-L85
Adding a slot to NcEmptyContent to put a button below.
There is however still a problem with reactivity, when using multiple NcEmptyContent 'after' each other.
If i first show an EmptyContent with LoadingIcon only, and after finished loading i want to show an EmptyContent with icon and text, then the text is not shown. Same applies to Icon (Action, Desc), if a slot is not used on the first usage, but should be shown on the second. (Example in nextcloud/forms#1308)
@raimund-schluessler @skjnldsv @Pytal Any idea, how to fix the emptyContent reactivity here? Seems like there was some attempt to fix reactivity in #2867, but did this maybe introduce the problem? 🙈