Page MenuHomePhabricator

Gray out undo/redo button if there's nothing to undo/redo
Closed, ResolvedPublic

Description


Version: unspecified
Severity: normal

Details

Reference
bz33112

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 22 2014, 12:01 AM
bzimport set Reference to bz33112.
bzimport added a subscriber: Unknown Object (MLST).

please provide more than just a title for bug reports.

(In reply to comment #1)

please provide more than just a title for bug reports.

For this report I don't know what to say.

What undo/redo button are you talking about?

(In reply to comment #3)

What undo/redo button are you talking about?

Those in the toolbar added by VisualEditor.

ashish.dubey91 wrote:

This implementation would possibly fix this bug.

I made tweaks at places which seemed appropriate to me.

  1. Added a CSS style, to give disabled buttons a transparent/gray look.
  2. And I put some code in the method es.HistoryButtonTool.updateButtons(). At first I created a similar method in es.ToolbarView, but when I found the former already there, I thought it should be the right place to put that code. Though I'm not sure.

Inviting reviews.

Attached:

neilk wrote:

Looks okay to me, although it was a bit repetitive so I refactored it a little -- we don't need separate styles for undo or redo buttons, and enabling and disabling them could be more common code.

This is my first commit to the Visual Editor interface code, so I might have gotten the MVC separation a bit mixed up. Also there's some other code related to disabled buttons so I hope I didn't step on that.

Otherwise, fixed in r107689.

Thanks, Ashish.

Mass-moving old VisualEditor tickets to the VE product. Search for this message to mass-delete bugmail.

Noting bugs closed in the 2012-10-15 release.

Has regressed, on mediawiki.org at least.

(In reply to comment #10)

Has regressed, on mediawiki.org at least.

Can you give some more detail? Browser/page/action? It seems to work for me in Firefox and Chrome…

Re-closing, per discussion with Adam.