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

Add src/directives folder (vue directives refactor) #174

Merged
merged 8 commits into from
Sep 15, 2022
Merged

Conversation

Raruto
Copy link
Collaborator

@Raruto Raruto commented Sep 9, 2022

Move src/app/gui/vue/vue.directives.js file into src/directives folder.

List of changes:

  • create src/directives folder
  • remove src/app/gui/vue/directives/v-checked.js
  • remove src/app/gui/vue/directives/v-disabled.js
  • remove src/app/gui/vue/directives/v-select2.js
  • deprecate notice for delete src/app/gui/vue/vue.directives.js
  • consolidate directives definitions within a single folder
  • add new file src/directives/utils.js (stateful directives helper: watch / unwatch / trigger))

Related to #99

- create `src/directives` folder
- remove `src/app/gui/vue/directives/v-checked.js`
- remove `src/app/gui/vue/directives/v-disabled.js`
- remove `src/app/gui/vue/directives/v-select2.js`
- deprecate notice for `src/app/gui/vue/vue.directives.js`
- consolidate directives definitions within a single folder
@Raruto Raruto added the refactoring Anything which could result in a API change label Sep 9, 2022
@Raruto Raruto added this to the v3.7 milestone Sep 9, 2022
src/directives/index.js Outdated Show resolved Hide resolved
src/directives/index.js Outdated Show resolved Hide resolved
src/directives/index.js Outdated Show resolved Hide resolved
src/directives/index.js Outdated Show resolved Hide resolved
src/directives/index.js Outdated Show resolved Hide resolved
src/directives/index.js Outdated Show resolved Hide resolved
src/directives/index.js Outdated Show resolved Hide resolved
src/directives/index.js Outdated Show resolved Hide resolved
src/directives/index.js Outdated Show resolved Hide resolved
- delete `src/app/vui/vue/vue.directives.js`
- delete `src/directives/index.js` and
- consolidate all custom vue  directives within `src/directives` folder
@Raruto Raruto enabled auto-merge (squash) September 12, 2022 13:59
@Raruto Raruto disabled auto-merge September 12, 2022 14:25
@Raruto Raruto marked this pull request as draft September 12, 2022 14:25
**Refactor file `src/directives/utils.js` **

- rename and refactor function (`createDirectiveObj({el, attr, watcher, handler, modifiers})` --> `watch({el, attr, watcher})` )
- rename function (`unbindWatch` --> `unwatch`)
- delete function (`getDirective(unique_attr_id)`)
- add function (trigger({el, attr, data}))
@Raruto Raruto marked this pull request as ready for review September 14, 2022 08:47
@Raruto Raruto enabled auto-merge (squash) September 14, 2022 08:48
@Raruto Raruto requested a review from volterra79 September 14, 2022 08:48
@Raruto Raruto merged commit 00807ee into dev Sep 15, 2022
@Raruto Raruto deleted the vue-directives branch September 15, 2022 09:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
refactoring Anything which could result in a API change
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants