ntohq / buefy-next

Lightweight UI components for Vue.js (Vue3) based on Bulma
https://v3.buefy.org
MIT License
124 stars 10 forks source link

Inconsistent availability of active property #155

Open M0dM opened 12 months ago

M0dM commented 12 months ago

Overview of the problem

Buefy version: v0.1.2-next Vuejs version: 3+ OS/Browser: any

Description

b-tooltip still accepts active property but b-modal, b-message and b-loading don't.

I had to use :model-value binding to make them work which is completely logic.

Steps to reproduce

Example with b-loading

Not working but was previously (in vue2) working : b-loading(:active="isLoading" :can-cancel="false" :is-full-page="true")

Working now: b-loading(:model-value="isLoading" :can-cancel="false" :is-full-page="true")

Example with b-tooltip

Still working

b-tooltip(
      :label="message"
      :active="displayMessage"
      type="is-dark"
    )
        b-icon(icon="trash" key="trash")

Expected behavior

Add active props to other components, or document the necessity to migrate to model-value even if it is related to vue3 modifications around v-model, it is confusing to see b-tooltip still working with active prop and not the others.

Maybe dropping active prop on b-tooltip would be ok too, but I think in either way, this should be documented because it does not work like explained in documentation.

Actual behavior

active property is still working but only for part of the components

kikuomax commented 12 months ago

@M0dM Good catch, thanks!

I think I intentionally left active because BTooltip was not intended to work with v-model as it did not emit "input" events. But I understand your sense of inconsistency. If we change active to model-value, we should also make it emit "update:modelValue" events, Vue 3 counterpart of "input" events. Because model-value implies it also works with v-model.