Migrate to 3.0
Please follow the migration guides from matestack-ui-core and matestack-ui-vuejs first!
You can go through the dummy app to review the result of the miration here The dummy app was updated to Matestack 3 and Rails 7
JavaScript setup changed
Below you see the new version of mounting the Vue.js v3 driven matestack-ui-vuejs package with notes on how to add matestack-ui-bootstrap on top:
app/javascript/packs/application.js
import "./stylesheets/application.scss"; // add this
import { createApp } from 'vue'
import MatestackUiVueJs from 'matestack-ui-vuejs'
import MatestackUiBootstrap from 'matestack-ui-bootstrap' // add this
const appInstance = createApp({})
MatestackUiBootstrap.registerComponents(appInstance) // add this
document.addEventListener('DOMContentLoaded', () => {
MatestackUiVueJs.mount(appInstance)
})ChartJs component (and any custom component) $refs definition and usage:
Defining Vue.js refs has changed:
app/matestack/components/chart_js.rb
app/matestack/components/chart_js.js
More migration steps for ChartJs component required, see below!
Flatpickr component (and any custom component) $el usage
app/matestack/components/form/flatpickr.js
More migration steps for Flatpickr component required, see below!
Custom component (including ChartJs/Flatpickr) integration
The custom component defintion and integration has changed. Below you see on the example of the ChartJs component, what needs to be changed:
app/matestack/components/chart_js.js
and then in your application.js file:
Admin template class
Matestack::Ui::Bootstrap::Apps::AdminTemplateis nowMatestack::Ui::Bootstrap::Layouts::AdminTemplate
--> Search & Replace
Manually including the registry is not longer required
include Matestack::Ui::Bootstrap::Registrycan now be removed as it the component will be automatically available when installingmatestack-ui-bootstrap
Last updated