wunderbar icon indicating copy to clipboard operation
wunderbar copied to clipboard

Use Bootstrap div styles for exceptions

Open ShaneCurcuru opened this issue 8 years ago • 0 comments

Since many users will be including Bootstrap styles, it would be helpful to include those classes/styles when displaying non-user data from wunderbar, like in HTMLMarkup. _exception

https://github.com/rubys/wunderbar/blob/master/lib/wunderbar/html-methods.rb#L273

Something as simple as:

        if traceback_class
          _div.alert.alert_danger role: 'alert' do
            tag! :pre, text, :class=>traceback_class
          end        
        else
# ... etc.

should be harmless without bootstrap, but will properly put the exception traceback in a semantically appropriate alert box in the output.

ShaneCurcuru avatar May 26 '17 01:05 ShaneCurcuru