Skip to content

Modernize user view#18754

Merged
snipe merged 26 commits intodevelopfrom
modernize-user-view
Mar 24, 2026
Merged

Modernize user view#18754
snipe merged 26 commits intodevelopfrom
modernize-user-view

Conversation

@snipe
Copy link
Member

@snipe snipe commented Mar 23, 2026

Screenshot 2026-03-24 at 12 51 38 PM

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

@snipe snipe marked this pull request as draft March 23, 2026 19:53
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.php to 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_search was 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 tab name, but the label/tooltip remain trans('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') }}"
    />

@snipe snipe requested a review from Copilot March 24, 2026 13:27
@snipe snipe marked this pull request as ready for review March 24, 2026 13:30
@snipe snipe merged commit ae7d967 into develop Mar 24, 2026
9 of 10 checks passed
@snipe snipe deleted the modernize-user-view branch March 24, 2026 13:30
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 21 out of 24 changed files in this pull request and generated 3 comments.

return false;
}

/** This handles the responsive tab UI on v iew detail pages **/
Copy link

Copilot AI Mar 24, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typo in the new comment: "v iew" should be "view".

Suggested change
/** This handles the responsive tab UI on v iew detail pages **/
/** This handles the responsive tab UI on view detail pages **/

Copilot uses AI. Check for mistakes.
Comment on lines +145 to +151
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);
}
Copy link

Copilot AI Mar 24, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copilot uses AI. Check for mistakes.
<x-table.files object_type="users" :object="$user"/>
</x-tabs.pane>

<x-tabs.pane name="eulas" :count="$user->accessories()->count()">
Copy link

Copilot AI Mar 24, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
<x-tabs.pane name="eulas" :count="$user->accessories()->count()">
<x-tabs.pane name="eulas" :count="$user->eulas()->count()">

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants