Code Monkey home page Code Monkey logo

vue-flagpack's People

Contributors

daoneandonly avatar dependabot[bot] avatar fredericbonnet avatar noudadrichem avatar zoeyfrisart avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

vue-flagpack's Issues

Flag component isnt individually exported

import { Flag } from 'vue-flagpack'

Please check all that apply

  • visual bug
  • functional bug
  • able to consistently reproduce

Expected Behavior

The Flag component gets exported and I am able to use it individually.

Current Behavior

Flag is undefined as it is not exported

Possible Solution

Add an export for the flag in the module.exports

Steps to Reproduce

  1. Try the Import straight away example

Screenshots

Logs

Context

I am trying to lazily load the flags in.

Your Environment

  • Version used: 1.01
  • Browser Name and version: Firefox 90.0b
  • Operating System and version (desktop or mobile): Windows 10 Desktop
  • Link to your project: None

Vue 3 support

Detailed Description

Is your feature request related to a problem? Please describe.

A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

Describe the solution you'd like

A clear and concise description of what you want to happen.

Describe alternatives you've considered

A clear and concise description of any alternative solutions or features you've considered.

Additional context

Add any other context or screenshots about the feature request here.

Doesn't work in Nuxt.js (SSR)

Please check all that apply

  • visual bug
  • functional bug
  • able to consistently reproduce

Expected Behavior

Importing Flagpack as a plugin should work.

Current Behavior

I get an error: Unexpected token '<'.

Possible Solution

This might be related with the SSR mode

Steps to Reproduce

  1. Create a nuxt project and select SSR mode, Node.js hosting
  2. yarn add vue-flagpack
  3. create plugins/vue-flagpack.js and paste Method A from the docs
  4. Add it in the plugins array in nuxt.config.js like: plugins: ["~/plugins/vue-flagpack.js"]

Screenshots

image

Logs

See screenshot.

Context

I'm trying to add flags to a lang switcher, based on @nuxtjs/i18n.

Your Environment

  • Version used: "vue-flagpack": "^1.0.1"
  • Browser Name and version: Opera GX (Opera 73)
  • Operating System and version (desktop or mobile): Windows 10 x64
  • Nuxt: "nuxt": "^2.14.12",
  • Link to your project: Private Gitlab repo

Vue 3

Are there plans for Vue 3 support at some point? Currently getting these warnings.

image

Size prop documentation - [Vue warn]: Invalid prop: custom validator check failed for prop "size"

Please check all that apply

  • visual bug
  • functional bug
  • able to consistently reproduce

Expected Behavior

Component should set the flag size without showing Vue warnings

Current Behavior

[Vue warn]: Invalid prop: custom validator check failed for prop "size"

Possible Solution

The documentation shows "L', "M", "S" (all upper-case) as possible values for the size prop, however the validator checks for lower-case letters:

Flag.vue: line 32

28: size: {
29:   type: String,
30:   default: 'm',
31:   validator: value => (
32:     ['s', 'm', 'l'].indexOf(value) !== -1
33:   ),
34: }

There are two possible solutions:

  1. Change the documentation to reflect the fact that only lower-case values are accepted
  2. Change the validator to accept upper-case letters as well, either by adding the upper-case letters to the array: ['s', 'm', 'l', 'S', 'M', 'L'], or, by changing the input value to lower-case ['s', 'm', 'l'].indexOf(('' + value).toLowerCase())

Steps to Reproduce

  1. Set the flag size value as a capital S: <v-flag code="US" size="S" />

Logs

vue.runtime.esm.js?2b0e:619 [Vue warn]: Invalid prop: custom validator check failed for prop "size".
found in
---> <Flag>
       <VForm>
         <VCard>
           <Pages/user/profile.vue> at pages/user/profile.vue
             <Nuxt>
               <VMain>
                 <VApp>
                   <Default> at layouts/default.vue
                     <Root>

Your Environment

  • Version used: 1.0.1
  • Browser Name and version: Chrome Version 91.0.4472.114 (Official Build) (x86_64)
  • Operating System and version (desktop or mobile): MacOS desktop

Support for flagpack-core 2.0.0

Hi,

We are eager to work with the new version of flagpack core, main reason being the support for three shaking. Any chance changing the Vue library to support version 2.0 is on your roadmap?

Thanks in advance.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.