CORE-POS / IS4C

Cooperative Operational Retail Environment
http://www.core-pos.com
GNU General Public License v2.0
63 stars 44 forks source link

UX/UI wishlist #399

Closed flathat closed 9 years ago

flathat commented 10 years ago

I'd like to use this Issue for ideas and discussion of User Experience and User Interface. As with the other Wishlist #374 some may peel off to their own issues for development.

Among them, with some illustrations:

flathat commented 10 years ago

Re: Regular report heading Currently some reports have headings and others don't, and styles vary. I suggest a heading like this for reports of class FannieReportPage:

General Day Report (only if window dressing is off) For Thursday, August 21, 2014 (for a single day) From Friday, August 15, 2014 to Thursday, August 21, 2014 (for a range of days) As at: Thursday, August 21, 2014 4:50PM (Smaller, only if the report includes the current day)

This isn't very handsome compared to the Fannie banner/nav. Flush left is right for this report but centered would be better for others.

    function report_description_content() {
        $d1 = FormLib::get_form_value('date1');
        $d2 = FormLib::get_form_value('date2');
        if ($d2 == '') {
            $d2 = $d1;
        }
        $ret = array();
        $asAt = ($d2 == date('Y-m-d')) ?
            "<h3>" . _("As at: ") . date("l, F j, Y g:i A") . "</h3>" :
            '';
        list($year,$month,$day) = explode('-',$d1);
        $fromDate = date("l, F j, Y", mktime(0,0,0,$month,$day,$year));
        list($year,$month,$day) = explode('-',$d2);
        $toDate = date("l, F j, Y", mktime(0,0,0,$month,$day,$year));
        $ret[] = sprintf("<h2>%s%s</h2>%s",
            // Don't duplicate Fannie's header.
            ($this->window_dressing) ? '' : $this->header.'<br />',
            ($d1 == $d2) ? _("For ").$fromDate : _("From ").$fromDate._(" to ").$toDate,
            "$asAt");
        // Whitespace before the next block.
        $ret[] .= "<p> </p>";
        return $ret;
        // If empty return a paragraph rather than '';
        //return(array('<p> </p>'));
    }

Updated with BUGFIX to explode() for $toDate

flathat commented 10 years ago

Re: Fannie src/style.css I'm curious about the overrides, particularly making <h4> larger than <h3>, and nothing for <h1>. Was this for a specialized use that might be better done with a class leaving more default relationships for ordinary use? Or else make a set in src/css/reports.css for report headings.

h2 {
font-size: 1.6em;
line-height: 1.8em;
}
h3 {
font-size: 1.2em;
font-weight: bolder;
line-height: 0.8em;
}
h4 {
font-size: 1.4em;
line-height: 1.4em;
letter-spacing: 0.2em;
}
gohanman commented 10 years ago

For simplicity, I think it would make sense to keep this discussion confined to Fannie. I really like the idea of developing a style guide. That's not to suggest the lane UI is perfect. I just think the two pieces are sufficiently different that it would need two separate style guides. One thing at a time would be more manageable.

I don't think embedded help - as tooltips, links to documentation, or some combination thereof - should be specific to staff experience. It's a good idea regardless.

The commas in numbers might be a unique edge case. The real problem is if you add it two numeric strings containing commas in PHP, the result is another number. It's just not the correct sum. This winds up being a really subtle bug in the context of reporting. Unless someone actually adds the individual values manually, they may not realize the total is wrong. You can work around it, of course, by stripping the commas out before adding. My concern is it's a simple mistake to make, a difficult mistake to notice, and leads to fairly significant inaccuracy. Hopefully there aren't many similar situations.

I think the first big question is how drastic of a change is desired. I could see different potential scopes of this project.

  1. We could go with a full-fledged templating engine like Twig to separate data from markup. It would add some to the learning curve for new developers, but they're powerful tools. I worry about this less now that plugins exist as a place for tinkering / ignoring rules, but accessibility still matters. The target audience still potentially includes IT staff with minimal development background and I don't want to discourage participation.
  2. We could go with a CSS framework like Bootstrap. This would be more transparent. Coding doesn't really need to change and the style just applies. This would mostly involve resolving conflicts between existing css files & the framework plus tearing out inlined styles. A limited list of acceptable uses for inline styles probably belongs in the UI guide regardless. This doesn't have to be 3rd party, but I don't get the impression anybody's gung-ho about writing a robust modern stylesheet.
  3. No overhaul at all. Just focus on improving consistency and inline documentation.

I would lean towards starting at number 2 and proceeding into 3. Having the widgets and icons and such to choose from would make it easier to implement consistent look and feel. I know I have an easier time choosing from a concrete set of options as opposed to trying to invent each piece from scratch. I'm not opposed to any of them though. Twig and Bootstrap were meant as examples. It wouldn't have to be that template engine or CSS framework.

Once the style guide is done, it will be important to file bugs against incorrectly styled pages. Developers will forget. I know, with certainty, that I will occasionally forget. It's a lot like proof reading. The original author doesn't always see the mistakes.

gohanman commented 10 years ago

RE: reporting: that's a good idea and can probably be pushed up into FannieReportPage itself as a helper function. Child reports can get the default description lines then add as needed. I'd vote for always left-aligned. If the report gets downloaded as CSV or XLS, those lines will end up left-aligned. Might as well have it the same across all formats.

RE: header tags: beats me. I inherited most of the CSS. The flyout menus are the only part I've spent a bunch of time on.

joelbrock commented 10 years ago

In general i think a more modern (and consistent) UI would give users renewed confidence in the softeware, and address a number of commonly posed questions. FWIW: i agree with Andy, a CSS framework would be preferable to a templating framework, mainly for accessibility of the code. Also, much of fannie's "chrome" is pretty much already under a templating framework of our own design. I would have no objections to Bootstrap. If you havent looked at Foundation (http://foundation.zurb.com/docs/), check that out too. I'd say we cant go wrong with either.

Specific UX tweaks (off the top of my head):

theres certainly more, but thats a good start.

gohanman commented 10 years ago

jquery doesn't have a datepicker AFAIK; jquery-ui does. That change was implemented here: 42dd202c1fdcfd8a97eeb56476fc1fcb3db268c7

I've been playing with modal popups (again with jquery-ui) on the item maintenance page - e.g., to create a new vendor or like code. It is a lot quicker to work with, albeit of course currently inconsistent with everything else.

Vendor & Brand fields do have autocomplete to reduce duplicates. Vendor is a fairly unique case. I want it to be a