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

Feature/loader romans #250

Merged
merged 27 commits into from
Nov 1, 2017
Merged

Feature/loader romans #250

merged 27 commits into from
Nov 1, 2017

Conversation

romaninsh
Copy link
Member

@romaninsh romaninsh commented Oct 28, 2017

Some refactoring, better test, cleanups:@

  • Added LoaderShim class. Not sure 100% we want it like that though. Will probably change it back.

  • Added testing of reloadability inside and outside of loader.

  • Added test for nested loaders

  • Loader itself now have 'ui segment', which you can change if you wish.

  • Loader itself is reloaded, not a nested element.

  • Loader will reload itself unless jsLoad is called()

  • added ViewTester - really nice component for testing reload-ability.

@romaninsh romaninsh requested a review from ibelar October 28, 2017 12:22
@romaninsh
Copy link
Member Author

romaninsh commented Oct 28, 2017

I'm experiencing this weird behaviour:

Watch the last counter reset to 100ms with one extra reload.

kapture 2017-10-28 at 16 19 33

The other mystery is why that last loader MUST take at least 5 seconds to load, but spinner dissapears after 3 s only.

@codecov
Copy link

codecov bot commented Oct 28, 2017

Codecov Report

❗ No coverage uploaded for pull request base (feature/loader@8052a6b). Click here to learn what that means.
The diff coverage is 55.88%.

Impacted file tree graph

@@                Coverage Diff                @@
##             feature/loader     #250   +/-   ##
=================================================
  Coverage                  ?   72.89%           
  Complexity                ?     1072           
=================================================
  Files                     ?       60           
  Lines                     ?     2586           
  Branches                  ?        0           
=================================================
  Hits                      ?     1885           
  Misses                    ?      701           
  Partials                  ?        0
Impacted Files Coverage Δ Complexity Δ
src/FormField/Textarea.php 0% <0%> (ø) 4 <0> (?)
src/FormLayout/Columns.php 0% <0%> (ø) 12 <0> (?)
src/Loader.php 0% <0%> (ø) 9 <7> (?)
src/Exception/NoRenderTree.php 0% <0%> (ø) 2 <0> (?)
src/Button.php 81.81% <0%> (ø) 8 <0> (?)
src/FormField/Generic.php 91.66% <0%> (ø) 6 <0> (?)
src/Template.php 67.85% <0%> (ø) 82 <0> (?)
src/Columns.php 84% <0%> (ø) 10 <0> (?)
src/jsExpression.php 83.54% <0%> (ø) 36 <0> (?)
src/FormField/Input.php 98.38% <100%> (ø) 29 <0> (?)
... and 25 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 8052a6b...e6f3597. Read the comment docs.

src/Loader.php Outdated
@@ -39,8 +39,9 @@ public function init()
parent::init();

if (!$this->shim) {
$this->shim = ['View', 'class' => ['padded segment'], 'style' => ['min-height' => '7em']];
$this->shim = ['View', 'class' => ['ui active centered inline loader']];
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sometimes this shows double-loader. Also if we disable auto-load this shows loading indicator even though it's not loading.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm ok leaving this for now like this.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

rolled back

Copy link
Contributor

@ibelar ibelar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good work!

@romaninsh romaninsh merged commit 71be9d7 into feature/loader Nov 1, 2017
@romaninsh romaninsh deleted the feature/loader-romans branch November 1, 2017 10:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants