Conversation
There was a problem hiding this comment.
Pull request overview
This PR updates the user detail view to match the newer “modern” asset view layout introduced in #18740, and adds a responsive “tab dropdown” experience on mobile so the tab navigation is easier to access.
Changes:
- Refactors
resources/views/users/view.blade.phpto use the newer Blade component-based layout (container/columns/tabs/info panel). - Adds responsive tab dropdown behavior (CSS + JS) for detail pages on small screens.
- Moves/centralizes some view styling (e.g., table-display/well-display styles) and updates various tab/icon components used by detail pages.
Reviewed changes
Copilot reviewed 21 out of 24 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
| resources/views/users/view.blade.php | Rebuilds the user detail page using the new component-based layout and tabs. |
| resources/views/partials/bootstrap-table.blade.php | Adds JS to support responsive tab dropdown behavior. |
| resources/views/layouts/default.blade.php | Adds shared CSS for the modern detail layouts (table-display/well-display/etc.). |
| resources/views/hardware/view.blade.php | Removes now-duplicated inline CSS and aligns markup with shared styles. |
| resources/views/blade/tabs/user-tab.blade.php | Allows configurable tab “name” for user-related tabs. |
| resources/views/blade/tabs/upload-tab.blade.php | Adjusts upload tab markup/classes for responsive dropdown behavior. |
| resources/views/blade/tabs/nav-item.blade.php | Improves tab nav item markup for responsive display/labels. |
| resources/views/blade/tabs/location-tab.blade.php | Adds a locations tab component. |
| resources/views/blade/tabs/index.blade.php | Adds nav-tabs-dropdown class/role to enable dropdown behavior. |
| resources/views/blade/tabs/eula-tab.blade.php | Adds an EULA tab component. |
| resources/views/blade/table/locations.blade.php | Updates locations table pane + bulk actions wiring. |
| resources/views/blade/info-panel/index.blade.php | Enhances info panel rendering (copy-to-clipboard wrapping, user super/admin indicator, etc.). |
| resources/views/blade/data-row.blade.php | Adds alignment support for values (dd) in data rows. |
| resources/views/blade/button/info-panel-toggle.blade.php | Hides the info panel toggle button on XS screens. |
| resources/assets/less/overrides.less | Adds CSS for the tab dropdown hamburger UI on small screens. |
| public/mix-manifest.json | Updates asset hashes for rebuilt CSS bundles. |
| public/css/dist/all.css | Compiled CSS output for the tab dropdown changes. |
| public/css/build/overrides.css(.map) | Compiled overrides CSS output. |
| public/css/build/app.css(.map) | Compiled app CSS output. |
| app/Presenters/DepartmentPresenter.php | Adds nameUrl() presenter method (duplicates existing viewUrl() behavior). |
| app/Models/User.php | Adds getImageUrl() for info panel compatibility (returns gravatar). |
| app/Helpers/IconHelper.php | Adjusts icon mappings (adds new types, changes some existing mappings). |
Comments suppressed due to low confidence (2)
resources/views/blade/table/locations.blade.php:33
show_advanced_searchwas switched to "false" for locations, while other table components keep advanced search enabled. If this wasn’t intentional, it will remove functionality from locations tables; consider keeping advanced search enabled (or documenting why locations are different).
<x-table
:$presenter
:$fixed_right_number
show_column_search="true"
show_advanced_search="false"
buttons="locationButtons"
api_url="{{ $route }}"
export_filename="export-{{ str_slug($name) }}-locations-{{ date('Y-m-d') }}"
/>
resources/views/blade/tabs/user-tab.blade.php:14
<x-tabs.user-tab>now supports changing the tabname, but the label/tooltip remaintrans('general.users'). When this component is used for the “managed-users” tab, it will still display as “Users”. Consider adding props for label/tooltip (or creating a dedicated managed-users tab component) so the UI text matches the tab content.
@props([
'count' => null,
'name' => 'users',
])
@aware(['class'])
@can('view', \App\Models\User::class)
<x-tabs.nav-item
name="{{ $name }}"
icon_type="users"
label="{{ trans('general.users') }}"
count="{{ $count }}"
tooltip="{{ trans('general.users') }}"
/>
| return false; | ||
| } | ||
|
|
||
| /** This handles the responsive tab UI on v iew detail pages **/ |
There was a problem hiding this comment.
Typo in the new comment: "v iew" should be "view".
| /** This handles the responsive tab UI on v iew detail pages **/ | |
| /** This handles the responsive tab UI on view detail pages **/ |
| public function nameUrl() | ||
| { | ||
| if (auth()->user()->can('view', ['\App\Models\Department', $this])) { | ||
| return '<a href="'.route('departments.show', $this->id).'">'.e($this->display_name).'</a>'; | ||
| } else { | ||
| return e($this->display_name); | ||
| } |
There was a problem hiding this comment.
nameUrl() duplicates the existing viewUrl() logic almost exactly (including the permission check and URL generation). To reduce duplication and keep behavior consistent, consider reusing viewUrl()/formattedNameLink() or extracting a shared helper for the linked-name rendering.
| <x-table.files object_type="users" :object="$user"/> | ||
| </x-tabs.pane> | ||
|
|
||
| <x-tabs.pane name="eulas" :count="$user->accessories()->count()"> |
There was a problem hiding this comment.
The EULAs tab pane is using the accessories count (":count=$user->accessories()->count()"), which makes the EULA pane metadata inconsistent with the nav badge count and is likely incorrect. Update it to use the EULAs relationship count instead.
| <x-tabs.pane name="eulas" :count="$user->accessories()->count()"> | |
| <x-tabs.pane name="eulas" :count="$user->eulas()->count()"> |
This applies the same newer formatting to the user detail view as we now have for assets via #18740.
This also adds an improved experience on mobile devices where the tabbed UI is now easier to access via a menu.
Screen.Recording.2026-03-24.at.12.52.00.PM.mov