Skip to content
This repository has been archived by the owner on Jul 21, 2020. It is now read-only.

feat(TG-318): add empty home page #158

Merged
merged 14 commits into from
Nov 21, 2016
Merged

feat(TG-318): add empty home page #158

merged 14 commits into from
Nov 21, 2016

Conversation

Hliebov
Copy link
Contributor

@Hliebov Hliebov commented Nov 16, 2016

No description provided.

@review-ninja
Copy link

ReviewNinja

</button>
<div class="home-nav-menu">
<ul class="home-nav-menu-list">
<span class="home-nav-menu-list__title">
Copy link
Contributor

Choose a reason for hiding this comment

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

It is semantically wrong to put span into ul, there is only li can be children of ul

@@ -0,0 +1,66 @@
.home {

&-nav {
Copy link
Contributor

Choose a reason for hiding this comment

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

I would rather split this menu list and button, into aib blocks

float: right;
margin: 30px 80px 0 0;

&-list {
Copy link
Contributor

@borys-ihnatyev borys-ihnatyev Nov 17, 2016

Choose a reason for hiding this comment

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

could you please make home block structure flatten by moving list to aib block,
you should avoid using

.ablock {
     &-block {

single stylesheet file should describe single block

.ablock {
    &__element { // good
        &_mod { } // good
    } 

    &_mod { }  // good

    &-not-another-block {} // bad: you should declare it in another file
}

for example:

.menu { 
   // independent styles
}

.home { 
   &__menu {
     // styling of menu (placement ....)
   }
}

and usage

<div class="home"> 
    <ul class="home__menu menu">
    </ul>
</div>

@borys-ihnatyev borys-ihnatyev changed the title Story/tg 287 feat(TG-287): add empty dashboard view Nov 17, 2016
}
}

&__create {
Copy link
Contributor

Choose a reason for hiding this comment

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

I think this is not the element, this is block button block
you can leave this element only for context-styling like color, placing, floating ....

@borys-ihnatyev borys-ihnatyev changed the title feat(TG-287): add empty dashboard view feat(TG-318): add empty dashboard view Nov 17, 2016
.nav {
height: 70px;

.create {
Copy link
Contributor

Choose a reason for hiding this comment

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

please avoid cascades as possible, it is highly not recommended to use cascades with bem


.create {
float: right;
&__button {
Copy link
Contributor

Choose a reason for hiding this comment

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

in this case button is block not an element

@codecov-io
Copy link

codecov-io commented Nov 18, 2016

Current coverage is 96.94% (diff: 100%)

Merging #158 into master will increase coverage by 0.01%

@@             master       #158   diff @@
==========================================
  Files            51         53     +2   
  Lines           881        885     +4   
  Methods           8          8          
  Messages          0          0          
  Branches         34         33     -1   
==========================================
+ Hits            854        858     +4   
  Misses           27         27          
  Partials          0          0          

Powered by Codecov. Last update 2f3f2d0...b765427

@borys-ihnatyev borys-ihnatyev changed the title feat(TG-318): add empty dashboard view feat(TG-318): add empty home page Nov 18, 2016
@@ -22,7 +11,7 @@ export class HeaderComponent implements OnInit {
private mainRoute: Object;
Copy link
Contributor

Choose a reason for hiding this comment

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

You created NavigationRoute interface. It can be used to declare type of mainRoute

Copy link
Contributor

Choose a reason for hiding this comment

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

})
export class HomeComponent {

public onCreateViewClick(): void {
Copy link
Contributor

Choose a reason for hiding this comment

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

If you create this for future, will be better to leave comment about this, because it looks like not finished solution.

Copy link
Contributor

Choose a reason for hiding this comment

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

@@ -0,0 +1,6 @@
export interface NavigationRoute {
Copy link
Contributor

Choose a reason for hiding this comment

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

Interface's approach it is not good way to describe models in TypeScript.
It will better to use model approach.

For example, please look into angular 2 code style (https://angular.io/styleguide) and find hero.model.ts

Copy link
Contributor

Choose a reason for hiding this comment

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


ngOnInit() {
const routes = NAVIGATION_ROUTES.filter(route => route['main']);
const routes = NAVIGATION_ROUTES.filter(route => route.main);
Copy link
Contributor

Choose a reason for hiding this comment

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

we have only one main route

so

this.mainRoute = NAVIGATION_ROUTES.find(route => route.main);

Copy link
Contributor

Choose a reason for hiding this comment

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

{ path: `/${ROUTING.LOGOUT}`, headerName: 'Logout', iconImage: './assets/logout.svg' },
{ path: `/${ROUTING.REGISTRATION}`, headerName: 'Registration', iconImage: './assets/registration.svg' },
];
const MAIN_ROUTE = NAVIGATION_ROUTES[0];
Copy link
Contributor

Choose a reason for hiding this comment

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

why not NAVIGATION_ROUTES.find(route => route.main) ?

Copy link
Contributor

Choose a reason for hiding this comment

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

{ path: `/${ROUTING.LOGOUT}`, headerName: 'Logout', iconImage: './assets/logout.svg' },
{ path: `/${ROUTING.REGISTRATION}`, headerName: 'Registration', iconImage: './assets/registration.svg' },
];
const MAIN_ROUTE = NAVIGATION_ROUTES[0];
Copy link
Contributor

Choose a reason for hiding this comment

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

!fixed


ngOnInit() {
const routes = NAVIGATION_ROUTES.filter(route => route['main']);
const routes = NAVIGATION_ROUTES.filter(route => route.main);
Copy link
Contributor

Choose a reason for hiding this comment

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

!fixed

})
export class HomeComponent {

public onCreateViewClick(): void {
Copy link
Contributor

Choose a reason for hiding this comment

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

!fixed

@borys-ihnatyev borys-ihnatyev merged commit 4bb0bc5 into master Nov 21, 2016
@borys-ihnatyev borys-ihnatyev deleted the story/TG-287 branch November 21, 2016 15:08
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants