Skip to content

Conversation

@susnux
Copy link
Contributor

@susnux susnux commented Jun 18, 2025

☑️ Resolves

Deprecate events which not comply with camelCase naming.
Only those two places have an invalid naming as normally only the update:MODEL event is scoped and other events just use camel case names like selectSomething (aka select-something) instead of select:something.

🏁 Checklist

  • ⛑️ Tests are included or are not applicable
  • 📘 Component documentation has been extended, updated or is not applicable
  • 2️⃣ Backport to stable8 for maintained Vue 2 version or not applicable

@susnux susnux added this to the 9.0.0 milestone Jun 18, 2025
@susnux susnux added 3. to review Waiting for reviews refactor ♻️ Pull request that is neither a fix nor a feature labels Jun 18, 2025
@susnux
Copy link
Contributor Author

susnux commented Jun 18, 2025

/backport to stable8

Copy link
Contributor

@julien-nc julien-nc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice of you to keep the deprecated ones for a while 👍

@susnux susnux requested a review from ShGKme June 19, 2025 16:52
CHANGELOG.md Outdated
It is replaced by `arrowEnd` which reflects that the directions depends on the text directions (LTR vs RTL).

#### Event names
With Vue 3 it is recommended to use camel case event names and only scope events for models like `update:modelValue` or `update:shown`.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as: #7059 (comment)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You might be right and I misinterpreted the docs.
But still we only have this two places, resize:list also makes not much sense it should rather be consistent with all other events we have (resize-list).

For interact:todo it might make sense if there are any other events for interaction, but its the only one so not sure.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You might be right and I misinterpreted the docs.

This might also be from the eslint-plugin-vue member's comments, where foo:barBaz is not considered camelCase, and : is considered a special case for update:* events (that are "never used without v-model/.sync directive").

IMO, this is only a personal opinion, and Vue documentation never says it directly.

I saw namespaced event names in many apps and good libs, which is a great thing for complex components.

There was added an additional option for ESLint rule for this case:
vuejs/eslint-plugin-vue#1321

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But still we only have this two places, resize:list also makes not much sense it should rather be consistent with all other events we have (resize-list).

Agree as resize: is not a namespace.

For interact:todo it might make sense if there are any other events for interaction, but its the only one so not sure.

Yes, but future-proof.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So I'm fine with renaming in general.

But disagree with "With Vue 3 it is recommended ... only scope events for models" part

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For interact:todo it might make sense if there are any other events for interaction

I am fine with renaming it bc now it conveys it as big feature whereas it's just one simple interaction and we don't have any plans to expand interaction.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agree! Adjusted the changelog.

About the scoping: I do not have a problem with interact:todo but it seems its the only one where this is needed so we could also just use the plain event. But if you like then I revert that @ShGKme and add it as an exception to the eslint config.

@susnux susnux force-pushed the chore/deprecate-events branch from 8f3f370 to bf86f78 Compare June 23, 2025 14:26
@susnux susnux requested a review from ShGKme June 23, 2025 14:27
@susnux susnux merged commit d4d19fd into main Jun 23, 2025
25 checks passed
@susnux susnux deleted the chore/deprecate-events branch June 23, 2025 18:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to review Waiting for reviews refactor ♻️ Pull request that is neither a fix nor a feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants