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

refactor(icon-service): update icon reference names and registration #14598

Merged
merged 24 commits into from
Aug 14, 2024

Conversation

simeonoff
Copy link
Collaborator

@simeonoff simeonoff commented Jul 29, 2024

Closes #

Additional information (check all that apply):

  • Bug fix
  • New functionality
  • Documentation
  • Demos
  • CI/CD

Checklist:

  • All relevant tags have been applied to this PR
  • This PR includes unit tests covering all the new code (test guidelines)
  • This PR includes API docs for newly added methods/properties (api docs guidelines)
  • This PR includes feature/README.MD updates for the feature docs
  • This PR includes general feature table updates in the root README.MD
  • This PR includes CHANGELOG.MD updates for newly added functionality
  • This PR contains breaking changes
  • This PR includes ng update migrations for the breaking changes (migrations guidelines)
  • This PR includes behavioral changes and the feature specification has been updated with them

@@ -20,7 +20,7 @@
[attr.aria-labelledby]="label?.id" aria-haspopup="dialog" aria-autocomplete="none" role="combobox">

<igx-suffix *ngIf="!clearComponents.length && value" (click)="clear()">
<igx-icon family="default" name="clear"></igx-icon>
<igx-icon family="default" name="input_clear"></igx-icon>
Copy link
Member

Choose a reason for hiding this comment

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

While I'm all for some consistency at last and I think this is the right change, just need to point out it will pull the clear icon in date and time pickers, file and filtering inputs in line with the combos.
For reference before and after, with combo below:
image

Could always swap it the other way around (and change the combo's), but at least it'll be consistent across the board.

Copy link
Member

Choose a reason for hiding this comment

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

Managed to dig up this from the Simple Combo spec: https://xd.adobe.com/view/f0a2ac12-9c3d-48bd-89c8-b9f1b0ee6a25-a5f1/ so um maybe it's the Combos that are not consistent with the rest?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I will consult with Svilen on this one, but I'd also like to keep the clear icon consistent across input, combo, select, and the various pickers we have.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

So we agreed to make changes to the date/time picker in the UI kit. From now on, they will use the same icon as the combo component.

@@ -46,7 +46,7 @@
}}</div>
<igx-icon
family="default"
[name]="value ? 'check' : 'close'"
[name]="value ? 'confirm' : 'close'"
Copy link
Member

Choose a reason for hiding this comment

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

This is the same ✔ and ❌ across the board, however should we sematically separate this one (for all cells). I lack the imagination to come up with alternative icons that wouldn't fit both uses, but figured should be pointed out.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I couldn't come up with a scenario in which changing the confirm in the other places will affect the cell in any way, I believe semantically they are all the same action in all components, including the cell.

@@ -215,7 +215,7 @@
(click)="toggleOperatorsDropDown($event, i)"
[igxDropDownItemNavigation]="operators"
[style.--ig-size]="filteringElementsSize">
<igx-icon family="default" name="expand"></igx-icon>
<igx-icon family="default" name="expand_more"></igx-icon>
Copy link
Member

Choose a reason for hiding this comment

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

Would this also make sense w/ just expand?
Technically even input_expand if this https://getbootstrap.com/docs/4.0/components/dropdowns/#single-button-dropdowns is anything to go by and we're okay with a minor icon change other themes.
From what I can see the expand_more is pretty much dedicated to this button and we can drop it if we assign it one of the other two aliases.

Copy link
Member

Choose a reason for hiding this comment

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

Then again there's the toolbar export button (for all themes):
image
Those two could be the same thing as well.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Would this also make sense w/ just expand? Technically even input_expand if this https://getbootstrap.com/docs/4.0/components/dropdowns/#single-button-dropdowns is anything to go by and we're okay with a minor icon change other themes. From what I can see the expand_more is pretty much dedicated to this button and we can drop it if we assign it one of the other two aliases.

I don't agree with input_expand as it changes from theme to theme, and is semantically different. The expand is closer in meaning, but I believe choosing the arrow_drop_down icon was intentional, thus I kept it as a separate reference used only in a few awkward places.

Copy link
Member

Choose a reason for hiding this comment

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

They do indeed - IIRC Fluent Design consistently uses a chevron for both select and split/menu buttons, Material seems to be using this type of arrow for selects & buttons pretty consistently too, though we've strayed from that. And yes, I know that's opening another can of worms and can be dealt with separately.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

The icon in the export button of the toolbar will be changed to file_download from material.

projects/igniteui-angular/src/lib/icon/icon.references.ts Outdated Show resolved Hide resolved
class="igx-pivot-data-selector__action-summary"
*ngIf="panel.type === null"
(click)="onSummaryClick($event, item, dropdown)"
[igxDropDownItemNavigation]="dropdown">
</igx-icon>
<igx-icon
family="default"
name="drag_handle"
name="drag_indicator"
Copy link
Member

Choose a reason for hiding this comment

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

I personally don't mind for consistency (matches Row Drag), just noting that this used to be drag_handle which is a bit different looking:
image
Looks about as good or nondescript as before in the the data selector context
image

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I will consult with Svilen about this one. I really want to reduce the amount of ambiguous icons sprinkled all over. Technically both icons are used as drag handles.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Svilen and I agreed that the drag_indicator will be used in both places.

@@ -173,9 +173,9 @@ <h6 class="igx-pivot-data-selector__header-title">
[class.igx-pivot-data-selector__item-ghost--no-drop]="!dropAllowed"
>
<div class="igx-pivot-data-selector__item-ghost-text">
<igx-icon family="default" name="unfold_more"></igx-icon>
<igx-icon family="default" name="import_export"></igx-icon>
Copy link
Member

Choose a reason for hiding this comment

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

This one also changes the design a bit, though even before unfold_more didn't semantically sit right since it was a drag indicator on it's own trying to convey direction to move I guess? So nothing to do with the expand/collapse actions that's used elsewhere.

That said, the import/export arrows are only used in the Toolbar export button (lol on the import part) but that also doens't sound like the same thing it's here and we might need to consider this for a separate alias or something more drag related.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yes, it does. To be honest this icon makes a ton more sense in this scenario than the unfold_more icon as you are exporting an item from one area and importing it into another vertical area either above or below. I will consult with Svilen about this change as well. To me, the icon that should be different is the one used for the export button.

Copy link
Member

@damyanpetev damyanpetev left a comment

Choose a reason for hiding this comment

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

Just typos, otherwise 👌. Thanks for adding this bit.

projects/igniteui-angular/src/lib/icon/icon.references.ts Outdated Show resolved Hide resolved
projects/igniteui-angular/src/lib/icon/icon.references.ts Outdated Show resolved Hide resolved
projects/igniteui-angular/src/lib/icon/icon.references.ts Outdated Show resolved Hide resolved
@tishko0 tishko0 added ✅ status: verified Applies to PRs that have passed manual verification and removed ❌ status: awaiting-test PRs awaiting manual verification labels Aug 2, 2024
@ChronosSF ChronosSF merged commit cb089fb into 18.1.x Aug 14, 2024
4 checks passed
@ChronosSF ChronosSF deleted the simeonoff/icon-refs-update branch August 14, 2024 11:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
icon-service version: 18.1.x ✅ status: verified Applies to PRs that have passed manual verification
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants