Skip to content

Commit

Permalink
Remove nav-tabs from vertical nav items on rights page
Browse files Browse the repository at this point in the history
The nav-tabs border style was still active behind active
roles when selected, creating a blurred edge around the
pill. Remove nav-tabs, which is mean for a vertical tab-like
interface, like the rights categories.

Add some style to retain the border on hover, which gives some
nice feedback to the user as you mouse over the roles.
  • Loading branch information
cbrandtbuffalo authored and sunnavy committed Jan 13, 2025
1 parent 8242184 commit 51ec507
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 2 deletions.
4 changes: 2 additions & 2 deletions share/html/Admin/Elements/EditRights
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ if ($anchor =~ /AddPrincipal/) {
<div class="row mt-2">
<div class="col-3">
<div class="principal-tabs">
<ul class="nav nav-tabs flex-column nav-pills" role="tablist" aria-orientation="vertical">
<ul class="nav flex-column nav-pills" role="tablist" aria-orientation="vertical">
<%perl>
for my $category (@$Principals) {
my ($name, $collection, $col, $loc) = @$category;
Expand All @@ -228,7 +228,7 @@ for my $category (@$Principals) {
my $display = ref $col eq 'CODE' ? $col->($obj) : $obj->$col;
my $id = "acl-" . $obj->PrincipalId;
</%perl>
<li class="nav-item">
<li class="rt-rights-role nav-item mb-1">
<a href="#<% $id %>" class="nav-link" id="<% "principal-tab-$id" %>" data-bs-toggle="tab" role="tab" aria-controls="<% $id %>" aria-selected="false">
<% $loc ? loc($display) : $display %>
</a>
Expand Down
26 changes: 26 additions & 0 deletions share/static/css/elevator/rights-editor.css
Original file line number Diff line number Diff line change
Expand Up @@ -44,3 +44,29 @@
.rights-editor .tab-aggregates-checked-rights:not(.active) {
background-color: var(--bs-secondary-bg);
}

/* Customize border color for principal tabs */
.principal-tabs .rt-rights-role .nav-link {
border-color: transparent;
border-width: 1px;
border-style: solid;
transition: unset;
}

[data-bs-theme=light] {
.principal-tabs .rt-rights-role .nav-link.active {
border-color: var(--bs-nav-pills-link-active-bg);
}
.principal-tabs .rt-rights-role .nav-link:hover {
border-color: #ddd;
}
}

[data-bs-theme=dark] {
.principal-tabs .rt-rights-role .nav-link.active {
border-color: #515151;
}
.principal-tabs .rt-rights-role .nav-link:hover {
border-color: #666;
}
}

0 comments on commit 51ec507

Please sign in to comment.