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

Add tooltipText param to TopNav and LeftNav #2242

Merged
merged 32 commits into from
Oct 25, 2021

Conversation

rafalgamon
Copy link
Contributor

Description

Changes proposed in this pull request:

  • Add tooltipText param to TopNav and LeftNav

Copy link
Contributor

@ndricimrr ndricimrr left a comment

Choose a reason for hiding this comment

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

Worked fine 👍 .

  • However, noticed that it doesn't disable tooltips if tooltipText set to empty string.

  • Other thing is defaults.tooltipText is also missing. If I got it right from Philipps comment , one should be able to define.

      navigation: { 
            defaults: {
                  tooltipText: false
            },
            ...
       }

Not sure on details of the defaults mechanism (boolean vs string), but can discuss this in daily.

core/src/navigation/LeftNav.html Outdated Show resolved Hide resolved
Copy link
Contributor

@ndricimrr ndricimrr left a comment

Choose a reason for hiding this comment

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

Had another look, added some suggestions for improvements below. Currently, defaults.tooltipText was not working for me locally.

docs/navigation-parameters-reference.md Show resolved Hide resolved
core/src/navigation/LeftNav.html Outdated Show resolved Hide resolved
core/src/navigation/LeftNav.html Outdated Show resolved Hide resolved
@UlianaMunich UlianaMunich added WIP Work in progress and removed WIP Work in progress labels Sep 14, 2021
Copy link
Contributor

@alexandra-simeonova alexandra-simeonova left a comment

Choose a reason for hiding this comment

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

I added a few comments to the docu above ^

rafalgamon and others added 2 commits September 17, 2021 09:44
Co-authored-by: Aleksandra Simeonova <aleksandra.simeonova@sap.com>
Co-authored-by: Aleksandra Simeonova <aleksandra.simeonova@sap.com>
@ndricimrr
Copy link
Contributor

ndricimrr commented Sep 23, 2021

Global defaults.tooltipText and tooltipText on node level, both worked well. However, I couldn't see how to make it work on the Top navigation.

Some small addition to the defaults.tooltipText documentation could be done, to clear the confusion on how it works together with the node level one.

Copy link
Contributor

@ndricimrr ndricimrr left a comment

Choose a reason for hiding this comment

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

LGTM

Tested again and worked as described. Only some minor docu suggestions.

docs/navigation-parameters-reference.md Outdated Show resolved Hide resolved
@@ -267,7 +270,7 @@
class="lui-side-nav__footer--icon {isSemiCollapsed ? 'sap-icon--open-command-field' : 'sap-icon--close-command-field'}"
on:click="{() => semiCollapsibleButtonClicked(this)}"
data-testid="semiCollapsibleButton"
title="{burgerTooltip}"
title="burgerTooltip"
Copy link
Contributor

Choose a reason for hiding this comment

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

i assume removing the curly braces here was not intended, please revert

@@ -416,6 +416,22 @@ class NavigationHelpersClass {
reject(error);
});
}

generateTooltipText(node, translation) {
Copy link
Contributor

Choose a reason for hiding this comment

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

logic should be like follows:

let tt_text = node.tooltipText;
if(tt_text === undefined) {
   tt_text = LuigiConfig.getConfigValue('navigation.defaults.tooltipText');
}

if(tt_text === undefined) {
   return translation;
} else if(tt_text === false) {
   return '';
} else {
  return LuigiI18N.getTranslation(tt_text);
}


### defaults.isolateView
- **type**: boolean
- **description**: renders all views in new frames. This setting overrides the same-domain frame reuse.
- **default**: the parameter **defaults.isolateView** is `false` by default, and you can overwrite it using the **isolateView** value on a single node level.

### tooltipText
Copy link
Contributor

Choose a reason for hiding this comment

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

"tooltipText" docu should be under "Node Parameters", defaults.tooltipText can stay here


### defaults.isolateView
- **type**: boolean
- **description**: renders all views in new frames. This setting overrides the same-domain frame reuse.
- **default**: the parameter **defaults.isolateView** is `false` by default, and you can overwrite it using the **isolateView** value on a single node level.

### tooltipText
- **type**: string
- **description**: allows to overwrite a **defaults.tooltipText** to any of the links and buttons of the left side navigation and 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.

don't refer to defaults here, defaults are just a convenience functionality.
Write something like
"Allows to set a custom tooltip text for this node or to disable the tooltip by setting the value to false"

@JohannesDoberer JohannesDoberer merged commit 8966746 into SAP:master Oct 25, 2021
@JohannesDoberer JohannesDoberer mentioned this pull request Nov 2, 2021
stanleychh pushed a commit to stanleychh/luigi that referenced this pull request Dec 30, 2021
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.

6 participants