Skip to content

Commit

Permalink
Reduce dependency list to be package link and arrow for walking up or…
Browse files Browse the repository at this point in the history
… down (with rkent changes) (#427)

* Redunce dependency list to be package link and arrow for walking up or down

This fixes #388 

It fixes the broken links by removing them as the extra column's info has been reduced. And while here make it symmetric so you navigate packages both up and down the dependency list.

* Equalize width, class=endoftree, no system deps in package dependencies

---------

Co-authored-by: Tully Foote <[email protected]>
  • Loading branch information
rkent and tfoote authored Sep 25, 2024
1 parent df61dad commit 3da2d48
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 19 deletions.
25 changes: 6 additions & 19 deletions _includes/package_body.html
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ <h3 class="panel-title">Wiki Tutorials</h3>

<div class="tab-pane" id="{{distro}}-deps">
<div class="row">
<div class="col-sm-5">
<div class="col-sm-6">
<div class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title">Package Dependencies</h3>
Expand All @@ -229,7 +229,6 @@ <h3 class="panel-title">Package Dependencies</h3>
<table class="table table-condensed table-striped">
<thead>
<th class="text-center">Deps</th>
<th class="text-center"><span class="glyphicon glyphicon-th" title="Package instances"></span></th>
<th style="width: 100%">Name</th>
</thead>
<tbody>
Expand All @@ -238,26 +237,16 @@ <h3 class="panel-title">Package Dependencies</h3>
{% if n_instances > 0 %}
<tr>
<td class="text-center">
{% assign n_2nd_order_pdeps = p[1].snapshots[distro].data.pkg_deps | size %}
{% assign n_2nd_order_sdeps = p[1].snapshots[distro].data.system_deps | size %}
{% assign n_2nd_order_deps = n_2nd_order_pdeps | plus: n_2nd_order_sdeps %}
<a href="{{site.baseurl}}/p/{{p[0]}}#{{distro}}-deps" {% if n_2nd_order_deps == 0 %}class="inactive"{% endif %}>
{% assign n_2nd_order_deps = p[1].snapshots[distro].data.pkg_deps | size %}
<a href="{{site.baseurl}}/p/{{p[0]}}#{{distro}}-deps" {% if n_2nd_order_deps == 0 %}class="endoftree"{% endif %}>
<span class="glyphicon glyphicon-arrow-left" title="Package dependencies"></span>
</a>
</td>
<td class="text-center">
<a href="{{site.baseurl}}/packages/{{p[0]}}" class="label label-{% if n_instances > 1 %}primary{% else %}default{% endif %}">
{{n_instances}}
</a>
</td>
<td><a href="{{site.baseurl}}/p/{{p[0]}}#{{distro}}">{{p[0]}}</a></td>
<td><a href="{{site.baseurl}}/p/{{p[0]}}#{{distro}}">{{p[0]}} {{n_2nd_order_pdeps}} {{n_2nd_order_sdeps}}</a></td>
</tr>
{% else %}
<tr>
<td class="text-center"></td>
<td class="text-center">
<span class="label label-danger">0</span>
</td>
<td>{{p[0]}}</td>
</tr>
{% endif %}
Expand Down Expand Up @@ -298,7 +287,7 @@ <h3 class="panel-title">System Dependencies</h3>
</div>
</div>

<div class="col-sm-7">
<div class="col-sm-6">
<div class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title">Dependant Packages</h3>
Expand All @@ -308,7 +297,6 @@ <h3 class="panel-title">Dependant Packages</h3>
<table class="table table-condensed table-striped">
<thead>
<th>Name</th>
<th>Repo</th>
<th class="text-center">Deps</th>
</thead>
<tbody>
Expand All @@ -317,10 +305,9 @@ <h3 class="panel-title">Dependant Packages</h3>
{% for dep_instance in d[1] %}
<tr>
<td><a href="{{site.baseurl}}/p/{{dep_name}}/{{dep_instance.id}}#{{distro}}">{{dep_name}}</a></td>
<td><a href="{{site.baseurl}}/r/{{dep_instance.repo.name}}/{{dep_instance.id}}">{{dep_instance.id}}</a></td>
<td class="text-center">
{% assign n_2nd_order_deps = dep_instance.package.data.dependants | size %}
<a href="{{site.baseurl}}/p/{{dep_name}}/{{dep_instance.id}}#{{distro}}-deps" {% if n_2nd_order_deps == 0 %}class="inactive"{% endif %}>
<a href="{{site.baseurl}}/p/{{dep_name}}/{{dep_instance.id}}#{{distro}}-deps" {% if n_2nd_order_deps == 0 %}class="endoftree"{% endif %}>
<span class="glyphicon glyphicon-arrow-right"></span>
</a>
</td>
Expand Down
6 changes: 6 additions & 0 deletions _sass/_base.scss
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,12 @@ a.inactive {
text-decoration: none;
}

// Used in dependencies to denote no further 2nd order dependencies
a.endoftree {
color: #5e00c7;
text-decoration: none;
}

table.table a .glyphicon {
text-decoration: none;
}
Expand Down

0 comments on commit 3da2d48

Please sign in to comment.