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

Toggle navibar on mobile #190

Merged
merged 2 commits into from
Jun 19, 2017
Merged

Toggle navibar on mobile #190

merged 2 commits into from
Jun 19, 2017

Conversation

artemanufrij
Copy link
Member

Signed-off-by: Artem Anufrij artem.anufrij@live.de

@artemanufrij
Copy link
Member Author

fix for #185

@artemanufrij artemanufrij added this to the 0.2.0 milestone Jun 16, 2017
@artemanufrij artemanufrij self-assigned this Jun 16, 2017
@codecov
Copy link

codecov bot commented Jun 16, 2017

Codecov Report

Merging #190 into master will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master     #190   +/-   ##
=======================================
  Coverage   76.56%   76.56%           
=======================================
  Files          33       33           
  Lines         973      973           
=======================================
  Hits          745      745           
  Misses        228      228

@juliusknorr
Copy link
Member

2017-06-17-102112_765x49_scrot

  • New stack button has lost some padding
  • The menu toggle button doesn't look centered to the home icon / board title
  • The toggle button should also show up on desktop systems, as it was before

Apart from that 👍

@artemanufrij
Copy link
Member Author

artemanufrij commented Jun 17, 2017

The menu toggle button doesn't look centered to the home icon / board title

I have same position like files and I know its not perfect but its have same look

@artemanufrij
Copy link
Member Author

@juliushaertl

  • 'new stack' has same margin/padding as before
  • fixed: toggle in desktop mode

});

$('#app-navigation-toggle').click(function(){
if($(window).width() > 768) {
Copy link
Contributor

Choose a reason for hiding this comment

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

remove this if, since the toggle should always be visible - then you won't need !important in CSS

Copy link
Member Author

Choose a reason for hiding this comment

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

it for different behavior. on mobile devices app-content will be moved to the right. on desktop app-navigation will be hide.

Copy link
Contributor

Choose a reason for hiding this comment

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

does it even work, @artemanufrij ? Look at the next line toggle('hidde') is not correct 😉

Copy link
Member Author

Choose a reason for hiding this comment

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

it works fine....

@@ -62,7 +62,8 @@
<?php print_unescaped($this->inc('part.navigation')); ?>
<?php /* print_unescaped($this->inc('part.settings')); */ ?>
</div>
<div id="app-content" ng-class="{ 'details-visible': sidebar.show }" ui-view>
<div id="app-content" ng-class="{ 'details-visible': sidebar.show }">
<div ui-view></div>
Copy link
Contributor

Choose a reason for hiding this comment

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

why do you need additional <div> here?

Copy link
Member Author

Choose a reason for hiding this comment

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

otherwise it doesn't work with core-functions

Copy link
Contributor

Choose a reason for hiding this comment

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

which function exactly? I tested locally and didn't find any errors.

Copy link
Member Author

Choose a reason for hiding this comment

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

the toggle button will be created by js.js from core (see line 1569) automatically. it works only if ui-view is in a separate div instead in app-content

Copy link
Contributor

Choose a reason for hiding this comment

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

Why do we create a DOM element using JS if it has to be present in 100% of cases? Seems like a waste of resources. cc @juliushaertl

Copy link
Member

Choose a reason for hiding this comment

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

@pixelipo This is part of the logic from core, so that apps don't need to care about adding this sidebar slide functionality. But since we use our own js code to toggle those of course we could also just keep the existing structure and add the toggle button to the template.

<i class="icon icon-home"></i>
<span class="hidden-visually"><?php p($l->t('All Boards')); ?></span>
</a>
<div id="controls">
Copy link
Contributor

Choose a reason for hiding this comment

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

please revert to previous version of this code. It was decided some time ago that it's a good approach. CHanges here are not needed to make toggle work.

I do agree with renaming #board-header to #controls

Copy link
Member Author

Choose a reason for hiding this comment

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

no, but it's same code like files

Copy link
Contributor

Choose a reason for hiding this comment

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

"same code as files" I remember that discussion from a different PR 😉 files also has a wrong. This is what is causing issue with positioning of icons mentioned by @juliushaertl

Copy link
Member

Choose a reason for hiding this comment

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

I remember we discussed that some times ago, yes, although I'm not sure what exactly the reason was for that. 🙈 Let's use our fixed approach, we can always go to the way files does it once it is implemented properly there.

<span class="hidden-visually"><?php p($l->t('All Boards')); ?></span>
</a>
<div id="controls">
<div class="breadcrumb">
Copy link
Contributor

Choose a reason for hiding this comment

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

same as above.

@juliusknorr juliusknorr mentioned this pull request Jun 19, 2017
3 tasks
css/style.css Outdated
@@ -173,7 +173,7 @@ button.button-inline:hover {

#app-navigation-toggle {
width: 45px;
Copy link
Contributor

Choose a reason for hiding this comment

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

this should be 44 as well

js/app/Run.js Outdated
@@ -63,9 +63,9 @@ app.run(function ($document, $rootScope, $transitions, BoardService) {

$('#app-navigation-toggle').click(function(){
if($(window).width() > 768) {
$('#app-navigation').toggle('hidde');
$('#app-navigation').toggle('hidden');
Copy link
Contributor

Choose a reason for hiding this comment

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

👍 that's what I was talking about :)

artemanufrij and others added 2 commits June 19, 2017 21:59
Signed-off-by: Artem Anufrij <artem.anufrij@live.de>
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants