microsoft / calculator

Windows Calculator: A simple yet powerful calculator that ships with Windows
MIT License
29.74k stars 5.39k forks source link

Alt-3 accelerator key broken #1011

Closed patrick-compass closed 4 years ago

patrick-compass commented 4 years ago

Describe the bug

The keyboard accelerator for Programmer Mode of the app no longer functions correctly and instead shows a Graphing mode.

Steps To Reproduce

  1. Open Calculator
  2. Press Alt-3
  3. Observe Programmer mode is NOT shown

Expected behavior

I expect accelerator keys to not change and for Alt-3 to always show the Programmer Mode.

Screenshots

Additional context

Requested Assignment

I'm just reporting this problem.

MicrosoftIssueBot commented 4 years ago

This is your friendly Microsoft Issue Bot. I've seen this issue come in and have gone to tell a human about it.

chazste commented 4 years ago

I also would classify this behavior change as a bug. The Alt-1 Alt-2 Alt-3 mode change commands have been stable for a very long time.

patrick-compass commented 4 years ago

fix_nav.zip

This patch can serve as a basis for fixing the navigation and placing the new feature at the end of the list that automatically generates Alt- keyboard accelerators.

grochocki commented 4 years ago

Thanks for the bug report, @lpd-patrick! While the Alt key shortcuts have not changed in a long time, we also have not added any new modes in a long time. In terms of visual order, Graphing Mode was added in the third position due to its broader reach. While Programmer Mode is still a very important mode, it is relatively niche.

So while the placement of the new mode is by design, perhaps we should revisit keyboard shortcut mapping. Two options:

Thoughts?

chazste commented 4 years ago

@grochocki I am going to vote for reverting to the original mappings. In this case Alt 1,2,3 were introduced with the programmer mode in Windows XP almost 20 years ago. Alt 1,2,3 survived the conversion to UWP app, so that level of compatibility was deemed important fairly recently. All of the new modes like date don't have # shortcuts; therefore I would argue that the "new" graphing mode should have a letter mapping too. This solution should also ease any confusion in the visual navigation. Alt 1,2,3 are "dumb" shortcuts and so should be retained only to appease muscle memory and not extended. Mnemonic shortcuts are good, though they are hard to translate. Spacial shortcuts can also be good, but are subject to keyboard layouts (eg. vi's HJKL navigation keys). It appears that in calculator as installed on my PC all the shortcuts for the new modes are Mnemonic.

patrick-compass commented 4 years ago

@chazste Actually Date mode did get a numeric shortcut since it's a part of the first list that gets assigned numeric numbers automatically.

That said, @grochocki, I would still argue that graphing mode is not important enough to disrupt decades of programmers jumping to the Windows calculator and performing some quick math and jumping to and from Scienticfice (Alt-2) and Programmer (Alt-3) with the Calculator's absolutely most useful feature of all time - simultaneous display in base 2, 8, 10, and 16. No other commonly installed program accomplishes this, and those that do all take a long time to load. . Adding graphing where it was did a few thing:

Finally, I'd like to point out that users of the graph mode are going to be MUCH more likely to enter the mode and stay there, whereas switching back and forth between Scientific and Programmer mode happens repeatedly and often due to Programmer mode's intended feature of decimal truncation. Further, though I did figure out how to enter equations while staying on the keyboard, there is nothing intuitive about it and I expect that users using the Graph mode will default to using the mouse both to enter the mode and to input data.

I think that these final points should tip the scales so as not to disrupt the decades of usefulness to programmers throughout the world.

xezrunner commented 4 years ago

In terms of visual order, Graphing Mode was added in the third position due to its broader reach. While Programmer Mode is still a very important mode, it is relatively niche. Thoughts?

I don't think it's that niche - there are many users that convert between decimal and hexadecimal values regularly, and the Calculator app does a very good job at this.

Finally, I'd like to point out that users of the graph mode are going to be MUCH more likely to enter the mode and stay there, whereas switching back and forth between Scientific and Programmer mode happens repeatedly and often due to Programmer mode's intended feature of decimal truncation. Further, though I did figure out how to enter equations while staying on the keyboard, there is nothing intuitive about it and I expect that users using the Graph mode will default to using the mouse both to enter the mode and to input data.

I think that these final points should tip the scales so as not to disrupt the decades of usefulness to programmers throughout the world.

I support this. The Standard, Scientific and Programmer modes are quite similar, they both feature an user interface that is completely utilizable with just a keyboard and all 3 serve the purpose of easily calculating and converting numbers.

Graphing mode is something completely different and is better suited for use with mouse / touch rather than just the keyboard. It servers a different purpose too, thus breaking the consistency in the 3 similar modes just doesn't make sense to me.

Alt + 4 or 5 sounds more like an appropriate shortcut for Graphing mode.

shaheedmalik commented 4 years ago

Put Graphing Mode After Programing Mode Visually. Give it the shortcut of Alt+4

msbrunoalves commented 4 years ago

Wouldn't it be better to appeal to both and just add newer modes under the old ones in the UI? You get to keep the muscle memory and you add functionality... How is this an issue? In the future if you want to organize it better, maybe add a simple shortcut settings page to configure them how the user sees fit.

patrick-compass commented 4 years ago

I received an email update that is not showing up here, so I'll quote it.

At 10:27 PM Central time last night, @samsonho said:

I was directed here by https://www.reddit.com/r/programming/comments/eypf5g/microsoft_changed_the_keyboard_shortcut_to/?utm_source=share&utm_medium=web2x I do think it would make sense to follow the principle of O in SOLID. And that is software should be Open for extension but Closed for modification. This principle applies to writing software and as a small example, adding parameters to 'end' of existing functions (to maintain backward compatibility) but I believe commenters are making the case from UX perspective. This should allow existing users to have unchanged expectations of their long lived software, especially one as old as Calculator and at the same time allow additions and new functionality to existing software without breaking users expectations of even as something as simple as a 2-key shortcut.

