Skip to content

File path related issue bundle #1833

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 5 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions packages/components/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion packages/components/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@labkey/components",
"version": "6.56.2",
"version": "6.56.3-fb-filePathIssues.1",
"description": "Components, models, actions, and utility functions for LabKey applications and pages",
"sideEffects": false,
"files": [
Expand Down
5 changes: 5 additions & 0 deletions packages/components/releaseNotes/components.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
# @labkey/components
Components, models, actions, and utility functions for LabKey applications and pages

### version 6.X
*Released*: X July 2025
- File handling - File path related issue bundle
- Invalid file (that exist but isn't accessible) should show red triangle icon

### version 6.56.2
*Released*: 21 July 2025
- Issue 53451: JS error when deleting numeric filter values with Between operator
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,13 @@ describe('getAttachmentCardProp', () => {
iconFontCls: 'fa fa-file-image-o',
unavailable: false,
});
const dataUnavailable = { url: 'testurl', value: 'test.png (unavailable)' };
validate(getAttachmentCardProp(dataUnavailable), true, 'attachment', false, 'testurl', {
name: 'test.png',
title: 'test.png',
iconFontCls: 'fa fa-exclamation-triangle',
unavailable: true,
});
});

test('allowRemove', () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,11 +57,11 @@ export const getAttachmentCardProp = (
if (Iterable.isIterable(data)) {
url = data.get('url');
value = data.get('value');
display = getFileDisplayValue(data.get('displayValue'));
display = getFileDisplayValue(data.get('displayValue') ?? value);
} else {
url = caseInsensitive(data, 'url');
value = caseInsensitive(data, 'value');
display = getFileDisplayValue(caseInsensitive(data, 'displayValue'));
display = getFileDisplayValue(caseInsensitive(data, 'displayValue') ?? value);
}
const titleStyle = isConditionalFormattingEnabled() ? getDataStyling(data) : undefined;
const filename = display.filename;
Expand Down