Skip to content

Commit

Permalink
[ACS-8371] fix viewer preview
Browse files Browse the repository at this point in the history
  • Loading branch information
nikita-web-ua committed Aug 8, 2024
1 parent 2bc4e15 commit f236312
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 30 deletions.
10 changes: 0 additions & 10 deletions projects/aca-content/assets/app.extensions.json
Original file line number Diff line number Diff line change
Expand Up @@ -1217,16 +1217,6 @@
"visible": "canInfoPreview"
}
},
{
"id": "app.sidebar.infoDetails",
"order": 150,
"title": "Info Details",
"icon": "info_outline",
"color": "accent",
"rules": {
"visible": "showInfoSelectionButton"
}
},
{
"id": "app.toolbar.aspects",
"order": 160,
Expand Down
1 change: 0 additions & 1 deletion projects/aca-content/src/lib/aca-content.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,6 @@ export class ContentServiceExtensionModule {
canEditAspects: rules.canEditAspects,
canShowExpand: rules.canShowExpand,
canInfoPreview: rules.canInfoPreview,
showInfoSelectionButton: rules.showInfoSelectionButton,

'app.selection.canDelete': rules.canDeleteSelection,
'app.selection.file.canUnlock': rules.canUnlockFile,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,10 @@ aca-search-results {
display: flex;
justify-content: flex-start;
flex-basis: 55%;

.adf-viewer {
position: relative;
}
}

&--preview-toolbar {
Expand Down
17 changes: 0 additions & 17 deletions projects/aca-shared/rules/src/app.rules.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1418,23 +1418,6 @@ describe('app.evaluators', () => {
});
});

describe('showInfoSelectionButton', () => {
it('should return false when user is not in search results page', () => {
context.navigation.url = '/trashcan/test';
expect(app.showInfoSelectionButton(context)).toBeFalse();
});

it('should return false when user is in preview', () => {
context.navigation.url = '/search/preview/test';
expect(app.showInfoSelectionButton(context)).toBeFalse();
});

it('should return true when user is in search results page and not in preview', () => {
context.navigation.url = '/search/test';
expect(app.showInfoSelectionButton(context)).toBeTrue();
});
});

describe('isSmartFolder', () => {
it('should return false when there is no selection', () => {
context.selection.isEmpty = true;
Expand Down
2 changes: 0 additions & 2 deletions projects/aca-shared/rules/src/app.rules.ts
Original file line number Diff line number Diff line change
Expand Up @@ -552,8 +552,6 @@ export const canInfoPreview = (context: RuleContext): boolean => {
return isSearchResult && isNotMultiselect && isFileSelected && isPreview;
};

export const showInfoSelectionButton = (context: RuleContext): boolean => navigation.isSearchResults(context) && !navigation.isPreview(context);

/**
* Checks if the file can be opened with MS Office
* JSON ref: `aos.canOpenWithOffice`
Expand Down

0 comments on commit f236312

Please sign in to comment.