Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Loading screen #52

Open
xy2z opened this issue May 4, 2019 · 14 comments
Open

Loading screen #52

xy2z opened this issue May 4, 2019 · 14 comments
Labels
enhancement New feature or request ui
Milestone

Comments

@xy2z
Copy link
Owner

xy2z commented May 4, 2019

When loading the app, show a nice loading "screen" untill Vue is complete.

@xy2z xy2z added the enhancement New feature or request label May 4, 2019
@calvinmorett
Copy link
Contributor

calvinmorett commented May 4, 2019 via email

@xy2z
Copy link
Owner Author

xy2z commented May 4, 2019

Awesome!
It needs to be light so it wont take longer for loading the page. I was thinking of using font awesome, since its already in use.

So i was thinking it could an absolute div floating over the app, maybe with some background opacity. And just a css animated loading icon, and maybe a loading text.

What ideas do you have?

@calvinmorett
Copy link
Contributor

calvinmorett commented May 4, 2019 via email

@calvinmorett
Copy link
Contributor

calvinmorett commented May 6, 2019

First of all, I would like to also include this because it's a easy, and is just plug-n-play so to speak. I've used it before and it's got some really interesting templates, that can fit for anything.

Include pace.js and a CSS theme of your choice, and you get a beautiful progress indicator for your page load and ajax navigation.

No need to hook into any of your code, progress is detected automatically.

https://github.hubspot.com/pace/docs/welcome/

--- Anyways, something I worked on quickly that might fit, 1kb in css - can be edited down some to go down in size a bit too.
https://codepen.io/CalvinMorett/full/vwYrJd

@xy2z
Copy link
Owner Author

xy2z commented May 6, 2019

This looks really nice! Is it using pace.js?
Altough this means we need 1kb of css and 5kb of pace.js (and a pace css theme?) to work...
But I feel like in the future we can also use Pace for when saving (notes, settings, etc.), since it works with ajax, so I'm up for seeing if it works as expected.

@calvinmorett
Copy link
Contributor

This looks really nice! Is it using pace.js?

This is just a rough idea, like I said there are a million. This isn't with pace.js

Altough this means we need 1kb of css and 5kb of pace.js (and a pace css theme?) to work...

Sorry, I was confusing in my write up. My css file there could probably be less than <1kb if I edited it down and merged some things. Though, I do think pace would be what you're looking for.

But I feel like in the future we can also use Pace for when saving (notes, settings, etc.), since it works with ajax, so I'm up for seeing if it works as expected.

I think it looks really clean, and it can integrate easily.

@xy2z
Copy link
Owner Author

xy2z commented May 6, 2019

But we still need pace.js to actually know how far the progress is, with your example? Or else the loading bar will just loop endlessly.

I think we should use pace.js, I can definitely see alot of uses for this.
Can you integrate the one you made with pace.js?

@calvinmorett
Copy link
Contributor

calvinmorett commented May 6, 2019 via email

@calvinmorett
Copy link
Contributor

calvinmorett commented May 7, 2019

https://codepen.io/CalvinMorett/full/eamPeO

CTRL + R to keep refreshing the animation. Let me know your thoughts.

Download: https://gist.github.com/calvinmorett/2d79962831b730be1d34732077d25281

@xy2z
Copy link
Owner Author

xy2z commented May 7, 2019

Looks good!
Does pace requires jquery? I'd prefer not to add it to the app, just for a loader.

@calvinmorett
Copy link
Contributor

No it doesn't. Link updated, JQuery removed.

@xy2z
Copy link
Owner Author

xy2z commented May 7, 2019

Good :) So it's ready to implement?
Feel free to submit a PR. If you have any questions don't hesitate to ask :)

@calvinmorett
Copy link
Contributor

calvinmorett commented May 7, 2019 via email

@xy2z
Copy link
Owner Author

xy2z commented May 7, 2019

Oh I just noticed the body css has background: #333, this should probably be removed or else it would affect the app? Can the background be set on .pace?

  1. Add the CSS file to public/css/loader.css
  2. Add pace script to https://github.com/xy2z/dopenote/blob/master/resources/views/app.blade.php (eg. line 13)
    And add the CSS in the styles section (line 8)
  3. Test :)

@xy2z xy2z added the ui label Sep 8, 2019
@xy2z xy2z added this to the v1.1 milestone Feb 21, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request ui
Projects
None yet
Development

No branches or pull requests

2 participants