Skip to content

Commit

Permalink
[ACS-5645] Property Panel Feature (#3477)
Browse files Browse the repository at this point in the history
* [ACS-5540] changes for edit aspect button

* added aspect edit button

* [ACS-5540]fixed unit test cases and added unit test cases

* [ACS-5540] Modified changes

* [ACS-5540] fixed file lock issue

* [ACS-5645]Implemented changes as per review comments

* [ACS-5540]Modified the test case title

* [ACS-5645] changes for aspect icon

* [ACS-5645] fixed aspect lock issue in small screen

* [ACS-5540] modified the aspect button changes

* [ACS-5540] modified the changes

* [ACS-5645] added unit test cases

* [ACS-5540] removed unwanted code

* [ACS-5540] fixed lock-file bug

* [ACS-5540] revert the unwanted changes

* [ACS-5540] modified changes

* [ACS-5540]Implemented the changes as per the review comments

* [ACS-5540] added group lock changes

* [ACS-5540] added tooltip

* [ACS-5540] Implemented the review comments

* [ACS-5540] added tooltips

* [ACS-5540] Added styles

* [ACS-5540]Added focus

* [ACS-5551]updated property panel design

* [ACS-5551]added null checks

* [ACS-5551] update style

* [ACS-5540] changes for edit aspect button

* added aspect edit button

* [ACS-5540]fixed unit test cases and added unit test cases

* [ACS-5540] Modified changes

* [ACS-5645]Implemented changes as per review comments

* [ACS-5645] changes for aspect icon

* [ACS-5540] modified the aspect button changes

* [ACS-5540] modified the changes

* [ACS-5540] revert the unwanted changes

* [ACS-5540] added group lock changes

* [ACS-5551]updated property panel design

* [ACS-5551]added null checks

* [ACS-5551] update style

* [ACS-5551] name updated

* [ACS-5551] unit test fix

* [ACS-5551] header issue fixed

* [ACS-5645] style updated

* [ACS-5645] border updated

* [ACS-6117] fixed aspect dispaly issue

* [ACS-5645] different node open issu fixed

* [ACS-5645] unit test issue fix

* [ACS-5645] unit test fix

* [ACS-5645] tabs design modify

* [ACS-5645] dependency updated

* [link-adf:ACS-564
5-property-panel-feature] test linking

* "[link-adf:ACS-5645-property-panel-feature]"

* [ACS-5645] revert adf linking changes

* add adf configs to libs

* fix issue with empty paths

* try using adf target

* [link-adf:ACS-5645-property-panel-feature] fix core mapping

* [link-adf:ACS-5645-property-panel-feature] revert target changes

* remove useless styles

* remove css hacks

* cleanup useless properties

* remove useless properties

* remove useless code

* [ACS-5645] added missing code

* [ACS-5654] add icon for full screen

* [ACS-5654] nodei con methods moved to thumbnail

* [ACS-5654] unit test added and code refactor

* [ACS-5645] unit test added

* [ACS-5645] panel issue fix

* [ACS-5645] removed unit test for editable property

* [ACS-5645] removed unused unit test

* [ACS-5645] unit test updated

* [ACS-5645] updated the unit test

* Modified the unit test cases for getNodeIcon

* Upsteam ADF-6.6.0-7287333895, Js-api-7.5.0-7287333895 version

* Fix failing test cases

* Fix failing e2e

---------

Co-authored-by: Yasa-Nataliya <[email protected]>
Co-authored-by: pkundu <[email protected]>
Co-authored-by: Denys Vuika <[email protected]>
Co-authored-by: rbahirsheth <[email protected]>
  • Loading branch information
5 people authored Dec 27, 2023
1 parent 339dc60 commit 90c69b2
Show file tree
Hide file tree
Showing 37 changed files with 419 additions and 248 deletions.
2 changes: 1 addition & 1 deletion .github/actions/adf-linking/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ runs:
shell: bash
run: |
if [[ $COMMIT_MESSAGE == *"[link-adf:"* ]]; then
echo "BUILD_OPTS=--configuration=adfprod,e2e" >> $GITHUB_ENV
echo "BUILD_OPTS=--configuration=adf,e2e" >> $GITHUB_ENV
echo "TEST_OPTS=--configuration=adfprod" >> $GITHUB_ENV
echo "E2E_PROTRACTOR_OPTS=--with-local-adf" >> $GITHUB_ENV
echo "E2E_TSCONFIG=tsconfig.e2e.adf.json" >> $GITHUB_ENV
Expand Down
1 change: 0 additions & 1 deletion e2e/protractor/suites/extensions/ext-metadata.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,6 @@ describe('Extensions - Metadata presets', () => {
await infoDrawer.waitForInfoDrawerToOpen();

await infoDrawer.clickTab(PROPERTIES_TAB.title);
await BrowserActions.click(metadataCard.expandButton);
await metadataCard.waitForFirstExpansionPanel();
});

Expand Down
2 changes: 1 addition & 1 deletion e2e/protractor/suites/info-drawer/comments.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ describe('Comments', () => {
await infoDrawer.waitForInfoDrawerToOpen();
await infoDrawer.clickCommentsTab();

expect(await infoDrawer.getActiveTabTitle()).toBe('COMMENTS');
expect(await infoDrawer.getActiveTabTitle()).toBe('Comments');
expect(await commentsTab.getCommentsTabHeaderText()).toBe('Comments (0)');
expect(await commentsTab.isCommentTextAreaDisplayed()).toBe(true, 'Comment field not present');
expect(await commentsTab.isAddCommentButtonEnabled()).toBe(false, 'Add comment button not disabled');
Expand Down
24 changes: 1 addition & 23 deletions e2e/protractor/suites/info-drawer/file-folder-properties.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ describe('File / Folder properties', () => {
};

const infoDrawer = new InfoDrawer();
const { propertiesTab } = infoDrawer;

const loginPage = new LoginPage();
const page = new BrowsingPage();
Expand Down Expand Up @@ -91,33 +90,12 @@ describe('File / Folder properties', () => {
await BrowserActions.click(page.toolbar.viewDetailsButton);
await infoDrawer.waitForInfoDrawerToOpen();

expect(await infoDrawer.getHeaderTitle()).toEqual('Details');
expect(await infoDrawer.getHeaderTitle()).toEqual(file1.name);
expect(await infoDrawer.isPropertiesTabDisplayed()).toBe(true, 'Properties tab is not displayed');
expect(await infoDrawer.isCommentsTabDisplayed()).toBe(true, 'Comments tab is not displayed');
expect(await infoDrawer.getTabsCount()).toBe(2, 'Incorrect number of tabs');
});

it('[C269004] Less / More information buttons', async () => {
await dataTable.selectItem(file1.name);
await BrowserActions.click(page.toolbar.viewDetailsButton);
await infoDrawer.waitForInfoDrawerToOpen();

expect(await propertiesTab.isMoreInfoButtonEnabled()).toBe(true, 'More information button not enabled');
expect(await propertiesTab.isPropertiesListExpanded()).toBe(true, 'Properties list not expanded');

await BrowserActions.click(propertiesTab.moreInfoButton);

expect(await propertiesTab.isMoreInfoButtonDisplayed()).toBe(false, 'More information button displayed');
expect(await propertiesTab.isLessInfoButtonEnabled()).toBe(true, 'Less information button not enabled');
expect(await propertiesTab.isPropertiesListExpanded()).toBe(false, 'Properties list expanded');

await BrowserActions.click(propertiesTab.lessInfoButton);

expect(await propertiesTab.isMoreInfoButtonDisplayed()).toBe(true, 'More information button not displayed');
expect(await propertiesTab.isLessInfoButtonEnabled()).toBe(false, 'Less information button enabled');
expect(await propertiesTab.isPropertiesListExpanded()).toBe(true, 'Properties list not expanded');
});

it('[C599174] Should be able to make the files/folders info drawer expandable as for Sites', async () => {
await dataTable.selectItem(file1.name);
await BrowserActions.click(page.toolbar.viewDetailsButton);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ describe('Library properties', () => {
await BrowserActions.click(page.toolbar.viewDetailsButton);
await infoDrawer.waitForInfoDrawerToOpen();

expect(await infoDrawer.getHeaderTitle()).toEqual('Details');
expect(await infoDrawer.getHeaderTitle()).toEqual(site.name);
expect(await infoDrawer.isPropertiesTabDisplayed()).toBe(true, 'Properties tab is not displayed');
expect(await aboutTab.isNameDisplayed()).toBe(true, 'Name field not displayed');
expect(await aboutTab.isLibraryIdDisplayed()).toBe(true, 'Library ID field not displayed');
Expand Down
72 changes: 36 additions & 36 deletions package-lock.json

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

14 changes: 7 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,11 @@
},
"private": true,
"dependencies": {
"@alfresco/adf-content-services": "6.6.0-7146652899",
"@alfresco/adf-core": "6.6.0-7146652899",
"@alfresco/adf-extensions": "6.6.0-7146652899",
"@alfresco/eslint-plugin-eslint-angular": "6.6.0-7146652899",
"@alfresco/js-api": "7.5.0-7146652899",
"@alfresco/adf-content-services": "6.6.0-7287333895",
"@alfresco/adf-core": "6.6.0-7287333895",
"@alfresco/adf-extensions": "6.6.0-7287333895",
"@alfresco/eslint-plugin-eslint-angular": "6.6.0-7287333895",
"@alfresco/js-api": "7.5.0-7287333895",
"@angular/animations": "14.1.3",
"@angular/cdk": "14.1.3",
"@angular/common": "14.1.3",
Expand Down Expand Up @@ -65,8 +65,8 @@
"zone.js": "0.11.8"
},
"devDependencies": {
"@alfresco/adf-cli": "6.6.0-7146652899",
"@alfresco/adf-testing": "6.6.0-7146652899",
"@alfresco/adf-cli": "6.6.0-7287333895",
"@alfresco/adf-testing": "6.6.0-7287333895",
"@angular-devkit/build-angular": "14.2.11",
"@angular-devkit/core": "14.1.2",
"@angular-devkit/schematics": "14.1.2",
Expand Down
14 changes: 13 additions & 1 deletion projects/aca-content/assets/app.extensions.json
Original file line number Diff line number Diff line change
Expand Up @@ -1243,6 +1243,18 @@
"visible": "showInfoSelectionButton"
}
},
{
"id": "app.toolbar.aspects",
"order": 160,
"title": "APP.ACTIONS.ADD_ASPECTS",
"icon": "playlist_add",
"actions": {
"click": "ASPECT_LIST"
},
"rules": {
"visible": "editAspects"
}
},
{
"id": "app.sidebar.expand",
"order": 200,
Expand All @@ -1252,7 +1264,7 @@
"click": "EXPAND_INFO_DRAWER"
},
"rules": {
"visible": "app.navigation.isNotLibraries"
"visible": "canShowExpand"
}
}
],
Expand Down
8 changes: 5 additions & 3 deletions projects/aca-content/assets/i18n/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,8 @@
"LEAVE": "Leave Library",
"EDIT_OFFLINE": "Edit Offline",
"EDIT_OFFLINE_CANCEL": "Cancel Editing",
"CHANGE_ASPECT": "Edit Aspects"
"CHANGE_ASPECT": "Edit Aspects",
"ADD_ASPECTS": "Add Aspects"
},
"DIALOGS": {
"CONFIRM_PURGE": {
Expand Down Expand Up @@ -394,15 +395,16 @@
},
"INFO_DRAWER": {
"TITLE": "Details",
"CLOSE": "Close",
"REDUCE_PANEL": "Reduce panel",
"DATA_LOADING": "Data is loading",
"ICON": "Node Icon",
"TABS": {
"PROPERTIES": "Properties",
"LIBRARY_PROPERTIES": "About",
"VERSIONS": "Versions",
"COMMENTS": "Comments",
"PERMISSIONS": "Permissions",
"EXPAND": "Expand"
"EXPAND": "Expand panel"
}
},
"TOOLTIPS": {
Expand Down
2 changes: 2 additions & 0 deletions projects/aca-content/src/lib/aca-content.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,8 @@ export class ContentServiceExtensionModule {
canToggleFavorite: rules.canToggleFavorite,
isLibraryManager: rules.isLibraryManager,
canEditAspects: rules.canEditAspects,
editAspects: rules.editAspects,
canShowExpand: rules.canShowExpand,
canInfoPreview: rules.canInfoPreview,
showInfoSelectionButton: rules.showInfoSelectionButton,

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,21 @@
<div class="aca-details-container">
<div class="aca-details-title">
<div class="aca-details-breadcrumb" role="heading" aria-level="2" *ngIf="node">
<span class="aca-details-breadcrumb-library"> {{ node.name }} </span>
-
<span class="aca-details-breadcrumb-item">{{ 'APP.INFO_DRAWER.TITLE' | translate }}</span>
<span class="aca-details-breadcrumb-library">
<img class="aca-details-breadcrumb-icon" alt="{{ 'APP.INFO_DRAWER.ICON' | translate }}" src="{{ nodeIcon }}">
{{ node.name }} </span>
</div>
<div class="acs-details-buttons">
<aca-toolbar [items]="aspectActions" info-drawer-buttons></aca-toolbar>
<button
class="aca-close-details-button"
mat-icon-button
data-automation-id="close-library"
title="{{ 'APP.INFO_DRAWER.REDUCE_PANEL' | translate }}"
(click)="goBack()">
<mat-icon>fullscreen_exit</mat-icon>
</button>
</div>
<button
class="aca-close-details-button"
mat-icon-button
data-automation-id="close-library"
title="{{ 'APP.INFO_DRAWER.CLOSE' | translate }}"
(click)="goBack()">
<mat-icon>fullscreen_exit</mat-icon>
</button>
</div>

<mat-tab-group [selectedIndex]="activeTab" class="aca-details-tabs" animationDuration="0">
Expand Down
Loading

0 comments on commit 90c69b2

Please sign in to comment.