Commit Graph

12 Commits

Author SHA1 Message Date
Curtis Ekstrom
142a7217d4
Remove *Binding(s) from project
These bindings can be replaced wholesale with the more idiomatic
alternative: aliases.

In addition, avoid passing in user to components where it can be injected directly.

One of the perceived downsides of dependency injection can be
that it can make debugging feel more difficult because it's not
immediately clear where the value is coming from, which the explicit
variant we previously used does not suffer from. It might also be
argued that we also lose out on a seam that could be useful in the
future where a component doesn't care about the specific type of
user, just that one is passed in.

While explicitness is often a virtue, it comes at the cost of increased
noise that pervades multiple layers of components. I'd argue this makes
the parent components more difficult to understand, given they are
littered with unnecessary references to data they themselves do not
need.

This decreases the noise/ceremony around accessing
userPermissions/auth data and restricts access to that data to
the child components that actually need to know about it.

As to losing a seam, it appears 1) that this isn't
currently necessary and 2) we can use an internal computed
property should the need arise in the future.
2016-04-13 13:54:51 +02:00
Piotr Sarnacki
a3ce77831d Make jshint happy 2016-03-03 11:58:17 +01:00
Piotr Sarnacki
57dec8f2fc Don't fetch /jobs when not in pro
We pass runningJobsCount to repos-list-tabs component, which essentially
is a binding and a binding will call the property that we're passing,
which in turn will fetch running and queued jobs. In order to avoid
this, I added guards in computed properties.
2016-03-03 11:25:01 +01:00
Piotr Sarnacki
e919906f99 Update time also for finished builds, but only every minute 2016-01-25 17:55:48 +01:00
Piotr Sarnacki
34ca0cc386 Use transitionToRoute instead of transitionTo in controllers 2016-01-13 12:00:35 +01:00
Piotr Sarnacki
f5823669b2 [deprecations] Use regular computed property instead of arrayComputed 2016-01-07 10:40:17 +01:00
Piotr Sarnacki
2e2d2ae81b Feature flag API V3 2015-12-17 12:39:17 +01:00
Piotr Sarnacki
830211444b Make only one query to jobs 2015-12-10 11:43:54 +01:00
Piotr Sarnacki
09f27d47be Fix search 2015-12-09 10:23:09 +01:00
Piotr Sarnacki
87fdd95a6f Fix tests 2015-12-08 10:18:09 +01:00
Piotr Sarnacki
0d9755489f Sort repos in repos controller, not in the component
We rely on the order of repositories when we set current repo on the
main page. That's why we need to do sorting in the controller.
2015-12-08 10:18:08 +01:00
Piotr Sarnacki
35c5d619bd Convert repos controller to javascript 2015-12-08 10:18:08 +01:00