Skip to content
This repository has been archived by the owner on Dec 7, 2023. It is now read-only.

Allow infobox widget to render without a progress description block #171

Merged
merged 2 commits into from
Nov 19, 2021

Conversation

brockhaus
Copy link
Contributor

Description

Info blocks do need some progress description block always. If you don't want one, you have to define it anyways (empty) in order to not let that widget crash while rendering.
This fix changes the progress_description block to optional.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist

  • I updated the documentation (see here)
  • I agree that this code is used in AdminLTEBundle and will be published under the MIT license

@kevinpapst
Copy link
Owner

I guess I never used this embed. The entire if looks creepy.
Without testing and just from a first glance I'd say it can be completely replaced with

        {% if block('progress_description') is defined  %}

What do you think? Can you test and update if that works?

@brockhaus
Copy link
Contributor Author

@kevinpapst Well, I simply added the block check to your prior if condition. I am not sure, if that length check is an additional check needed. In my case it really would be enough to check for block existence only (as you propose).

And about never having used it: I found it on that index page of your demo app for this bundle.. :)

@kevinpapst
Copy link
Owner

Hahaha, ok got me, used it once 😁
Would you mind to change the if and then I will create a release.

@brockhaus
Copy link
Contributor Author

Changed that if condition as you've proposed. It looks good on my side. :)

@kevinpapst kevinpapst merged commit 427b545 into kevinpapst:master Nov 19, 2021
@kevinpapst
Copy link
Owner

@kevinpapst
Copy link
Owner

Thank you @brockhaus 👍

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
2 participants