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

[ACS-5540] Moved Aspects icons top of properties panel #3414

Closed
wants to merge 24 commits into from

Conversation

Yasa-Nataliya
Copy link
Contributor

@Yasa-Nataliya Yasa-Nataliya commented Sep 1, 2023

Please check if the PR fulfills these requirements

  • The commit message follows our guidelines
  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)

What kind of change does this PR introduce? (check one with "x")

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • Documentation
  • Other... Please describe:

What is the current behaviour? (You can also link to an open issue here)
In the property panel, there is an aspect icon at the bottom.

What is the new behaviour?
In accordance with the design, we removed the footer of the property panel and moved the edit aspect icon to the top.
screen-capture (16).webm

Does this PR introduce a breaking change? (check one with "x")

  • Yes
  • No

If this PR contains a breaking change, please describe the impact and migration path for existing applications: ...

Other information:
https://alfresco.atlassian.net/browse/ACS-5540
Alfresco/alfresco-ng2-components#8837 was a dependency of this PR.

@Yasa-Nataliya Yasa-Nataliya marked this pull request as ready for review September 5, 2023 16:02
@@ -86,6 +92,8 @@ describe('DetailsComponent', () => {
fixture = TestBed.createComponent(DetailsComponent);
component = fixture.componentInstance;
contentApiService = TestBed.inject(ContentApiService);
mockNodeAspectService = TestBed.inject(NodeAspectService) as jasmine.SpyObj<NodeAspectService>;
Copy link
Contributor

Choose a reason for hiding this comment

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

this needs to be just a real service, you should not deal with mocks here

Copy link
Contributor Author

Choose a reason for hiding this comment

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

updated with NodeAspectService.

this.isNodeLockedSubject.next(isLocked);
}

isNodeLocked(): Observable<boolean> {
Copy link
Contributor

Choose a reason for hiding this comment

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

this should be a public property isNodeLocked$ instead of a function

Copy link
Contributor

Choose a reason for hiding this comment

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

please see other components and the use of observables

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

--adf-metadata-property-panel-border-color: $adf-metadata-property-panel-border-color,
--adf-metadata-buttons-background-color: $adf-metadata-buttons-background-color,
--adf-snackbar-message-background-color: $adf-snackbar-message-background-color,
--adf-snackbar-message-color: $adf-snackbar-message-color
Copy link
Contributor

Choose a reason for hiding this comment

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

this does not seem right... the snackbar colors should already be defined elsewhere, and your PR should be focusing on aspects, not changing other component colors

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 have reverted snackbar colors

@@ -117,13 +118,15 @@ export class ToggleEditOfflineComponent implements OnInit {
}

lockNode(nodeId: string) {
this.nodeActionsService.setNodeLocked(true);
Copy link
Contributor

Choose a reason for hiding this comment

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

you should all this only when "nodesApi.lockNode" is complete

Copy link
Contributor Author

Choose a reason for hiding this comment

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

we are tried this aproach
lockNode(nodeId: string) {
let nodeToBeLocked;
this.nodesApi.unlockNode(nodeId)
.then(() => {
nodeToBeLocked = this.nodeActionsService.setNodeLocked(true);
})
.catch((error) => {
throw new Error(Locking failed - ${error});
});
return nodeToBeLocked;
}
but this not working properly for locking and unlocking the file. so we will take this along wth bug fixes.

Copy link
Contributor

Choose a reason for hiding this comment

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

if you need extra bug fixes after merging this PR then please add those bug fixes here, as the PR is not a clean implementation then

Copy link
Contributor Author

Choose a reason for hiding this comment

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

All bugs in the new design have been fixed

return this.nodesApi.lockNode(nodeId, {
type: 'ALLOW_OWNER_CHANGES',
lifetime: 'PERSISTENT'
});
}

unlockNode(nodeId: string) {
this.nodeActionsService.setNodeLocked(false);
Copy link
Contributor

Choose a reason for hiding this comment

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

should be called only when "unlockNode" is complete, use "subscribe" or "then"

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@@ -117,13 +118,15 @@ export class ToggleEditOfflineComponent implements OnInit {
}

lockNode(nodeId: string) {
this.nodeActionsService.setNodeLocked(true);
Copy link
Contributor

Choose a reason for hiding this comment

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

if you need extra bug fixes after merging this PR then please add those bug fixes here, as the PR is not a clean implementation then

@Input()
node: Node;

displayAspect$: Observable<string>;
canUpdateNode = false;
editable = false;
editableTags = false;
editableCategories = false;
group: any = {
Copy link
Contributor

Choose a reason for hiding this comment

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

can you avoid using any?

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 will update this once ADF upstream PR merges.

Copy link
Contributor

Choose a reason for hiding this comment

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

ok please correct it after ADF upstream PR is merged and before you merge that ACA PR.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sure

@AleksanderSklorz
Copy link
Contributor

@Yasa-Nataliya I will approve that PR whenever last comment #3414 (comment) (regarding to correct type) will be addressed so whenever you merge ADF upstream and correct that type in this ACA PR after merging upstream as rest my comments are addressed.


&:focus {
background-color: var(--theme-selected-background-color);
outline: 2px solid var(--theme-blue-button-color);
Copy link
Contributor

Choose a reason for hiding this comment

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

Some focus styling are not working as expected
Zrzut ekranu 2023-09-29 o 12 04 21
Zrzut ekranu 2023-09-29 o 12 04 36
Zrzut ekranu 2023-09-29 o 12 04 51

Copy link
Contributor

Choose a reason for hiding this comment

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

Same for close and save buttons for each section

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We have fixed the focus issue.

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.

5 participants