BetterErrors / BetterErrors/better_errors

Suggestion: Allow tweaking or overriding the view (theme)

Open
#312 3 comments 1 reaction 0 assignees View on GitHub
enhancement
Dominant language
Ruby
Stars
6.9k
Forks
430
PR merge metrics
No merged PRs in 30d

Description

It would be nice if there was an option to either completely customize the better_errors page, or maybe at least just to tweak it (whichever is easier to implement).

**Tweaking approach for example:**
Enable some settings that can be placed in the initializer to set some colors, and font size.
Specifically, I would like to change the colors of the black header and increase font size a little.

**Overriding view:**
This can be done in several ways I guess, one that I saw elsewhere that was working nicely, is to add a generator (like `rails generate better_errors:views`) that will generate view files in the views folder, and then anyone can tweak as they want.

EDIT:
I just noticed that there is a commented out light theme section in the main template, so someone has already done half the work. I tried doing the other half of allowing it to be configurable, but realized I am in over my head... didn't know what is the proper way to pass variables from the middleware to the template (tried with `env` but realized I am doing something wrong...).

For now, I just commented out this block in [my form](https://github.com/charliesome/better_errors/compare/master...DannyBen:light-theme)

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.