<commit_before>import {Component, OnInit, ChangeDetectorRef} from '@angular/core';

import {FirebaseService} from '../services/firebase.service';
import {ParticipantsComponent} from './participants.component';
import {BucketComponent} from './bucket.component';

@Component({
  selector: 'ret-app',
  providers: [FirebaseService],
  directives: [ParticipantsComponent, BucketComponent],
  styles: [`
    :host {
      height: 100%;
      display: flex;
      flex-direction: column;
    }
    .ret-buckets {
      flex-grow: 1;
      display: flex;
      flex-direction: row;
    }
    .ret-buckets ret-bucket:nth-child(2n+0) {
      background: #1c2b39
    }
    .ret-buckets ret-bucket:nth-child(2n+1) {
      background: #203141;
    }
    .ret-header {
      padding: 1em 2.5em;
      background: #182531;    
      color:  #f6f7f8;
      font-size: 1.625em;
      font-weight: 700;      
    }
  `],
  template: `
    <header class="ret-header">
        <h1>eSky retrospective</h1>
    </header>
    <div class="ret-buckets">
      <ret-bucket *ngFor="let bucket of buckets" [name]="bucket.name" [id]="bucket.id"></ret-bucket>
    </div>
  `
})
export class AppComponent {
  buckets = [];
  
  constructor(private fb: FirebaseService, private ref: ChangeDetectorRef) {}

  ngOnInit() {
    this.fb.ref('buckets').once('value').then((snapshot)=>{
      snapshot.forEach((child) => { 
        console.log();
        this.buckets.push({id: child.key, name: child.val().name});
      });
    });
  };
}<commit_msg>fix: refreshing buckets<commit_after>import {Component, OnInit, ChangeDetectorRef} from '@angular/core';

import {FirebaseService} from '../services/firebase.service';
import {ParticipantsComponent} from './participants.component';
import {BucketComponent} from './bucket.component';

@Component({
  selector: 'ret-app',
  providers: [FirebaseService],
  directives: [ParticipantsComponent, BucketComponent],
  styles: [`
    :host {
      height: 100%;
      display: flex;
      flex-direction: column;
    }
    .ret-buckets {
      flex-grow: 1;
      display: flex;
      flex-direction: row;
    }
    .ret-buckets ret-bucket:nth-child(2n+0) {
      background: #1c2b39
    }
    .ret-buckets ret-bucket:nth-child(2n+1) {
      background: #203141;
    }
    .ret-header {
      padding: 1em 2.5em;
      background: #182531;    
      color:  #f6f7f8;
      font-size: 1.625em;
      font-weight: 700;      
    }
  `],
  template: `
    <header class="ret-header">
        <h1>eSky retrospective</h1>
    </header>
    <div class="ret-buckets">
      <ret-bucket *ngFor="let bucket of buckets" [name]="bucket.name" [id]="bucket.id"></ret-bucket>
    </div>
  `
})
export class AppComponent {
  buckets = [];

  constructor(private fb: FirebaseService, private ref: ChangeDetectorRef) {}

  ngOnInit() {
    this.fb.ref('buckets').once('value').then((snapshot)=>{
      snapshot.forEach((child) => {
        this.buckets.push({id: child.key, name: child.val().name});
      });

      this.ref.detectChanges();
    });
  };
}
{'fraction_non_alphanumeric': 0.1634394486380046, 'fraction_numerical': 0.02559894978667542, 'mean_word_length': 2.8387909319899243, 'pattern_counts': {'":': 0, '<': 19, '<?xml version=': 0, '>': 23, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6797340', 'n_tokens_mistral': 1098, 'n_tokens_neox': 1021, 'n_words': 192}