Giter VIP home page Giter VIP logo

content-loader's People

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  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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

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

content-loader's Issues

"height" and "width" inputs removed in 5->6 and not documented as a breaking change

I'm submitting a...


[ ] Regression (a behavior that used to work and stopped working in a new release)
[ ] Bug report  
[ ] Performance issue
[ ] Feature request
[x] Documentation issue or request
[ ] Support request
[ ] Other... Please describe:

Current behavior

We're in the process of upgrade from Angular 12 to 14, and are also upgrading our dependencies to the latest versions. We were using v4 of content loader, and bumped to v7. We're seeing build failures due to the use of the "height" and "width" inputs, which after investigating the code, were removed in v6. This breaking change was not documented, nor is an alternative suggested, so we will need to figure out how to maintain the expected behaviour without the benefit of documentation.

Expected behavior

Breaking changes to component inputs are documented and alternatives are potentially suggested, where reasonable.

Minimal reproduction of the problem with instructions

Use the <content-loader> component and attempt to set [height] and/or [width] inputs.

What is the motivation / use case for changing the behavior?

An undocumented breaking change makes for a poor developer experience when upgrading libraries.

Environment


Angular version: 14.2.0

Browser: N/A
 
For Tooling issues:
- Node version: 16.16.0
- Platform:  Linux

Others:
This is an Nx environment, fwiw, but that generally has no effect on 

Angular 9 support

Is there any change that you can add Angular 9 support? Would be very pleased if you do so.

Issue with window.location.pathname

Thanks for the fantastic library! I came across an issue with it, and hopefully the below provides a solution too:

I'm submitting a...


[ ] Regression (a behavior that used to work and stopped working in a new release)
[x] Bug report  
[ ] Performance issue
[ ] Feature request
[ ] Documentation issue or request
[ ] Support request
[ ] Other... Please describe:

Current behavior

When using queryParams in an Angular project, window.location.pathname is not sufficient to determine the URL. SVGs appear black in Safari as a result.

Expected behavior

SVGs should display as normal in Safari, even when using queryParams.

Minimal reproduction of the problem with instructions

A new Angular project, with content-loader installed, and a single route. Add a queryParameter to the end of the URL, and the SVG will no longer load.

What is the motivation / use case for changing the behavior?

Fix a bug

Environment


Angular version: Any

Browser:
- [ ] Chrome (desktop) version XX
- [ ] Chrome (Android) version XX
- [ ] Chrome (iOS) version XX
- [ ] Firefox version XX
- [x] Safari (desktop) version XX
- [ ] Safari (iOS) version XX
- [ ] IE version XX
- [ ] Edge version XX
 
Others:
The following fork includes a commit which appears to fix this issue:

https://github.com/timminss/content-loader

Feature: e2e and Unit-Tests

I recommend adding some basic unit and e2e tests maybe together with sauce labs to test different browsers and platforms.

can find module @netbasal/content-loader

Hi !
First of all tks for this module.
But I am facing an issue since weeks.
After installing the module I am getting a cant find module error when I try to build with prod option.

baseUrl input not present

This is related to #36 and or a continuation of it since it got closed.
I still do not see this working even with doing the what your link in #36 says
Things I tried:
Removing completely which then angular 8 (not sure about previous versions) gives this
Error: No base href set. Please provide a value for the APP_BASE_HREF token or add a base element to the document.

I provide the APP_BASE_HREF in the module which gets the error gone but the svgs still are not being renderd.

I think the proper solution is an @input() for the base url property which is what this added.
danilowoz/react-content-loader#93

Without baseUrl it seems cannot have the <base href="/"> which Angular 8 seems to complain about it not being there.
Unless I am missing something?

Thoughts?

How to provide a skeleton definition file path to content-loader


[ ] Regression (a behavior that used to work and stopped working in a new release)
[ ] Bug report  
[ ] Performance issue
[ ] Feature request
[ ] Documentation issue or request
[x] Support request
[ ] Other... Please describe:

Current behavior

I would like to extract all svg definition from the template to a "skeleton library file" so as to keep my template as clean as possible and let the skeleton library file take care of the skeleton definitions.

I guess I am looking for similar behaviour as the <use> element in <svg> with ahrefattribute that could be the location of my skeleton definition in the library file.

Expected behavior

Ultimately I would only add the content-loader and props into my template, something like :

 <content-loader
      [viewBox]="viewBox"
      baseUrl="pathToMyFile.svg#{{ icon }}"
    >
    </content-loader>

The "skeleton library file" would contain a list of skeleton definition for ex :

<svg:rect id="skeleton-one" x="0"
                y="0"
                rx="4"
                ry="4"
                width="60"
                height="20" />

Minimal reproduction of the problem with instructions

What is the motivation / use case for changing the behavior?

Is there any way to get that abstraction to separate the skeleton definition from the template ?

Environment


Angular version:14.0.3


Browser:
- [x] Chrome (desktop) version 108.0.5359.94
- [ ] Chrome (Android) version XX
- [ ] Chrome (iOS) version XX
- [ ] Firefox version XX
- [ ] Safari (desktop) version XX
- [ ] Safari (iOS) version XX
- [ ] IE version XX
- [ ] Edge version XX
 

Internet Explorer doesn't interpret loader correctly

The content-loader displays just fine in Chrome, but has a way different and unexpected behaviour in IE 11.
The Loader shrinks to a 3x3 cm area where there should be a loader covering the whole page, 20x20cm and bigger.
Internet Explorer Version: 11.0.9600.19080

