-
Notifications
You must be signed in to change notification settings - Fork 460
Description
We need to test all components to check compatibility with the upcoming version of Vue 3.
MAIN GOALS
- create a branch with Vue CLI project and environment to test -
vue3
- testing library and all components
- prepare new issues to fix
MAIN CHANGES IN VUE3
-
Documentation of Vue composition API find here
➡️ https://vue-composition-api-rfc.netlify.com/api.html#setup -
RFC is here ➡️ https://github.com/vuejs/rfcs/tree/master/active-rfcs
but some of the features are not implemented or changed so be careful
Want to test?
- the branch you are looking for is
vue3
the instruction ➡️ [WIP] Testing environment for Vue 3 #972
Have some questions? Something is not working, please tell us.
OVERALL ISSUES
mobile-observer.js
- changes inVue.observable()
-> need to change toreactive
- to globally registered component we can't use
Vue.component()
anymore -> need to useresolveComponent
orresolveDynamicComponent
or another solution is required - custom directive api change -> need to adjust
focus.js
,focus-trap.js
,clickOutside.js
$attrs
automatically includes all non-prop related attributes - we don't need model, $listeners -> check out this presentation https://github.com/chrisvfritz/vue-3-trends/blob/master/slides-2019-03-vueconfus.pdf- native portals
<Teleport>
- In Vue 3, due to the availability of Fragments, it is recommended to use template
refs
for direct access to DOM nodes instead of relying onthis.$el
. - Remove
$on
,$off
and$once
instance methods. Vue instances no longer implement the event emitter interface.
COMPONENTS ISSUES
rename custom directives hooks, be careful with v-bind="$attrs"
this inherits also directives
- v-focus
- v-clickOutside
- v-focusTrap
Issues with two-way data binding, removed model
prop
[v-model API Change] more info: https://github.com/vuejs/rfcs/blob/master/active-rfcs/0011-v-model-api-change.md
- SfCheckbox - v-model, issue with 'checked', use
checked
prop, removemodel
property - SfInput - v-model, issue with 'value', add $emit with
update:modelValue
- SfQuantitySelector - remove
model
, usemodelValue
, $emit with update:modelValue - SfAddToCart - remove
model
, usemodelValue
- SfRadio - v-model, issue with 'checked', use
checked
prop, removemodel
property - SfModal - remove
model
- SfSearch - use
modelValue
- SfCollectedProduct - change
$event
to$event.target.value
Replace $listeners
with v-bind="$attrs"
- SfArrow
- SfAddToCart
- SfBanner - fix
$listeners
- SfBottomNavigationitem
- SfButton
- SfColor
- SfCircleIcon - remove
$listeners
- SfIcon
- SfImage
- SfFilter
- SfMenuItem
this.$listeners
has been removed
- SfInput
now v-bind="$attrs"
inherit also classes and styles - check if this works
maybe this will be helpful -> https://github.com/vuejs/rfcs/blob/attr-fallthrough/active-rfcs/0000-attr-fallthrough.md
- SfInput
- SfQuantitySelector
- SfSearchBar
replace $on
, $off
and $once
methods, proposition is to use the external library mitt
see more here: https://github.com/vuejs/rfcs/blob/master/active-rfcs/0020-events-api-change.md
- SfSelect
- SfAccordion
- SfTabs
🚨 issue with SimpleBar - causing faling resolving component SfScrollable
- SfScrollable
🚨 issues with globally registered component
maybe this will be helpful -> vuejs/rfcs#29
import { createApp } from 'vue' createApp().mount({}, '#app')
- SfAccordion
- SfBottomNavigation
- SfCarousel
- SfContentPages
- SfFooter
- SfGroupedProduct
- SfHeader
- SfMegaMenu
- SfSelect
- SfSteps
- SfStoreLocator
- SfTable
- SfTabs
- SfHero
- SfList
Issues with mobile-observer.js
, method isMobile
is not working
- SfBanner
- SfSlidingSection
- SfContentPages
- SfFooter
- SfGroupedProduct
- SfHeader
Implement <Teleport>
- SfOverlay - remove staticClass, className
- SfSidebar - remove unused fn with
$vnode
- SfModal
Issue with dynamic directive argument v-slot:[name]
- SfBannerGrid
🚨Issue with import vue2-leaflet
- SfStoreLocator
Issue with with import hammerjs
- SfSlidingSection
Issue with this.$refs
- SfCarousel
- SfGallery
- SfGroupedProduct
- SfHeader
- SfHero
- SfModal
- SfScrollable
- SfSidebar
- SfSlidingSection
- SfSlidingSection
- SfStoreLocator
- SfSelect
Change transition to transition-group
- SfProductCard
- SfLoader
Issue with const observer = new MutationObserver()
- SfScrollable
[TODO] Test after component fixes
EXAMPLES:
- Cart
- Category
- Checkout
- Error
- Home
- Login & Sign in
- My account
- Product
- Static
- Thank you
Tested components
ATOMS:
- 👍SfBreadcrumbs
- 👍SfBullets
- 👍SfChevron
- 👍SfDivider
- 👍SfHeading
- 👍SfPrice
- 👍SfProperty
- 👍SfRating
MOLECULES:
- 👍SfAlert
- 👍SfBar
- 👍SfCallToAction
- 👍SfCharacteristic
- 👍SfNotification
- 👍SfPagination
- 👍SfReview
- 👍SfProductOption
- 👍SfSection
- 👍SfSticky
ORGANISMS:
- 👍SfProductCardHorizontal
- 👍SfTopBar