grochocki commented 4 years ago

Thanks for all of the great discussion here. Also, as a heavy user of all of the programmer functionality myself, I can appreciate how much folks love this mode. I will bring this back to the team for further discussion and consult with some designers and UX experts.

A couple points I'd like to highlight for now, though:

shaheedmalik commented 4 years ago

Calculator users are not developers, and we need to think about how to balance features and UX to cater to all types of users (e.g., teachers/students, enterprise, novice PC users, etc.).

They are not. They wouldn't have used the shortcut in the first place. Just change the order so Graphing is last with Programming can be third. Simple.

bartlomiejcieszkowski commented 4 years ago
  • Programmer mode is definitely a powerful tool for developers, and here on GitHub, it is great that there are lots of developers participating in this discussion. Please do consider, though, that the vast majority of Calculator users are not developers, and we need to think about how to balance features and UX to cater to all types of users (e.g., teachers/students, enterprise, novice PC users, etc.).

I'd like to throw 2 cents here, we shouldn't forget that the programmers are actually the ones that are using these shortcuts daily and general audience - they dont use these shortcuts - the calculator in the Windows 10 version doesn't even show alt + hints like it did in previous versions.

grochocki commented 4 years ago

After further discussion with the team, we have decided to close this issue as by design. Based on expected usage of Graphing Mode relative to current usage of Programmer Mode, we believe Graphing Mode belongs in the third menu slot. To prevent confusion and to follow established navigation patterns in Windows and in many other applications, the Alt+# ordering should be updated to reflect this visual ordering.

Thanks again to everyone for contributing to the conversation!

patrick-compass commented 4 years ago

So by design you broke your product! It makes absolutely no sense to insert graphing mode in the legacy area of the program, and even if you did it should go at the end. The argument to pattern it after the Win-# (which I didn't know about - thank you) is dynamic based on the user's pinned options. So if that's your pattern, then you should also add a way to configure the order of these shortcuts within the program, then both can be dynamic.

I've looked at the code required to add this feature and it's total spaghetti, nearing on unreadability: there are extra variables added just to track where they are in the list, and there are two different patterns being used within the same function. And that was only in the function that generates the menu.

patrick-compass commented 4 years ago

After further discussion with the team, we have decided to close this issue as by design. Based on expected usage of Graphing Mode relative to current usage of Programmer Mode, we believe Graphing Mode belongs in the third menu slot. To prevent confusion and to follow established navigation patterns in Windows and in many other applications, the Alt+# ordering should be updated to reflect this visual ordering.

Thanks again to everyone for contributing to the conversation!

Our whole point is that the visual ordering is wrong. Graphing mode is unique. For what reason is it ordered between Scientific and Programmer? The list isn't alphabetic, so that's not the reason. The only real ordinality to the list is inception date of the feature, and by that measure Graphing should be at the end, making it Alt-5.

xezrunner commented 4 years ago

Based on expected usage of Graphing Mode relative to current usage of Programmer Mode, we believe Graphing Mode belongs in the third menu slot.

How can Graphing Mode be expected to be used more? Does the team even have statistics on what modes are used more often?

I would instead expect the Programmer Mode being used by software developers and people in the IT field more than people in science fields or students requiring the graphing mode on Windows. As it stands right now, the Graphing Mode would be pretty useless for students considering the Calculator app is only available on Windows. Most students use their phone and the amount of students with Windows tablets would still not add up to the usage of Programmer Mode.

All of this sounds like some marketing advertisement for the Graphing Mode, and as the previous comments state, even the ability to customize the list might not even be possible at all, given the quality of the code...

attie commented 4 years ago

I've just run into this issue (I can only presume as a result of Windows Update). I imagine there will be a number of others coming to suggest that this was a "bad idea" in the coming days / weeks as well.

From what I gather, the order of items in the menu directly impacts the Alt+# shortcuts, which is somewhat understandable, but also now broken (as Alt+3 has changed function, as has the date calculator).

I also feel that the "The "Alt+#" navigation shortcut is intended to follow the same pattern as the "Win+#" shortcut" statement is a bit tenuous, as you're now translating from vertical to horizontal, and in a normally hidden menu. To further that point Alt+6 doesn't present the currency converter - why not?

I'm confused by the "graphing is an exciting feature, therefore it should go in the middle of the list" position taken here. If you're using the mouse, then what's wrong with placing it at the bottom of the list that is now 5-items long? i.e: appending, not inserting / re-arranging. If this was one of many (like converters), then I could understand wanting to promote a new feature.

I will likely trip on this regularly, for months to come.

image

If you're going to stick with this breaking change, then it might also be worth updating docs/ManualTests.md:390 (which also appears to be generally quite broken Markdown).

patrick-compass commented 4 years ago

@attie - good find in the tests How in the world was the features merge with a failing test?

yatli commented 4 years ago

I'm curious if one could fork it and publish to the store? @grochocki

sagamusix commented 4 years ago

I was also negatively surprised by this calculator update (my PC just got the 2004 update this week). "Visual consistency" is never a good argument for breaking years of muscle memory. If you think it is, you are probably not using shortcuts yourself. Please let people who actually use these shortcuts have a say in it.

grochocki commented 4 years ago

We are going to continue to monitor calculator mode usage and feedback across all channels to help make product decisions. We may revisit this particular issue again in the future, but we are not looking to make a change at this time.