bootstrap-markdown icon indicating copy to clipboard operation
bootstrap-markdown copied to clipboard

Rename preview button when preview is active

Open oneiros opened this issue 11 years ago • 7 comments

First of all thanks for this wonderful project.

I am currently implementing it for a customer and got some interesting feedback: They thought it was not straightforward to get out of the preview mode.

They suggested replacing the preview button text with "Back" or something similar when the preview is active to make it super-obvious how to exit the preview mode.

I will probably implement this in our project but was wondering what you thought of this. Are you open to such a change? And if yes, would you accept a PR?

oneiros avatar Dec 04 '14 10:12 oneiros

@oneiros Thanks for the kind word. Regarding "Back" text suggestion, i would prefer to stay with "Preview" as its more literal and as concise as "Back". Anyone who want to customized their buttons text, can simply create a custom locale file and use it on initialization.

toopay avatar Dec 07 '14 13:12 toopay

@toopay maybe it's a good practice to have this button text switch build-in but default translate the two text's as "preview". That way the editor still works like you would like to have it, but the end user has the possibility to define a custom translation for the "back" text

acrobat avatar Dec 07 '14 13:12 acrobat

@acrobat Sound like a viable plan.

toopay avatar Dec 07 '14 14:12 toopay

:+1: I prefer the button to say something like Edit in preview mode.

jerone avatar Dec 07 '14 14:12 jerone

Stumbled over this since I reported this issue to OpenUserJs/OpenUserJS.org#618 where Bootstrap Markdown is used, too. Initially I had the problem myself: I was looking for a button to disable the preview until I figured out I had to press "Preview" again.

I therefore support @jerone's suggestion. "Edit" would be a clear and precise wording for the buttons inverted functionality when in preview mode.

An alternative would be to actually make it clear to the user that the button is "sticking" by using appropriate styling. With a 3D-like style the difference between "pressed" and "released" states could be easily visualized. With the flat button style it's more difficult however. The slight color change that currently is used is much too faint for a user to actually be able to tell the difference.

Ede123 avatar Apr 07 '15 16:04 Ede123

The user requested issue and their owned followup with changing the text, as it has been mentioned, may optionally include translations which leads into possible screen flicker and possible layout busting depending on how narrow/wide the text becomes and the device viewport it is displayed upon.

I am at 0 for this change... perhaps until a test pull request (even if rejected it may useful for testing purposes) can be done for this project to be tested on a few devices. The CSS coloring on bootstrap buttons is defaulted to a slight difference in general for active and inactive states for all buttons and not limited to bootstrap-markdown even with .user.js.

Martii avatar Apr 07 '15 17:04 Martii

As an alternative, what about adding a callback that fires when we exit preview? Changing "Preview" to "Edit" (which I also prefer) can already be done using onPreview, it's just that there's no way to change the label back. A second callback would solve this.

(Very simple PR on the way.)

tingley avatar Oct 31 '16 19:10 tingley