tiki-deprecated / apps-receipt-capacitor

https://receipt-capacitor.mytiki.com/
MIT License
2 stars 0 forks source link

Remove 3rd-party Vue components and libraries #66

Closed mike-audi closed 1 year ago

mike-audi commented 1 year ago

Remove any Vue libraries/components that require installation. Either rebuild this functionality with custom components in the project, or use pure JS libs.

Reason: this is a library that companies will put in their apps —these dependencies can create all sorts of conflicts and issues since we do not know what they may or may not have already installed to their Vue App.

Example:

export default {
  /**
   * Installs the {@link TikiReceipt} component and {@link TikiService} onto the Vue app.
   * @param app - The Vue app instance.
   * @param config - The configuration settings.
   */
  install: (app: App, config: Config) => {
    app.component("TikiReceipt", TikiReceipt);
    app.component("v-select", vSelect);
    app.provide("Tiki", new TikiService(config));
    app.use(Vue3TouchEvents);
  },
};

app.component("v-select", vSelect); and app.use(Vue3TouchEvents); should be removed.

MiroBenicio commented 1 year ago

Did some research about build the custom select component.

@mike-audi look at this following plugin:

https://github.com/bluzky/nice-select2

what do you think about use it? can I do?

If not, I will build or own component.

MiroBenicio commented 1 year ago

@mike-audi Also did some research for other libs in project and save some material to build or own feature. Look the list above below and tell me what do you think about build that.

Vue-Markdown-render (Implement the parser in the javascript-sdk) — https://randyperkins2k.medium.com/writing-a-simple-markdown-parser-using-javascript-1f2e9449a558https://betterprogramming.pub/create-your-own-markdown-parser-bffb392a06dbhttps://sarvasvkulpati.com/blog/markdown-parserhttps://css-tricks.com/parsing-markdown-into-an-automated-table-of-contents/

Vue3-carousel — https://www.youtube.com/watch?v=rZQ72SFGYwkhttps://dev.to/luvejo/how-to-build-a-carousel-from-scratch-using-vue-js-4ki0https://www.freecodecamp.org/news/how-to-design-and-build-a-carousel-feature-in-vuejs-125f690a3a9e/https://medium.com/@marcusmichaels/how-to-build-a-carousel-from-scratch-in-vanilla-js-9a096d3b98c9

The Vue3-touch-events: Intend to use the touch events of the vue and configure a custom event for Close the UI instead use the package.

mike-audi commented 1 year ago

I think we should create stories and focus on Vue3-touch-events and v-select.

The library (https://github.com/bluzky/nice-select2) that you linked looks good to me!


The markdown and carousel do not require installing the plugins on primary App, so the chances of conflicts and dependency issues are very low.

For markdown, if we do want to switch, check out: https://github.com/tiki/tiki-sdk-js/blob/main/src/ui/utils/nano-md.ts

For the carousel, if you do decide to build your own, I think it would be a lot faster and easier to do so in Vue instead of vanilla JS.

MiroBenicio commented 1 year ago

continues in #67 continues in #126