[Flight] Make it more obvious what the short name in the I/O description represents (#33944)

This commit is contained in:
Sebastian "Sebbie" Silbermann 2025-07-21 19:53:58 +02:00 committed by GitHub
parent 0dca9c2471
commit ac7da9d46d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 387 additions and 277 deletions

View File

@ -412,7 +412,13 @@ function getIOShortName(
const slashIdx = description.lastIndexOf('/', queryIdx - 1);
if (queryIdx - slashIdx < descMaxLength) {
// This may now be either the file name or the host.
desc = ' (' + description.slice(slashIdx + 1, queryIdx) + ')';
// Include the slash to make it more obvious what we trimmed.
desc = ' (…' + description.slice(slashIdx, queryIdx) + ')';
} else {
// cut out the middle to not exceed the max length
const start = description.slice(slashIdx, slashIdx + descMaxLength / 2);
const end = description.slice(queryIdx - descMaxLength / 2, queryIdx);
desc = ' (' + (slashIdx > 0 ? '…' : '') + start + '…' + end + ')';
}
}
}

File diff suppressed because it is too large Load Diff