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 visibility #177

Merged
merged 2 commits into from
Jun 9, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 15 additions & 1 deletion css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ button.button-inline:hover {
color: #333333;
position: relative;
z-index: 120;
height: 44px;
min-height: 44px;
display: flex;
align-items: center;
font-size: 14pt;
Expand All @@ -154,6 +154,14 @@ button.button-inline:hover {
padding: 7px;
}

#app-navigation-toggle {
position: relative;
top: 0px;
width: 44px;
height: 44px;
cursor: pointer;
}

.board-header-controls {
margin-left: auto;
align-items: center;
Expand Down Expand Up @@ -902,6 +910,12 @@ button.button-inline:hover {
}
}

@media (max-width: 768px) {
#app-navigation-toggle {
display: none !important;
Copy link
Contributor

Choose a reason for hiding this comment

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

@juliushaertl didn't you mention somewhere that navigation toggle should be available on mobile as well?

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 think we could dispense with navigation bar completely if we move all buttons/controls into board view.

Copy link
Member

Choose a reason for hiding this comment

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

Yes let's add it to mobile as well, since otherwise it is not possible to access archived boards there.

Copy link
Member

Choose a reason for hiding this comment

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

One more thing that needs to be fixed is that the button should also be visible on the boards list overview ;)

}
}

/**
* Markdown rendering
*/
Expand Down
4 changes: 4 additions & 0 deletions js/controller/AppController.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ app.controller('AppController', function ($scope, $location, $http, $route, $log
$rootScope.sidebar = {
show: false
};
$rootScope.navibar = {
show: true
Copy link
Contributor

Choose a reason for hiding this comment

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

Any chance we could animate this?

Copy link
Member Author

Choose a reason for hiding this comment

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

@pixelipo I have tried to animate it like files but I didn't found how it works in files.

It was my fist try :(

Copy link
Contributor

Choose a reason for hiding this comment

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

They have a different approach - They are using CSS to move (translate) the main container (right one) over the navigation pane :)

Copy link
Member

Choose a reason for hiding this comment

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

Maybe we can just use the same mechanism as in files. 😉

};
$scope.sidebar = $rootScope.sidebar;
$scope.navibar = $rootScope.navibar;
$scope.user = oc_current_user;
});
2 changes: 1 addition & 1 deletion templates/main.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@

<div id="app" class="app-deck" data-ng-app="Deck" ng-controller="AppController" ng-cloak>

<div id="app-navigation" data-ng-controller="ListController" ng-init="initSidebar()">
<div id="app-navigation" data-ng-controller="ListController" ng-init="initSidebar()" ng-if="navibar.show">
<?php print_unescaped($this->inc('part.navigation')); ?>
<?php /* print_unescaped($this->inc('part.settings')); */ ?>
</div>
Expand Down
1 change: 1 addition & 0 deletions templates/part.board.mainView.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
</div>

<div id="board-header">
<div id="app-navigation-toggle" class="icon-menu" ng-click="navibar.show=!navibar.show"></div>
<a class="crumb" href="#" title="<?php p($l->t('All Boards')); ?>">
<i class="icon icon-home"></i>
<span class="hidden-visually"><?php p($l->t('All Boards')); ?></span>
Expand Down