Skip to content

feat: Add location description column to locations index#1990

Merged
DonKoko merged 2 commits intomainfrom
copilot/fix-1989
Aug 22, 2025
Merged

feat: Add location description column to locations index#1990
DonKoko merged 2 commits intomainfrom
copilot/fix-1989

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Aug 22, 2025

This PR adds a description column to the locations index page, displaying location descriptions in the same manner as the advanced asset index.

Changes Made

New Component: Created LocationDescriptionColumn component that:

  • Displays short descriptions (≤60 characters) inline
  • Truncates long descriptions with a tooltip showing the full text on hover
  • Shows "-" as a placeholder when no description is available
  • Follows the same pattern as the existing DescriptionColumn used in asset listings

Updated Locations Index: Modified the locations table to include:

  • New "Description" column header positioned between location name and assets count
  • Conditional rendering of description content using the new component
  • Maintains existing responsive design and table layout

Technical Implementation

The implementation leverages existing components and patterns:

  • Uses LineBreakText for proper text wrapping in tooltips
  • Implements tooltip functionality with TooltipProvider from shared components
  • Location description data is already available from the Prisma Location model
  • No database schema changes required

Example Usage

// Short description displays inline
<LocationDescriptionColumn value="Primary storage facility" />

// Long description truncates with tooltip
<LocationDescriptionColumn value="This is a very long description that will be truncated..." />

// Fallback for empty descriptions  
{item.description ? (
  <LocationDescriptionColumn value={item.description} />
) : (
  <Td>-</Td>
)}

The locations index now provides users with immediate access to location descriptions, improving the information density and usability of the locations overview.

Fixes #1989.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • binaries.prisma.sh
    • Triggering command: node scripts/postinstall.js (dns block)
    • Triggering command: node /home/REDACTED/work/shelf.nu/shelf.nu/node_modules/.bin/prisma -v (dns block)
    • Triggering command: node /home/REDACTED/work/shelf.nu/shelf.nu/node_modules/.bin/prisma generate (dns block)
  • checkpoint.prisma.io
    • Triggering command: /usr/local/bin/node /home/REDACTED/work/shelf.nu/shelf.nu/node_modules/prisma/build/child {&#34;product&#34;:&#34;prisma&#34;,&#34;version&#34;:&#34;6.14.0&#34;,&#34;cli_install_type&#34;:&#34;local&#34;,&#34;information&#34;:&#34;&#34;,&#34;local_timestamp&#34;:&#34;2025-08-22T08:18:57Z&#34;,&#34;project_hash&#34;:&#34;e6fa372b&#34;,&#34;cli_path&#34;:&#34;/home/REDACTED/work/shelf.nu/shelf.nu/node_modules/.bin/prisma&#34;,&#34;cli_path_hash&#34;:&#34;39199cc4&#34;,&#34;endpoint&#34;:&#34;REDACTED&#34;,&#34;disable&#34;:false,&#34;arch&#34;:&#34;x64&#34;,&#34;os&#34;:&#34;linux&#34;,&#34;node_version&#34;:&#34;v20.19.4&#34;,&#34;ci&#34;:true,&#34;ci_name&#34;:&#34;GitHub Actions&#34;,&#34;command&#34;:&#34;generate&#34;,&#34;schema_providers&#34;:[&#34;postgresql&#34;],&#34;schema_preview_features&#34;:[&#34;fullTextSearchPostgres&#34;],&#34;schema_generators_providers&#34;:[&#34;prisma-client-js&#34;],&#34;cache_file&#34;:&#34;/home/REDACTED/.cache/checkpoint-nodejs/prisma-39199cc4&#34;,&#34;cache_duration&#34;:43200000,&#34;remind_duration&#34;:172800000,&#34;force&#34;:false,&#34;timeout&#34;:5000,&#34;unref&#34;:true,&#34;child_path&#34;:&#34;/home/REDACTED/work/shelf.nu/shelf.nu/node_modules/prisma/build/child&#34;,&#34;client_event_id&#34;:&#34;&#34;,&#34;previous_client_event_id&#34;:&#34;&#34;,&#34;check_if_update_available&#34;:true} (dns block)
    • Triggering command: /usr/local/bin/node /home/REDACTED/work/shelf.nu/shelf.nu/node_modules/prisma/build/child {&#34;product&#34;:&#34;prisma&#34;,&#34;version&#34;:&#34;6.14.0&#34;,&#34;cli_install_type&#34;:&#34;local&#34;,&#34;information&#34;:&#34;&#34;,&#34;local_timestamp&#34;:&#34;2025-08-22T08:24:10Z&#34;,&#34;project_hash&#34;:&#34;e6fa372b&#34;,&#34;cli_path&#34;:&#34;/home/REDACTED/work/shelf.nu/shelf.nu/node_modules/.bin/prisma&#34;,&#34;cli_path_hash&#34;:&#34;39199cc4&#34;,&#34;endpoint&#34;:&#34;REDACTED&#34;,&#34;disable&#34;:false,&#34;arch&#34;:&#34;x64&#34;,&#34;os&#34;:&#34;linux&#34;,&#34;node_version&#34;:&#34;v20.19.4&#34;,&#34;ci&#34;:true,&#34;ci_name&#34;:&#34;GitHub Actions&#34;,&#34;command&#34;:&#34;generate&#34;,&#34;schema_providers&#34;:[&#34;postgresql&#34;],&#34;schema_preview_features&#34;:[&#34;fullTextSearchPostgres&#34;],&#34;schema_generators_providers&#34;:[&#34;prisma-client-js&#34;],&#34;cache_file&#34;:&#34;/home/REDACTED/.cache/checkpoint-nodejs/prisma-39199cc4&#34;,&#34;cache_duration&#34;:43200000,&#34;remind_duration&#34;:172800000,&#34;force&#34;:false,&#34;timeout&#34;:5000,&#34;unref&#34;:true,&#34;child_path&#34;:&#34;/home/REDACTED/work/shelf.nu/shelf.nu/node_modules/prisma/build/child&#34;,&#34;client_event_id&#34;:&#34;&#34;,&#34;previous_client_event_id&#34;:&#34;&#34;,&#34;check_if_update_available&#34;:true} (dns block)

If you need me to access, download, or install something from one of these locations, you can either:


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copy link
Copy Markdown
Contributor Author

Copilot AI commented Aug 22, 2025

@DonKoko 👋 This repository doesn't have Copilot instructions. With Copilot instructions, I can understand the repository better, work faster and produce higher quality PRs.

I can generate a .github/copilot-instructions.md file for you automatically. Click here to open a pre-filled issue and assign it to me. I'll write the instructions, and then tag you for review.

@vercel
Copy link
Copy Markdown

vercel bot commented Aug 22, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Preview Comments Updated (UTC)
shelf-docs Ignored Ignored Preview Aug 22, 2025 8:25am

Copilot AI changed the title [WIP] Feat: Show more location information on locations index feat: Add location description column to locations index Aug 22, 2025
Copilot AI requested a review from DonKoko August 22, 2025 08:26
@DonKoko DonKoko marked this pull request as ready for review August 22, 2025 09:26
@DonKoko DonKoko merged commit 165ec53 into main Aug 22, 2025
10 checks passed
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.

Feat: Show more location information on locations index

2 participants