BioPhoton / angular-star-rating

Star Rating Angular Component written in typescript, based on css only techniques.
MIT License
217 stars 86 forks source link

Upgrade to Angular 7.3 #109

Closed williamxsp closed 2 years ago

williamxsp commented 5 years ago

I'm submitting a...


[ ] Bug report  
[x] Feature request

Current behavior

Im trying to upgrade my system to angular 7.3 but angular-star-rating have some incompatibles peer dependencies (@angular/forms, @angular/core and rjxs)

How can I help you to upgrade these dependencies?

Minimal reproduction of the problem with instructions

``` ng update angular/core ````

Package "angular-star-rating" has an incompatible peer dependency to "@angular/forms" (requires "^4.0.0 || ^5.0.0" (extended), would install "7.2.8").
                  Package "angular-star-rating" has an incompatible peer dependency to "@angular/core" (requires "^4.0.0 || ^5.0.0" (extended), would install "7.2.8").
                  Package "angular-star-rating" has an incompatible peer dependency to "rxjs" (requires "^5.1.0", would install "6.4.0").
mac1253 commented 5 years ago

Would also like to see this upgraded to 7

HanumanthDB commented 5 years ago

I am also facing the same error..

almaz1213 commented 5 years ago

cannot find content of '~css-star-rating/scss/star-rating'

theHimanshuShekhar commented 5 years ago

Please upgrade to Angular v8.0.0 now

webcat12345 commented 5 years ago

after upgrading to 8, i get this

RROR in ./src/styles.scss (./node_modules/@angular-devkit/build-angular/src/angular-cli-files/plugins/raw-css-loader.js!./node_modules/postcss-loader/src??embedded!./node_modules/sass-loader/lib/loader.js??ref--13-3!./src/styles.scss)
Module build failed (from ./node_modules/sass-loader/lib/loader.js):

      @extend .star.direction-rtl;
             ^
      Compound selectors may no longer be extended.
Consider `@extend .star, .direction-rtl` instead.
See http://bit.ly/ExtendCompound for details.

    ╷
297 │       @extend .star.direction-rtl;
    │               ^^^^^^^^^^^^^^^^^^^
    ╵
  node_modules/css-star-rating/scss/_elements.scss 297:15  root stylesheet
      in /home/rango/Desktop/ruben/hirescapes-front-end/node_modules/css-star-rating/scss/_elements.scss (line 297, column 15)
harsh-pamnani commented 5 years ago

@webcat12345 I am also facing the same issue. Did you find any solution for this?

webcat12345 commented 5 years ago

Just import this @import "~css-star-rating/css/star-rating.min.css"; not scss mixins. Also you need to override classes to make your own style. Functions won't work.

Something like this.

.rating.color-negative .star-container .star {
  svg {
    fill: #f18f01 !important;
  }
  i {
    color: #f18f01 !important;;
  }
}

.rating.color-ok .star-container .star {
  svg {
    fill: #f18f01 !important;;
  }
  i {
    color: #f18f01 !important;;
  }
}

.rating.color-positive .star-container .star {
  svg {
    fill: #f18f01 !important;;
  }
  i {
    color: #f18f01 !important;;
  }
}

.rating.color-default .star-container .star {
  svg {
    fill: #f18f01 !important;;
  }
  i {
    color: #f18f01 !important;;
  }
}
harsh-pamnani commented 5 years ago

Ok. Thank you so much. I will try with the solution you provided.

ProtocolNebula commented 5 years ago

Same error (upgraded from angular 6 to 8).

I tried to fix it but scss files need a "full rewrite", I hope the maintainer would fix it (I'm using .scss vars as supposed to work). In fact, if you use angular 8+ but angular-cli 6, it compiles successfully, which is a bit strange.

After try fixs, new scss versions generate an almost infinite loop or a 450KB file in the best cases.

EDIT: To generate the file even with a big size execute (nodejs 13+): ./node_modules/sass/sass.js path/to/your/star-rating.scss > star-rating.min.css

And after includes the file (not tested).

barryam3 commented 4 years ago

This is blocked by BioPhoton/css-star-rating#44 which I have submitted a fix for (BioPhoton/css-star-rating#47) so here's hoping @BioPhoton accepts it. He doesn't seem to have been very active as of late.

billyjov commented 2 years ago

Done!