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-6140] - Remove references to internal Angular Material CSS classes #9271

Conversation

dominikiwanekhyland
Copy link
Contributor

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)

What is the new behaviour?
All internal Angular Material CSS classes are removed and replaced with our custom classes. Changes in Angular Material library with classes won't affect our app.

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:

@dominikiwanekhyland dominikiwanekhyland force-pushed the ACS-6140-adf-remove-references-to-internal-angular-material-css-classes branch from 067c329 to 8000e61 Compare January 23, 2024 07:43
@nikita-web-ua
Copy link
Contributor

Screenshot 2024-01-24 at 14 15 08

It appears that the width of some search filter components is not being applied correctly.

@nikita-web-ua
Copy link
Contributor

Screenshot 2024-01-24 at 14 23 35
On file properties panel labels have different font size, and margin

@nikita-web-ua
Copy link
Contributor

The user/group block has decreased in length
Screenshot 2024-01-24 at 14 30 30
Before:
Screenshot 2024-01-24 at 14 32 09

&-datatable-selected.mat-icon {
height: 100%;
width: 100%;
margin-left: -2px;
Copy link
Contributor

Choose a reason for hiding this comment

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

This styles are not always used with adf-people-select-icon class. For example here:
Screenshot 2024-01-24 at 14 57 30
So now magin is not applied and icon has wrong alignment
Screenshot 2024-01-24 at 14 58 51

@dominikiwanekhyland dominikiwanekhyland force-pushed the ACS-6140-adf-remove-references-to-internal-angular-material-css-classes branch 3 times, most recently from 727a9e4 to e0733e0 Compare January 29, 2024 15:56
Copy link
Contributor

@DenysVuika DenysVuika left a comment

Choose a reason for hiding this comment

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

looks great, please see comments

(selectedIndexChange)="onTabSelectionChange($event)"
[class.adf-content-node-selector-headless-tabs]="!canPerformLocalUpload()">
<mat-tab label="{{ 'NODE_SELECTOR.REPOSITORY' | translate }}">
<adf-content-node-selector-panel
Copy link
Contributor

Choose a reason for hiding this comment

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

What's happening here? it doesn't seem a style refactoring

Copy link
Contributor Author

@dominikiwanekhyland dominikiwanekhyland Feb 2, 2024

Choose a reason for hiding this comment

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

Yes, it's refactor of angular materials component usage. In my opinion current usage was not correct. It created a mat-tab-group, which in some cases showed only one tab and was hiding all the styling from mat-tab components. In other case it had 2 tabs and displayed everything normally. It requrired a lot of css manipulation. I think it's easier and more clear to separate those 2 situations: if required show everything in mat-tab component, else show it normally. Thanks to that, there is no need in css manipulation and I could delete some parts of scss files with mat- names.

Copy link
Contributor

Choose a reason for hiding this comment

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

I understand but as this is already a huge PR wouldn't it be possible to target this work on a separated PR?

@@ -38,72 +38,64 @@

<mat-menu #menu="matMenu" id="user-profile-lists" [xPosition]="menuPositionX" [yPosition]="menuPositionY"
[overlapTrigger]="false" class="adf-userinfo-menu">
<mat-tab-group id="tab-group-env" (click)="stopClosing($event)" selectedIndex="0" role="menuitem"
Copy link
Contributor

Choose a reason for hiding this comment

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

Also here, isn't this a rework of the user-info for content?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

same situation

Copy link
Contributor

@VitoAlbano VitoAlbano left a comment

Choose a reason for hiding this comment

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

I've added some comments please have a look

@@ -19,7 +19,7 @@
</button>

<mat-menu #filter="matMenu"
class="adf-filter-menu"
class="adf-filter-menu adf-search-filter-menu"
Copy link
Contributor

Choose a reason for hiding this comment

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

Wouldn't it be better have just a single style for this one?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, it would, but the css specificity from angular material, makes me do this that way as they do the same thing sometimes. I couldn't have found a better solution for that

Copy link
Contributor

Choose a reason for hiding this comment

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

We can incorporate the style we need to add in the normal style flow, having multiple styles is something we avoided as it created a lot of confusion long ago, if this component need that style please add it to the relative one

@@ -1,11 +1,11 @@
<mat-tree class="adf-tree-view-main" [dataSource]="dataSource"
[treeControl]="treeControl" *ngIf="nodeId; else missingNodeId">
<mat-tree-node class="adf-tree-view-node"
<mat-tree-node class="adf-tree-view adf-tree-view-node"
Copy link
Contributor

Choose a reason for hiding this comment

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

as above wouldn't it be easier to have a single style 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.

same situation

*matTreeNodeDef="let treeNode" id="{{treeNode.name + '-tree-node'}}"
matTreeNodePadding [matTreeNodePaddingIndent]="15">
{{treeNode.name}}
</mat-tree-node>
<mat-tree-node class="adf-tree-view-node"
<mat-tree-node class="adf-tree-view adf-tree-view-node"
Copy link
Contributor

Choose a reason for hiding this comment

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

here too

Copy link
Contributor Author

Choose a reason for hiding this comment

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

same situation

<mat-icon mat-list-icon>insert_drive_file</mat-icon>
<p mat-line class="adf-version-list-item-name" [id]="'adf-version-list-item-name-' + version.entry.id" >{{version.entry.name}}</p>
<p mat-line class="adf-version-list-item-line adf-version-list-item-name" [id]="'adf-version-list-item-name-' + version.entry.id" >{{version.entry.name}}</p>
Copy link
Contributor

Choose a reason for hiding this comment

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

as above

Copy link
Contributor Author

Choose a reason for hiding this comment

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

same situation

<span *ngIf="showName" id="adf-userinfo-identity-name-display" class="adf-userinfo-name">
{{identityUser | fullName}}
</span>
<button mat-button [matMenuTriggerFor]="menu" class="adf-userinfo-menu_button"
<button mat-button [matMenuTriggerFor]="menu" class="adf-userinfo-menu_button adf-identity-userinfo-button"
Copy link
Contributor

Choose a reason for hiding this comment

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

multiple styles here as well

Copy link
Contributor Author

Choose a reason for hiding this comment

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

same situation

@dominikiwanekhyland dominikiwanekhyland force-pushed the ACS-6140-adf-remove-references-to-internal-angular-material-css-classes branch from e0733e0 to d153c38 Compare February 2, 2024 10:23
@dominikiwanekhyland dominikiwanekhyland force-pushed the ACS-6140-adf-remove-references-to-internal-angular-material-css-classes branch from d153c38 to c510cd7 Compare February 2, 2024 10:37
@nikita-web-ua
Copy link
Contributor

Search facet chips on hover (left one on the pic) have become darker with some light border
Screenshot 2024-02-02 at 15 38 43
Current design, (left one hovered as well)
Screenshot 2024-02-02 at 15 38 50

@nikita-web-ua
Copy link
Contributor

Filter icon now misaligned
Screenshot 2024-02-02 at 15 49 48

@dominikiwanekhyland
Copy link
Contributor Author

Filter icon now misaligned Screenshot 2024-02-02 at 15 49 48

image

That's the state of current develop branch, I think that's someone's else change and probably that's the change someone has made deribelately.

@dominikiwanekhyland dominikiwanekhyland force-pushed the ACS-6140-adf-remove-references-to-internal-angular-material-css-classes branch from c510cd7 to bea035c Compare February 7, 2024 13:23
@dominikiwanekhyland dominikiwanekhyland force-pushed the ACS-6140-adf-remove-references-to-internal-angular-material-css-classes branch from bea035c to 46cca6b Compare February 8, 2024 14:08
@dominikiwanekhyland dominikiwanekhyland force-pushed the ACS-6140-adf-remove-references-to-internal-angular-material-css-classes branch from 46cca6b to 8116b47 Compare February 8, 2024 18:48
Copy link

sonarqubecloud bot commented Feb 8, 2024

Quality Gate Passed Quality Gate passed

Issues
1 New issue

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

@dominikiwanekhyland dominikiwanekhyland merged commit 6d93d01 into develop Feb 9, 2024
33 checks passed
@dominikiwanekhyland dominikiwanekhyland deleted the ACS-6140-adf-remove-references-to-internal-angular-material-css-classes branch February 9, 2024 07:22
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.

4 participants