Skip to content
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

Fix: [Input] Vue Compat: deprecation INSTANCE_ATTRS_CLASS_STYLE (#16) #189

Merged
merged 6 commits into from
Feb 17, 2024

Conversation

kikuomax
Copy link
Collaborator

@kikuomax kikuomax commented Jan 31, 2024

Related issue

Proposed Changes

  • Introduce a new prop compat-fallthrough to Input, which determines if class, style, and id attributes are applied to the root <div> element instead of the underlying <input> or <textarea> element. If true, they are applied to the root <div> element, which is compatible with Vue 2.
  • Introduce a new config option defaultCompatFallthrough to provide the default value for the compat-fallthrough prop
  • Add new tests for the compat-fallthrough prop
  • Explain the compat-fallthrough prop in the Input doc page
  • Add the introduction of the compat-fallthrough prop as a new feature to CHANGELOG
  • Refresh test snapshots affected by the introduction of the compat-fallthrough prop

@wesdevpro
Copy link

@kikuomax is this PR ready for me to review?

@kikuomax
Copy link
Collaborator Author

@kikuomax is this PR ready for me to review?

@wesdevpro Yes, please!

@kikuomax
Copy link
Collaborator Author

Due to #192, I have to rebase my fork.

@kikuomax kikuomax marked this pull request as draft February 12, 2024 04:12
- `Input` introduces a new prop `compat-fallthrough` that determines if
  `class`, `style`, and `id` attributes are applied to the root `<div>`
  element, instead of the underlying `<input>` or `<textarea>`. Since
  Vue 3 changed the fallthrough behavior, `Input` became incompatible
  with Buefy for Vue 2. Setting the prop to `true`, makes `Input`
  compatible with Buefy for Vue 2. The default value for this prop is
  configured by a new config option `defaultInputCompatFallthrough`,
  which is `true` by default.

issue ntohq#16
- Tests the new prop `compat-fallthrough` of `Input`.
- `CHANGELOG.md` is not well-structured for now, though, it is important
  to leave any clues for coming release.
- Refreshes test snapshots affected by the introduction of
  `compat-fallthrough` prop of `Input`.
- Renames `defaultInputCompatFallthrough` to `defaultCompatFallthrough`
  because there are many other components affected by the same Vue 3
  change in attribute fallthrough behavior. I think having different
  config options for individual components is tedious for both users and
  maintainers. If one wants to apply different behavior to different
  components, can explicitly use `compat-fallthrough`.
  See ntohq#16 (comment)
@kikuomax kikuomax force-pushed the input-fallthrough-behavior branch from ea5bf77 to 5f8a9fc Compare February 12, 2024 04:26
@kikuomax kikuomax marked this pull request as ready for review February 12, 2024 04:27
@kikuomax
Copy link
Collaborator Author

Due to #192, I have to rebase my fork.

Rebased!

@kikuomax kikuomax merged commit 4905bd9 into ntohq:dev Feb 17, 2024
3 checks passed
@kikuomax kikuomax deleted the input-fallthrough-behavior branch February 17, 2024 04:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants