graphieros / vue-data-ui

An open source user-empowering data visualization Vue 3 components library for eloquent data storytelling
https://vue-data-ui.graphieros.com/
MIT License
1.01k stars 42 forks source link

New feature - Title options and custom slot in VueUiSparkbar component #57

Closed lucaspmarra closed 2 months ago

lucaspmarra commented 2 months ago

Summary:

Added support for custom title and subtitle slots in the component.

Details:

Support for Custom Slots:

Added the ability to provide custom title and subtitle using the title slot in the component. If a custom slot is provided, it will override the default title and subtitle specified in config.style.title.text and config.style.title.subtitle.text.

Default Title and Subtitle Handling:

If no custom slot is provided, the component will render the default title and subtitle based on config.style.title.text and config.style.title.subtitle. Improved conditional logic to check for the presence of the slot and the title text to determine which content to display.

Impact:

These changes enhance the flexibility and customization of the component by allowing users to define their own titles and subtitles while maintaining sensible defaults. This improves the component's adaptability and provides more control over its appearance.

This revision is now focused solely on the title and subtitle changes, aligning with your updates. Let me know if there's anything else you'd like to adjust!

Discussion:

I still don't fully understand the difference between #build and #VDUI-build. Should we apply changes to both of them?

graphieros commented 2 months ago

Hey @lucaspmarra :) I'll checkout your PR tomorrow.

In the testing arena, vdui refers to the VueDataUi universal component. So 4 versions are visible (local component, local VueDataUi component, build component and VueDataUi build). It makes it easy to spot out improvements or UI bugs when testing.

lucaspmarra commented 2 months ago

I missed default_configs, really. It's a lot of things/places for changes that I haven't caught up with yet, but thanks, I'll be more careful from now on. 😄