question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Proposal: Make the Tooltips of the NumberBox SpinButtons customizable

See original GitHub issue

Proposal: Make the Tooltips of the NumberBox SpinButtons customizable

Summary

It’s impossible right now to set tooltips for the NumberBox’s spin buttons without having to re-template the control or walk the visual tree. However, spin button tooltips would prove valuable here for developers to inform their app users what exactly will happen when they press these buttons. For example, users could learn by how much the NumberBox value will actually be increased/decreased without them having to actually press the button first and see the resulting value.

This addition to the NumberBox was also suggested by @lhak here. While they mentioned this in the NumberBox V2 collection thread I don’t think this should be treated as a NumberBox V2 feature. I actually view this is as an oversight in the design of NumberBox V1 and as such we should address this unrelated to NumberBox V2. This will not add new functionality like a “mini-calculator support” or a “calculation result preview” which logically appear to fit NumberBox V2 much better. Instead, we will enable developers with this proposal to provide a good UX for the existing NumberBox V1 without much additional work on their part.

Rationale

Enable developers to easily inform users by how much a value will be increased/decreased without requiring them to actually click on the spin buttons first.

Scope

Capability Priority
Enable developers to set tooltips for the NumberBox up/down spin buttons. Must

API Proposal

public class NumberBox
{
    public static DependencyProperty SpinButtonUpToolTipProperty { get; }

    public object SpinButtonUpToolTip { get; set; }

    public static DependencyProperty SpinButtonDownToolTipProperty { get; }

    public object SpinButtonDownToolTip { get; set; }
}

API example

The following XAML markup

<NumberBox
    SmallChange="5"
    SpinButtonUpToolTip="Increase by 5"
    SpinButtonDownToolTip="Decrease by 5"/>

will give us this experience: numberbox-spinbutton-tooltip

As you can see, I set the ToolTip::PlacementMode for the down spin button to PlacementMode::Bottom when in SpinButtonPlacementMode::Compact as it would otherwise occlude the up spin button, like this: image

Since both spin buttons are grouped together here, their respective tooltips should not occlude the other button.

Additional Note

I have already created these APIs in a local branch and could create a PR with these API additions as well as an API spec - if the team approves of this proposal.

Issue Analytics

  • State:open
  • Created 3 years ago
  • Reactions:1
  • Comments:11 (9 by maintainers)

github_iconTop GitHub Comments

1reaction
shaheedmalikcommented, Jul 3, 2020

I think the problem I was referring to had to do with the SplitBox’s tooltip being in the way on the control. Not the actual customization of it. I misinterpreted the proposal. Disregard.

0reactions
Felix-Devcommented, Oct 15, 2020
Read more comments on GitHub >

github_iconTop Results From Across the Web

NumberBox - How to change the position of spin buttons
Hi, I'm looking for a way to put the 'minus' button on left side, as shown in the attached picture. Is there a...
Read more >
Kendo UI for Angular NumericTextBox Overview
The Kendo UI for Angular NumericTextBox enables the user to edit and submit specific numeric values by typing or by using the spin...
Read more >
NumberBoxSpinButtonPlacemen...
Defines values that specify how the spin buttons used to increment or decrement the Value of a NumberBox are displayed. This documentation applies...
Read more >
Stackable – Page Builder Gutenberg Blocks - Plugins
Build dynamic websites with our powerful yet lightweight custom WordPress blocks, ready-made designs, UI Kits, global settings, and advanced customization ...
Read more >
PeopleTools 8.51 PeopleBook: Using PeopleSoft Applications
Copying, Sharing, and Deleting Page Customization Settings . ... Typically, tool tips display what a button or link will do and may list...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found