-
Notifications
You must be signed in to change notification settings - Fork 86
fix(home): Update Home dashboard with New Designs #2648
Conversation
A PR to my branch helped to clean up some options and have it fall more inline with the Feature Flag work.
|
e6d8c24
to
e6a0a7e
Compare
@corinnekrych I've updated the rest of the components that the Home Dashboard uses to utilize the new flagging method that you and @xcoulon came up with. Please take a look and let me know how it works for you :) |
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 was able to run locally without changing the developmentEnabled properties as described.
@@ -17,11 +20,19 @@ export class RecentPipelinesWidgetComponent implements OnInit { | |||
contextPath: Observable<string>; | |||
buildConfigs: ConnectableObservable<BuildConfigs>; | |||
buildConfigsCount: Observable<number>; | |||
newHomeDashboardEnabled: boolean = false; | |||
developmentEnabled: boolean = false; // set to false to hide for prod - set to true for local development |
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 don't see developmentEnabled used anywhere in the component or HTML template?
src/app/home/home.component.ts
Outdated
developmentEnabled: boolean = false; // set to false to hide for prod - set to true for local development | ||
myInterval: number = 0; | ||
noWrapSlides: boolean = true; | ||
showIndicator: boolean = true; |
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.
showIndicator and developmentEnabled appear to be unused.
src/app/home/home.component.ts
Outdated
newHomeDashboardEnabled: boolean = false; | ||
developmentEnabled: boolean = false; // set to false to hide for prod - set to true for local development | ||
myInterval: number = 0; | ||
noWrapSlides: boolean = true; |
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 can probably set the myInterval and noWrapSlides properties on the carousel directly, in the HTML template, as these are not likely to change.
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'm using the methods documented on the ngx-bootstrap site: https://valor-software.com/ngx-bootstrap/#/carousel. They have it broken out into template and component, even for a single item.
src/app/home/home.component.ts
Outdated
@@ -52,6 +61,10 @@ export class HomeComponent implements OnInit, OnDestroy { | |||
this.space = ''; | |||
this.selectedFlow = 'start'; | |||
this._spaceSubscription = spaces.recent.subscribe(val => this.recent = val); | |||
this.subscriptions.push(featureTogglesService.getFeature('newHomeDashboard').subscribe((feature) => { | |||
this.newHomeDashboardEnabled = feature.attributes['enabled'] && feature.attributes['user-enabled']; | |||
console.log('~', this.newHomeDashboardEnabled); |
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 should remove the log output
@dlabrecq fixed the issues you commented on and removed unnecessary code. I made a not on the ngx-bootstrap implementation of the carousel. |
@mindreeper2420 fabric8/fabric8-ui:SNAPSHOT-PR-2648-3 fabric8-ui is deployed and available for testing at https://fabric8-ui-fabric8-ui-pr-2648-fabric8-ui.badger.fabric8.io |
src/app/home/home.component.ts
Outdated
@Component({ | ||
encapsulation: ViewEncapsulation.None, | ||
selector: 'alm-home', | ||
templateUrl: './home.component.html', | ||
styleUrls: ['./home.component.less'] | ||
}) | ||
export class HomeComponent implements OnInit, OnDestroy { | ||
newHomeDashboardEnabled: boolean = false; | ||
myInterval: number = 0; | ||
noWrapSlides: boolean = true; |
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.
Nothing wrong with following the example. However, the carousel can be simplified to just this:
<carousel interval="0" noWrap="true">
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.
all cleaned up
@mindreeper2420 fabric8/fabric8-ui:SNAPSHOT-PR-2648-4 fabric8-ui is deployed and available for testing at https://fabric8-ui-fabric8-ui-pr-2648-fabric8-ui.badger.fabric8.io |
Update the Home Dashboard to match the new designs from UXD. related to fabric8-ui/fabric8-ux#919
@mindreeper2420 fabric8/fabric8-ui:SNAPSHOT-PR-2648-5 fabric8-ui is deployed and available for testing at https://fabric8-ui-fabric8-ui-pr-2648-fabric8-ui.badger.fabric8.io |
@mindreeper2420 is this ready for review? I tried the badger link with Internal set and don't see the new dashboard. |
@joshuawilson it is ready for review, but you have to do so locally. There is an additional flag set |
Ah, so you will never see this in prod no matter what setting you have. |
Correct - the flags will be removed once all development is completed. |
* fix(iteration): Allow user to select past and future start date. * fix(iteration): disable year selector. * fix(test): fix test selector.
This PR is to update the Home Dashboard HTML/CSS with the new designs.