#117 Fix #100 - Show loader when data loads
Opened by akashbhave. Modified
akashbhave/Fedora-app master  into  master

Download 117.patch

Description

Add loader to the Magazine, Calendar, and Ask pages. The loader is displayed with the LoaderComponent. The state of the loader is controlled with the variable loadingResults. This value is changed to true when the data loads, and false when the data finishes loading.


Related Issues

#100

thelittlewonder commented

Please create an angular component for the loader rather than rewriting the markup repeatedly.

rebased onto d2ec679c87836c7213ca412e2c127267ee018f9e

My apologies, I didn't realize you wanted this to be a part of an Angular component. I updated my commit so that it now utilizes the LoaderComponent.

thelittlewonder commented

I can't find the CSS of loader. Did you forget to include it?

The CSS of the loader is in the app.scss file. Should I move it to another folder?

thelittlewonder commented

Yes. Create a new file and Move it to the same component folder :)

rebased onto f0155c93d6dc8ab7e4930c96b6f5bf1a8d3747e8

OK, I updated my commit with the changes.

thelittlewonder commented

hide the loader when the carousel images have been loaded since they take more time than the posts.

rebased onto 6b7f7e0fe714d70439b86343665bdaff12d639ec

Fixed. The loader now only shows when the blog posts are loading.

thelittlewonder commented

Use only one instance of the loader and that only on the top of the carousel images

thelittlewonder commented

Use only one instance of the loader.

thelittlewonder commented

hide loader when the images are done being fetched

thelittlewonder commented

@akashbhave

I guess there is a little confusion.
So there are 3 things happening on the homepage:
1. Images are fetched and shown in a slideshow at the top.
2. Social Media Feed is being fetched.
3. Blog Posts are being fetched.

We want to show/hide the loader when the 1. is done because images are of more size so if we hide the loader once all images have been loaded, social media posts and blog posts must have been fetched already since they are small in size.

I hope this makes sense.

Oh got it, so you want me to show the loader only when the updateImages() function is called.

rebased onto 591ed845a3a5e88489498682bab94bb215f51b1b

@thelittlewonder Updated commit.

rebased onto 5d8cad9891c7c7d2b142e5aac21b96638562fe0e

thelittlewonder commented

Looks good to me!

Metadata