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.
start row layouting
work on dropup
rearrange markup, make tofu toggle
bäm
use placeholder instead of variable, doh
add border
replace all the icons
adjust icons sizes
use icon classes instead of svg
more icons adjustments
more icon tweaks on caches
update coloring mixins
fix stateMap, update db coloring mixin
cleanup owner page
even more icon fun
popup tweaks
tweak api icon
change to new broadcast icon
change icon path
responsive tweaks
dashboard filter
hack around Safari's not quite standard flexbox behaviour
update row labels and icon spacing
rearrange links in sidebar
make last builds a component, tweak svg stroke-width
more icon tweaks
fiddle around with svg view props
rearrange links in branch-row
tweak request icon
add integration test
more tweaks
An [issue](https://github.com/travis-ci/travis-ci/issues/5181) was reported in
which the repository sidebar links were not functioning properly. I've
tracked it down to the fact that a click handler was registered and
automatically performing a redirect to the repo route.
This breaks CMD+Click behavior (as the click handler was still
called and navigating when the user did not expect it, as well as
navigated to a link that the user did not intend to visit.
This commit simply removes that click handler. I checked the previous
coffee version of the file to gain more context on why it was initially
added, but unfortunately, it was simply added when the original
component was created, so I'm not sure what its use was.
When a user restarts a job, we should not try fetching the log again. In
order to do this I added a guard in job-log component, which checks if
attributes changed in didReceiveAttrs callback. If the old job value is
the same as the new value, we don't need to do anything.
innerHTML is faster than empty(), especially on some versions of
firefox. This change was already commited before, but it was somehow
lost while converting project to JS.
After recent refactorings status images popup started to fetch branches
info whenever a repo page was opened, resulting in additional HTTP
requests. Furthermore, because of a way we load branches, it could
result in builds view displaying very old builds, because in API V2 we
essentially download last build for each branch for branches request.
This commit fixes the situation in 2 ways:
1. We wait with downloading branhes till the popup is open
2. We use a V3 requests to download branches and we don't put that data
into the store