I have an unusual question regarding how displayed data should look as opposed to how to code the solution. I really don't know where to ask this.
I have a table that contains settings for a web application and an admin page where these settings can be updated. Some of the settings contain values (ie. days_to_display = 5) and some of them are just straight up boolean values (ie display_days = true). So I have setup my table as follows:
id(int), date_created(date), key(text), value(text), enabled(boolean)
I also want each setting to be able to be individually disabled. So my database would like such:
1 | | rule.days.to.display | 5 | T
2 | | rule.display.days | | T
3 | | rule.hide.sunday | | F
4 | | rule.start.of.week | Sunday | T
Here's an example of what it looks like: http://prnt.sc/azuwyl
I cannot think of a cleaner way to show the combination of text and boolean values together.
Just for completion: Java backend, Tomcat, JSP pages, PostgreSQL database
Answer
I see several points where your solution can be optimized:
- The most important column in your table is setting state. If a setting is disabled the rest of the values are irrelevant. Therefore, I suggest to put that column first.
- The most common way of displaying boolean values is checkboxes. So you may use them instead of true/false. If you want to go a bit more fancy dim/gray out inactive settings. Also you may try an option with led-indication instead of checkboxes (see below).
- I suggest to make all settings editable in place, rather than providing an edit button. User can start editing by clicking a value in the table. Finish editing by pressing enter/leaving the cell/clicking done button - choose whatever sounds more appropriate.
- If possible use names optimized for human reading, not machine names.
So in the end you may have something like this:
No comments:
Post a Comment