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

implements lazy loading for glyphs - AP-101 #311

Merged
merged 5 commits into from
Nov 26, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion components/tailored/marketplace/glyphs/Glyphs.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

<script lang="ts">
import Vue from 'vue'
// @ts-nocheck
import { mapState } from 'vuex'
import { ChevronLeftIcon } from 'satellite-lucide-icons'
import { marketGlyphs } from '~/mock/marketplace'
Expand Down
27 changes: 21 additions & 6 deletions components/tailored/messaging/enhancers/glyphs/Glyphs.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,31 @@
type="primary"
/>
</div>
<TailoredMessagingEnhancersGlyphsNav @navSelected="(val) => {filter(val)}"></TailoredMessagingEnhancersGlyphsNav>

<TailoredMessagingEnhancersGlyphsNav
@navSelected="(val) => {filter(val)}"
></TailoredMessagingEnhancersGlyphsNav>
<div class="glyph-content hidden-scroll">
<UiScroll verticalScroll scrollbarVisibility="scroll" class="glyph-content">
<TailoredMessagingEnhancersGlyphsMostUsed></TailoredMessagingEnhancersGlyphsMostUsed>
<TailoredMessagingEnhancersGlyphsPack
v-for="pack in filteredGlyphs"
:key="pack.id"
:pack="pack"
></TailoredMessagingEnhancersGlyphsPack>

<div v-for="(pack, i) in filteredGlyphs">
<v-responsive max-height="100%">
<v-lazy
v-model="pack.isActive"
:options="{
threshold: .5
}"
min-height="50"
transition="fade-transition"
>
<TailoredMessagingEnhancersGlyphsPack :key="pack.id" :pack="pack">
</TailoredMessagingEnhancersGlyphsPack>
</v-lazy>
</v-responsive>
</div>
</UiScroll>
</div>

<TailoredMessagingEnhancersGlyphsItemInfo></TailoredMessagingEnhancersGlyphsItemInfo>
</div>
1 change: 1 addition & 0 deletions nuxt.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ export default defineNuxtConfig({
{ src: '~/plugins/thirdparty/multiselect.ts' },
{ src: '~/plugins/thirdparty/v-calendar.ts' },
{ src: '~/plugins/thirdparty/videoplayer.ts' },
{ src: '~/plugins/thirdparty/vuetify.ts' },
// Local
{ src: '~/plugins/local/classLoader.ts' },
{ src: '~/plugins/local/notifications.ts', mode: 'client' },
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@
"@nuxt/bridge": "npm:@nuxt/[email protected]",
"@nuxt/types": "^2.15.3",
"@nuxtjs/eslint-module": "^3.0.2",
"@nuxtjs/vuetify": "^1.12.1",
"@types/ed2curve": "^0.2.2",
"@types/elliptic": "^6.4.13",
"@types/jest": "^27.0.3",
Expand Down
6 changes: 6 additions & 0 deletions plugins/thirdparty/vuetify.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import Vue from 'vue'
import Vuetify from 'vuetify'

Vue.use(Vuetify)

export default new Vuetify