Thanks for the note on percentages. I’ll address that in the next release. For now, I’d just say to keep the Goal at 100. I didn’t account for people being able to change that.
What do you mean by dynamic? You want to attach custom field data to it or something? I can look into adding Block Bindings API support after WordPress 6.9 is released, which I believe should open up the feature for third-party blocks like my own.
Thanks for the reply! I was simply trying out the plugin based upon the recommendation and didn’t necessarily have a use case right away. But I like to try new plugins out to see if it’s something that I might want to use when the occasion arises.
I’m always thinking about how clients will use blocks, after I’ve turned the site over to them.
Allowing the Goal to be any number is perfect. It eliminates the need for the client to do any calculations.
As for dynamic data, I’m just brainstorming, but I could see this block connected to some sort of output from a separate source. Fundraising totals, or a running total of some other type, where the data is being managed somewhere else. Basically allowing an event’s data to be managed in its own environment, and the WordPress site automatically displaying the ongoing total/percentage towards goal without having to update the site/block manually.
Yeah, absolutely, we’ll be able to connect it to separate sources once Block Binding API support lands in Core for custom blocks.
I just updated my site to 2.0.1.
Hard-coding the Goal to 100 eliminates the issue I demonstrated earlier where the progress bar itself was accurate, but the text display of the percentage was incorrect.
As long as the user calculates their percentage offline and types in the result, this works. I was thinking that you’d keep the Goal as a user input, and then calculate the Percentage in the same way that you’re calculating the length of the shaded area of the progress bar. This would allow the user to enter their real Goal and real Progress, without having to do the math themselves.
Perhaps that’s better addressed when you’re able to connect the Progress value to an outside source.
Just trying to think of flexibility and ease of use. Thank you!
For this update, I just wanted to patch the bug with the current feature.
I plan on adding customizable goals that can be calculated as percentages in a future release, which will require larger code changes and more testing.
Wonderful. Thanks again for the replies.
I appreciate your work. I’ve still got a client site actively using your Whistles plugin from many years ago!