Skip to content
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

[MNT-24575] Added dialog to display folder information #4282

Open
wants to merge 10 commits into
base: develop
Choose a base branch
from

Conversation

swapnil-verma-gl
Copy link
Contributor

JIRA ticket link or changeset's description
https://hyland.atlassian.net/browse/MNT-24575

Added new dialog accessible via context menu to display folder information such as folder location, size, file count etc

@AleksanderSklorz
Copy link
Contributor

@swapnil-verma-gl I'm getting some issue. When I'm opening dialog then many errors are inside console and dialog's look is broken:
image

@AleksanderSklorz
Copy link
Contributor

AleksanderSklorz commented Dec 19, 2024

@swapnil-verma-gl I see 2 issues, see video:

Screen.Recording.2024-12-19.at.12.51.55.mov
  1. It says that there is 0 bytes but this folder has image inside so should have some bytes.
  2. There is {{count}} placeholder instead of real number

NOTE: After some time, when you wait a bit, it seems working correctly.
NOTE2: Second issue happens also for folders with no files

@AleksanderSklorz
Copy link
Contributor

@swapnil-verma-gl there is some accessibility issue:
image

@swapnil-verma-gl
Copy link
Contributor Author

@swapnil-verma-gl there is some accessibility issue: image

This issue is for the close button on the dialog, and seems to be related to the generic DialaogComponent (that folder information dialog is also using). It is also visible on the Manage Holds Dialog, which is also using the same Dialog component. I can fix it in this PR, but it would be in a completely separate file and not related to this feature. Should I do it, or raise a separate ticket for it?

@AleksanderSklorz
Copy link
Contributor

@swapnil-verma-gl there is some accessibility issue: image

This issue is for the close button on the dialog, and seems to be related to the generic DialaogComponent (that folder information dialog is also using). It is also visible on the Manage Holds Dialog, which is also using the same Dialog component. I can fix it in this PR, but it would be in a completely separate file and not related to this feature. Should I do it, or raise a separate ticket for it?

If that is small fix then it should be fine to fix it as part of this task. If this is bigger fix then you can create separate task. This fix probably won't be too big

@swapnil-verma-gl
Copy link
Contributor Author

swapnil-verma-gl commented Dec 20, 2024

@swapnil-verma-gl I see 2 issues, see video:

Screen.Recording.2024-12-19.at.12.51.55.mov

  1. It says that there is 0 bytes but this folder has image inside so should have some bytes.
  2. There is {{count}} placeholder instead of real number

NOTE: After some time, when you wait a bit, it seems working correctly. NOTE2: Second issue happens also for folders with no files

It is possible that the size calculation does not happen properly for newly created files and folders (similar to how search does not seem to include newly uploaded files, until after their indexing is completed). I do remember their being some sort of discussion around the backend using indexes for efficiently calculating file sizes.

For empty folder, however, it does seem to be an issue. I am in discussion with the Backend team responsible for building the API around this, as the frontend doesn't really do any processing to the response other than mapping it to the UI elements.

The {{ count }} placeholder appearing is a bug, and I wlll fix that in an upcoming commit

@swapnil-verma-gl
Copy link
Contributor Author

@swapnil-verma-gl there is some accessibility issue: image

This issue is for the close button on the dialog, and seems to be related to the generic DialaogComponent (that folder information dialog is also using). It is also visible on the Manage Holds Dialog, which is also using the same Dialog component. I can fix it in this PR, but it would be in a completely separate file and not related to this feature. Should I do it, or raise a separate ticket for it?

If that is small fix then it should be fine to fix it as part of this task. If this is bigger fix then you can create separate task. This fix probably won't be too big

Pushed the fix. It will appear in the ADF PR, since the DialogComponent is part of the ADF repo

@@ -0,0 +1,32 @@
<div class="aca-folder-info-header">
<img alt="{{ 'APP.FOLDER_INFO.ICON' | translate }}" ngSrc="{{ folderDetails.icon }}" width="24" height="24">
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't we use adf-icon for this?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tried to use adf-icon, but internally, its using mat-icons. Because of this, the only way for adf-icon to pickup custom svg icons from our assets folders, is by defining it in our app.extensions.json file. The other, more simpler option, if we have to use adf-icons, is to use mat-icons folder icon. However, using that would make this have a slight deviation from the figma design document. Do we want to go with

  • Modified extensions.json to use the folder icon from assets folder
  • Mat icons folder icon
  • Leave this as-is

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm to be honest I would start by asking the UX team if the material icon would be fine in this case, if they agree the issue is solved, if not I would go with custom icon and extensions.json modifications

: EMPTY
),
catchError(() => {
this.folderDetails.size = this.translateService.instant('APP.FOLDER_INFO.ERROR');
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we make the error message a bit more specific depending on the error that BE returns us?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And what about the error messages here?

}),
takeUntilDestroyed(this.destroyRef),
catchError(() => {
this.folderDetails.size = this.translateService.instant('APP.FOLDER_INFO.ERROR');
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here

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.

3 participants