Named router outlet

I'm submitting a...


[*] Bug report  

Current behavior

Named router outlet pathnames (with double slash) reproduce same issue with black rendered svg

Environment


Angular version: 8.2.8


Browser:
- [*] Chrome (desktop) version 77

Others:

Latest version of lib is not on NPM

I'm submitting a...


[ ] Regression (a behavior that used to work and stopped working in a new release)
[ ] Bug report  
[ ] Performance issue
[ ] Feature request
[ ] Documentation issue or request
[x] Support request
[ ] Other... Please describe:

I saw that on github latest version of ngx-content-loader lib is 7.0.0, but on NPM the latest version is 3.0.0. @NetanelBasal can you publish the latest version on NPM?

feat: Angular 8 support

If don't have time to do this let me know and I can take a look into getting dependencies updated.

Two packages/actual package not working with localhost

I am really confused when it comes to the two packages.
These both exist in NPM:
image
It looks like you published to ngx-content-loader. However, this one does not work for me it seems? but content-loader does.

How I am using it:

        <content-loader>
          <svg:rect x="0" y="0" rx="3" ry="3" width="100%" height="10" />
          <svg:rect x="20" y="20" rx="3" ry="3" width="100%" height="10" />
          <svg:rect x="20" y="40" rx="3" ry="3" width="100%" height="10" />
          <svg:rect x="0" y="60" rx="3" ry="3" width="100%" height="10" />
          <svg:rect x="20" y="80" rx="3" ry="3" width="100%" height="10" />
          <svg:rect x="20" y="100" rx="3" ry="3" width="100%" height="10" />
        </content-loader>

It seems like the old one /content-loader for the clip-path has something like clip-path="url(#uy19jgwmh8a)" but for the latest version of the ngx-content-loader one it puts in http:// in it like so clip-path="url(https://ngx-content-loader.stackblitz.io/#u5gh7bxo95n)" <--- did this via stackblitz which your example is not using latest version either by the way.

It seems this maybe a localhost issue where the svg is not rendering with localhost?
Seems this issue is related:
#28

I feel like the clip-path can just be the id? not really sure though I do not know much about how this works so hoping you will have more insight.

thoughts on this?

Not working if URL has query params

Hello guy's I am using this package to show the reactive content loader, I made an simple example on stackblitz which show the reactive content, please check below URL's

https://stackblitz.com/edit/reactive-contentloader

Also please check the output URLs below, the output URL 1 will display the content loader while the output URL 2 does not, I figure out this is because of query string parameter, if I remove the query string and reload the page it shows the content loader. How can I fix this issue.

Output :

https://reactive-contentloader.stackblitz.io/
https://reactive-contentloader.stackblitz.io/?q=hello

Safari renders a black block when used in any route different than '/'

In routes different than home page - '/' all of loaders are black blocks. This happens only in safari - desktop and mobile.

I reproduced this bug in posted demo app. I upgraded the lib version to 2.0.0

The same is happening in my application using angular 7.

https://ngx-content-loader-hqrrey.stackblitz.io - this works fine
https://ngx-content-loader-hqrrey.stackblitz.io/route - this is broken

link to editor:
https://stackblitz.com/edit/ngx-content-loader-hqrrey

Update @netbasal/content-loader peer dependencies to angular 7

Hi,
ngx-content-loader works fine on angular 7, but it would be great to update his peer dependencies to angular 7 to avoid npm warnings.

npm WARN @netbasal/[email protected] requires a peer of @angular/common@^6.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN @netbasal/[email protected] requires a peer of @angular/core@^6.0.0 but none is installed. You must install peer dependencies yourself.

Ideally, others npm packages use corresponding package version with angular aka:
[email protected] for angular 7 or [email protected] for angular 6

Thx !

AOT not supported

The library fails to build when an angular application is built with AOT (https://angular.io/guide/aot-compiler) enabled (such as --prod setup with the angular cli). The following error occurs:

ERROR in ./node_modules/@netbasal/content-loader/content-loader.ngfactory.js
Module not found: Error: Can't resolve 'content-loader' in '/path/to/application/node_modules/@netbasal/content-loader'

Angular6

Hi,
Would it be possible to create a new version with upgraded dependencies now that angular6 has been released?
Maybe keep 1.0.2 for Angular5 and have 1.6.0 for Angular6 (Or something that indicate the dependency or angular 6)

Content Loader render black block of svg

I've made an example on CodeSandbox
It will render normal if the url don't have the query params.

image

But when have any query params, it will show black block instead of svg we need.
Please see the image below.
image
It's happen on safari
Thanks!

error when run ng build --prod ANGULAR 5

ERROR in ./node_modules/@netbasal/content-loader/content-loader.ngfactory.js
Module not found: Error: Can't resolve 'content-loader' in '/Users/fernandolucasgontijo/Documents/Nagro/frontend/node_modules/@netbasal/content-loader'

Add README in npm page

Seems like you missed to include the README.md when you ran npm publish so the npm page of the library shows an empty description. This is a problem I just caught within the ng-lib-schematics you used to generate the library. I'll open a PR adding that to the build workflow. For now I suggest you to create a new patch version and manually include README.md inside dist, then publish the new version.

screen shot 2018-04-02 at 12 47 30 am

As mentioned here having a proper README in the npm registry is good to appear on npm searches, and I guess that ranks your library as well in search engines.

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.