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

Icons in navigation nodes #306

Merged
merged 20 commits into from
Jan 9, 2019

Conversation

parostatkiem-zz
Copy link
Contributor

Description

Changes proposed in this pull request:

  • icon property can now be used in Top and Side navigation configuration
  • If an icon is defined for TopNav's Node, it is rendered instead of the label
  • e2e tests

Related issue(s)

@@ -247,6 +247,7 @@ The node parameters are as follows:
- **loadingIndicator.enabled** shows a loading indicator when switching between micro front-ends. If you have a fast micro front-end, you can disable this feature to prevent flickering of the loading indicator. This parameter is enabled by default.
- **loadingIndicator.hideAutomatically** disables the automatic hiding of the loading indicator once the micro front-end is loaded. It is only considered if the loading indicator is enabled. It does not apply if the loading indicator is activated manually with the `LuigiClient.uxManager().showLoadingIndicator()` function. If the loading indicator is enabled and automatic hiding is disabled, use `LuigiClient.uxManager().hideLoadingIndicator()` to hide it manually in your micro front-end during the startup. This parameter is enabled by default.
- **viewGroup** defines a group of views in the same domain sharing a common security context. This improves performance through reusing the frame. Use **viewGroup** only for the views that use path routing internally.
- **icon** is the name if an icon from [OpenUI](https://openui5.hana.ondemand.com/1.40.10/iconExplorer.html) that will be shown next to the Node's label (side navigation) or instead of it (top navigation).

Choose a reason for hiding this comment

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

Suggested change
- **icon** is the name if an icon from [OpenUI](https://openui5.hana.ondemand.com/1.40.10/iconExplorer.html) that will be shown next to the Node's label (side navigation) or instead of it (top navigation).
- **icon** is the name if an icon from the [OpenUI](https://openui5.hana.ondemand.com/1.40.10/iconExplorer.html) displayed next to the Node label in the side navigation or instead of the label in the top navigation.

Copy link
Contributor

Choose a reason for hiding this comment

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

Additionally: ...is the name of an icon

@dariadomagala-sap dariadomagala-sap self-assigned this Dec 27, 2018
Copy link
Contributor

@dariadomagala-sap dariadomagala-sap left a comment

Choose a reason for hiding this comment

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

Just small comments, but overall looks good.

@@ -247,6 +247,7 @@ The node parameters are as follows:
- **loadingIndicator.enabled** shows a loading indicator when switching between micro front-ends. If you have a fast micro front-end, you can disable this feature to prevent flickering of the loading indicator. This parameter is enabled by default.
- **loadingIndicator.hideAutomatically** disables the automatic hiding of the loading indicator once the micro front-end is loaded. It is only considered if the loading indicator is enabled. It does not apply if the loading indicator is activated manually with the `LuigiClient.uxManager().showLoadingIndicator()` function. If the loading indicator is enabled and automatic hiding is disabled, use `LuigiClient.uxManager().hideLoadingIndicator()` to hide it manually in your micro front-end during the startup. This parameter is enabled by default.
- **viewGroup** defines a group of views in the same domain sharing a common security context. This improves performance through reusing the frame. Use **viewGroup** only for the views that use path routing internally.
- **icon** is the name if an icon from [OpenUI](https://openui5.hana.ondemand.com/1.40.10/iconExplorer.html) that will be shown next to the Node's label (side navigation) or instead of it (top navigation).
Copy link
Contributor

Choose a reason for hiding this comment

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

Additionally: ...is the name of an icon

cy.get('button[title="Settings"]').should('contain', '');
});

it('Icon instead of label in LeftNav', () => {
Copy link
Contributor

Choose a reason for hiding this comment

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

Icon with label in the left nav :)

{node.label}
{#if node.externalLink && node.externalLink.url}
<span class="sap-icon--action sap-icon--s"></span>
<span class="sap-icon--action sap-icon--s external-link"></span>
Copy link
Contributor

Choose a reason for hiding this comment

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

this additional class is not used anywhere

@y-kkamil y-kkamil self-assigned this Jan 2, 2019
@y-kkamil
Copy link

y-kkamil commented Jan 2, 2019

please add support for custom icons loaded from external url in addition to OpenUI5 icons

@y-kkamil y-kkamil removed their assignment Jan 2, 2019
@maxmarkus maxmarkus added the WIP Work in progress label Jan 2, 2019
@parostatkiem-zz parostatkiem-zz removed the WIP Work in progress label Jan 3, 2019
@dariadomagala-sap
Copy link
Contributor

👍
We should probably consider adding support for external urls in categories icons as well (not in this task).

@pekura pekura self-assigned this Jan 4, 2019
@pekura
Copy link
Contributor

pekura commented Jan 4, 2019

If some nodes are without an icon the labels are not aligned any more:

bildschirmfoto 2019-01-04 um 21 39 50

@pekura
Copy link
Contributor

pekura commented Jan 4, 2019

The icon for the "Keep Selected Example" is confusing, it makes you think that it is some kind of expandable group node; it is just our sample app but still..

@bszwarc bszwarc self-assigned this Jan 9, 2019
@parostatkiem-zz parostatkiem-zz merged commit be275d0 into SAP:master Jan 9, 2019
@parostatkiem-zz parostatkiem-zz deleted the icons-in-navigation-nodes branch January 9, 2019 13:23
stanleychh pushed a commit to stanleychh/luigi that referenced this pull request Dec 30, 2021
* Implement icons in left nav

* Add e2e tests

* Update docu

* Add ability to set custom node icons

* Implement image icons in side nav groups

* Reorganize icon styling & improve nav links alignment

* added more icons to the sample config
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants