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
Booting web UI in Material Design #1626
Conversation
@@ -0,0 +1,40 @@ | |||
<?xml version="1.0" encoding="utf-8"?> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not sure about the svg. I'd prefer to stick with a font like font-awesome, which is so much lighter
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We are using md-icon
, which is a wonderful solutions for using SVG icons. All SVG files will be merged into a single file and Angular Material will cache it with templateCache
.
The using of these icons is nearly the same as using an icon font. md-icon
will handle everything and we no longer need to include at least 3 font files (.svg, .woff, .ttf) as well as the icons that are not used.
The compatibility is not a problem for our project. Every browsers that supports AngularJS have already support SVG.
So I insist using SVG icons.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, I think I understand more. Its okay if the svg are concatenated.
What should be avoided is to include icons directly in git, we should rather use bower to fetch those icons in bower package.
This will need update of guanlecoja to support configuration of which icons we want in the bower section:
"material-design-icons":
version: "1.0.1"
files: [ "notification/svg/production/ic_system_update_48px.svg", "notification/svg/production/ic_more_48px.svg" ]
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good idea.
On Fri, Apr 10, 2015 at 8:26 PM Pierre Tardy notifications@github.com
wrote:
In www/md_base/src/icons/gear-outline.svg
#1626 (comment):@@ -0,0 +1,40 @@
+Ok, I think I understand more. Its okay if the svg are concatenated.
What should be avoided is to include icons directly in git, we should
rather use bower to fetch those icons in bower package.This will need update of guanlecoja to support configuration of which
icons we want in the bower section:"material-design-icons":
version: "1.0.1"
files: [ "notification/svg/production/ic_system_update_48px.svg",
"notification/svg/production/ic_more_48px.svg" ]—
Reply to this email directly or view it on GitHub
https://github.com/buildbot/buildbot/pull/1626/files#r28140177.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is also http://zavoloklom.github.io/material-design-iconic-font/icons.html
Problem of using the official bower package for material-design-icons is that it downloads the full set of png version, which is a painful 50MB.
The full font is 50kb compressed, so I dont thing this is worth the pain of concatenating the svgs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Directly use font is OK.
But your choice will be limited to the font collection you have choose and
it won't be quite convenient to merge icons from different sets. There are
also some other shortcomings of icon font such as if the icon is small, it
will blur as the browser is optimizing them as a font. There are also many
problems about hinting. My preference for SVG icons mostly comes from this
article of CSS Tricks https://css-tricks.com/icon-fonts-vs-svg/ It
describes why we should use SVG.
I think if we are using ionicons(http://ionicons.com). The size of bower
won't be a problem. The repo contains no png icons.
I think if the number of icons we are using is not so many (less than 10
icons), put the icons directly in the repo is ok as long as the license
permit. And we might need to make a vector logo of Buildbot instead of
current bitmap icon in the future, then SVG will be a better choice.
On Fri, Apr 10, 2015 at 8:39 PM, Pierre Tardy notifications@github.com
wrote:
In www/md_base/src/icons/gear-outline.svg
#1626 (comment):@@ -0,0 +1,40 @@
+There is also
http://zavoloklom.github.io/material-design-iconic-font/icons.htmlProblem of using the official bower package for material-design-icons is
that it downloads the full set of png version, which is a painful 50MB.The full font is 50kb compressed, so I dont thing this is worth the pain
of concatenating the svgs.—
Reply to this email directly or view it on GitHub
https://github.com/buildbot/buildbot/pull/1626/files#r28140864.
That is a good start! I think this make sense to temporarily use the services from guanlecoja-ui. When the time comes, we make it more modular, and have a guanlecoja-ui-core guanlecoja-ui-bs guanlecoja-ui-md modules Only directives have to be replaced, which are 30% only of guanlecoja-ui You can create the set of generic directives inside a separated module in base_md |
Also, about ngNewRouter, I am not so sure for now. The way ui-router is programable allows to create routabl plugins very easily, while doing the route config in the main controller like with ngNewRouter, will make the config different. I think there are plenty of work todo not to add another thing |
Yes, sadly the new router is not production ready yet. I didn't know that. On Thu, Apr 9, 2015, 18:58 Pierre Tardy notifications@github.com wrote:
|
(and it needs a rebase) |
Good. Will add |
@@ -0,0 +1,45 @@ | |||
doctype html | |||
html(ng-app="app", ng-controller="appController as app") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am happy to see the controller as syntax. Don't forget to change the $scope.title to @title in the appController and to app.title in the view.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done, along with ui-route
.
Looks nice 👍 |
I think there are methods in order to tell httpbackend mock to use bypass mode if the url is *.svg |
+1 |
I added an menu service similar to @tardyp The number of icons are using now is less than 10, so I think by now add svg directly in the repo is ok, you can regard them as something like image resources. we can turn to bower after the number of icons grows larger. After all. turning to bower will concerns modifying I think this pull request has already finished what it is intended to do and is ready to be merged. Please review the code and give comments. |
Do you have a demo server that we can check? |
@tardyp OKay, I will deploy one in one or two days |
Here is my docker file I used: https://gist.github.com/tothandras/4f59bfdffcfa49b8f4ba |
@tothandras cooool! |
@tardyp The live demo is here http://buildbot.apps.io-meter.com/ @dustin @sa2ajj The build is failing because of a network error during BTW: I have come up with a build pack that is extremely easy to use for deploying Buildbot's master on Heroku or Dokku with which I deployed my live demo on my VPS. The only required thing for the users is a single For details, please refer to https://github.com/shanzi/buildbot-master-buildpack :) cc @tothandras |
I of course not object to add this to github/buildbot! :) There are still many improvements should be made to this buildpack. Also we On Thu, Apr 16, 2015 at 12:07 PM, Mikhail Sobolev notifications@github.com
|
The menu disappears on narrower screens (<960px). |
@tothandras fixed it with a nav button, when the sidenav is hidden, you can click the nav button to show it. |
Buildpacks have to be in their own git repository. But we can host it under Also be aware that buildbot is not paas compliant yet because of the slave Le jeu. 16 avr. 2015 06:12, Chase Zhang notifications@github.com a écrit :
|
alright, I am gonna merge this as is. I'd like you work at some point on getting the svgs from bower, but this can be in subsequent PR. good work! |
Booting web UI in Material Design
Cool! So glad that you like it. I will start to work on new tasks a couple days 🍺
|
Here is the initial work to build a web UI in Material Design for Buildbot.
After some discussion with @tothandras , we believe our projects will not be conflict or entangled with each other at least during the early level of developing. I decided to build some base parts of the Web UI that won't concerns about displaying data from
buildbotService
first.I opened a new folder named
md_base
and the new Web UI will fake itself as the oldbase
so thatmaster
need not to be modified. The basic front end structure is generated byguanlecoja
and I added some dependencies according to my own consideration. I will explain some decisions below about the code by now to draw early feedback so that I can make it right as soon as possible.Before the explanation is a screenshot showing the appearance now in browser:
Some Explanations
As you can see in the code, I uses
guanlecoja
as the generator of this front end app. I added the dependencies of Angular Material directly inguanlecoja/config.coffee
.guanlecoja-ui
is not added as a dependency because I found it is kind of depending on bootstrap which is the framework we'd like to abandon. So some services such as the side nav bar and notification for the old web UI has not been migrated to the new one yet. I have managed to use side nav bar provided by Angular Material to achieve current effect. Whether to add these services to new web UI or not needs further evaluation. Please give your advice about this.As I have said in the proposal, SVG icons will be an important advantage of the new UI compared with using icon font. I have already built the basic structures to use SVG icons. The SVG files are placed at
src/icons
. Under current configuration, a gulp plugin will merge all these icons into a single file in order to reduce HTTP request times. We no longer need several font files that contains hundreds of unused icons. Now just add icon files that is needed and we can even modify the shape of icon easily.Current SVG filles added are from ionicons which is released under MIT license. I think it is compatible to buildbot's license.
Router frameworks has not been decided by now. The old UI is using router frameworks provided
angular.ui
but so far the officialngRoute
should be enough. @tothandras also recommended a ngNewRouter. This part needs more discussion too.Some code convention problems should be settle down too. Especially the indention width for several language. So far, I write
jade
andless
with indention width of 2 spaces and coffee script with indention width of 4 spaces.This is a quite uncompleted start yet. I summed up some tasks to be done in one or two weeks.
TODOS
glMenuService
)