-
Notifications
You must be signed in to change notification settings - Fork 149
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
[ACA-4728] fix file order in viewer #3631
[ACA-4728] fix file order in viewer #3631
Conversation
Quality Gate failedFailed conditions 64.6% Duplication on New Code (required ≤ 3%) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@g-jaskowski @MichalKinas what do you think about creating single component instead of two different components (preview and viewer)?
Both components look almost the same, they have even similar unit tests. It would simplify maintenance in the future because changes would be required only in single component instead of in two.
This task is just bug fix so probably we would not like to do it here but maybe in separate task, what do you think? Would that be possible and good idea or better keep them as separate components?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it might not be that easy as preview has another custom use case, when client has a custom plugin e.g. starting a new process he can use preview component to check if file that he wants to attach to the process is correct. We would need to check that use case and investigate if those can be merged then
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for response @MichalKinas. So should @g-jaskowski raise task to investigate that possibility and eventually merge these 2 components together if possible?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes that's good idea to investigate that separately
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
great, then @g-jaskowski could you please raise task for this and put it to your team's board?
@g-jaskowski before merging that PR please check sonarcloud issues |
I added |
14c188c
to
3be3ff7
Compare
@AleksanderSklorz @MichalKinas I tried to reduce code duplication with the refactor, it's still quite high, but can be lowered with some unit test optimization. |
projects/aca-content/viewer/src/lib/components/preview/preview.component.ts
Outdated
Show resolved
Hide resolved
projects/aca-content/viewer/src/lib/components/viewer/viewer.component.spec.ts
Outdated
Show resolved
Hide resolved
projects/aca-content/viewer/src/lib/components/viewer/viewer.component.spec.ts
Outdated
Show resolved
Hide resolved
projects/aca-content/viewer/src/lib/components/viewer/viewer.component.ts
Outdated
Show resolved
Hide resolved
projects/aca-content/viewer/src/lib/services/viewer.service.spec.ts
Outdated
Show resolved
Hide resolved
2a3f455
to
2a379fa
Compare
d663fb3
to
41d2c31
Compare
ca6e3ac
to
1561917
Compare
…ting in viewer and document pages when client sorting, add viewer unit tests
… tests, reduce duplication
1561917
to
0783b01
Compare
Quality Gate passedIssues Measures |
Please check if the PR fulfills these requirements
What kind of change does this PR introduce? (check one with "x")
What is the current behaviour? (You can also link to an open issue here)
Files browsed in viewer with previous/next buttons have different order than in document list.
https://alfresco.atlassian.net/browse/ACA-4728
What is the new behaviour?
Getting file order in viewer is set accordingly to sorting mode and unified between pages and viewer.
Last sorting key is saved and used to prevent datatable rows changing order after closing viewer.
Folder structure is changed to reduce code duplication.
Does this PR introduce a breaking change? (check one with "x")
If this PR contains a breaking change, please describe the impact and migration path for existing applications: ...
Other information: