MacDownApp / macdown

Open source Markdown editor for macOS.
https://macdown.uranusjr.com/
9.45k stars 1.09k forks source link

WIP: Word Count on Touch Bar #1031

Open rschiang opened 5 years ago

rschiang commented 5 years ago

After fiddled around the current master build, I realized there's much potential on providing meaningful touch bar features. (Shoutout to #977, we really need to implement customization!) The word count widget, for example, is an extremely useful feature, but showing it on-screen has always been a distraction.

Here"s a quick-and-dirty WIP that shows the word count being implemented as a popover:

Screenshot of the touch bar.

Popover content.

I'll try polish it up so that the on-screen word count widget would hide itself and vice versa. Any comments would be appreciated.

magnuskahr commented 5 years ago

Ehm, the Touch Bar should be an interaction screen, and not somewhere to read information.

Den 19. nov. 2018 kl. 23.36 skrev Poren Chiang notifications@github.com:

After fiddled around the current master build, I realized there's much potential on providing meaningful touch bar features. (Shoutout to #977 https://github.com/MacDownApp/macdown/issues/977, we really need to implement customization!) The word count widget, for example, is an extremely useful feature, but showing it on-screen has always been a distraction.

Here"s a quick-and-dirty WIP https://github.com/rschiang/macdown/tree/word-count-touch-bar that shows the word count being implemented as a popover:

https://user-images.githubusercontent.com/1512231/48738835-2465df00-ec8d-11e8-827d-df4a6b719736.png https://user-images.githubusercontent.com/1512231/48739114-e6b58600-ec8d-11e8-93ce-c639352043af.png I'll try polish it up so that the on-screen word count widget would hide itself and vice versa.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/MacDownApp/macdown/issues/1031, or mute the thread https://github.com/notifications/unsubscribe-auth/ABpPZrnSH7AemMYIKumFtheG0MuhLaYyks5uwzJogaJpZM4YqBdK.

alexkaessner commented 5 years ago

@magnuskahr is right. Apple states in it's macOS HIG the following:

Use the Touch Bar as an extension of the keyboard and trackpad, not as a display. Although technically it’s a screen, the Touch Bar functions as an input device, not a secondary display. The user may glance at the Touch Bar to locate or use a control, but their primary focus is the main screen. The Touch Bar shouldn’t display alerts, messages, scrolling content, static content, or anything else that commands the user’s attention or distracts from their work on the main screen.

Even though I kinda like the idea to implement it for users that keep looking a lot on the keyboard like myself. If we want to implement this, it should definitely be an option for a customization of the Touch Bar!

iamrobmat commented 5 years ago

how to install that to my macdown?

rschiang commented 5 years ago

@magnuskahr @alexkaessner You're right, the current implementation is stepping on the borderline as it merely reflects the word count dropdown. It might even be better if it were a plugin I guess. However, there seems to exist no mechanism for plugins to interfere with UI, so changes has to be done in the main program as of now.

@robmatyszewski You could pull the branch and build a custom version out of it. It's not an official feature yet.