FreeUKGen / Systemwide

repository for issues that affect all systems within the Free UK Gen portfolio
0 stars 0 forks source link

Implement Sticking #109

Open Captainkirkdawson opened 4 years ago

Captainkirkdawson commented 4 years ago

The use of sticky on scrollable tables has been increasing as a means of maintaining header column matching . The use in the messages index table was not the first use of sticky its the 4th or 5th. Sticky is currently only used in member pages where accessibility is not an issue. I personally like the use of the project colour as a background in the header. I also like the hover BUT I do agree that it could convey they are links. There is no reason to undertake additional work on the sticky as has been suggested UNLESS it is proposed that we use sticky in the public domain (and we likely should change the search results to scrollable with a sticky)

e1 u3 p5 c7: P16

AlOneill commented 4 years ago

I am clearly way behind the curve on this as I've only recently become aware of the sticky styling.

Even on Members pages, we do wrong to make anything look and behave like a link when it is not one. It is a question of Accessibility per se: i.e. it is confusing for anyone!

The basic premise is sound: it is the particular use of colour and the unnecessary focus/hover styling that concerns me.

Captainkirkdawson commented 4 years ago

My preference is this entry.JPG rather than this place.JPG

AlOneill commented 4 years ago

I agree that the markup and essential styling of the top example is much better than that of the bottom. No contest.

However, compare these two and decide which image makes better sense. The colour change here is just for example (& maybe not the best!): the important thing is that the difference conveys the sense that the two things — here, buttons and column headings — are different in significant ways. (Rule 1 of web design: do not confuse or annoy your users.)

FreeREG___sticky-header-1.png

or

FreeREG___sticky-header-2.png

Captainkirkdawson commented 4 years ago

Having never professed to being an expert in anything other than annoying people we are closer to an agreement.

If we were to adopt this idea for sticky headings would we also adopt a similar background for non sticky headings. I suspect yes.

The key then is the actual colour. Would we make it the same for all apps or be app specific. How about the lighter version of the project colour?

Captainkirkdawson commented 4 years ago

If the headings are links then we should use the nav bar style and colours eg if we use them to sort. Then hover and focus will still be required

AlOneill commented 4 years ago

In response to the questions and comments above:

"Would we also adopt a similar background for non sticky headings?" Not necessarily, especially if we decide to make the sticky headings stand out from the non-sticky headings — a wish you mentioned previously.

"Would we make it [the colour] the same for all apps or be app specific?" It depends. Could go either way, or we could offer a choice across all projects. Much will depend on the agreed details of the basic sticky header styling.

"If the headings are links then we should use the nav bar style and colours eg if we use them to sort. Then hover and focus will still be required." I think of the nav bar as a one-off — especially as the sticky header styling would be seen next to (even on top of!) buttons in the Actions column which have similar styling. And we need to consider that not all columns in a table are necessarily going to be sortable — the Actions column header, for instance — and such headers should not look identical to the sortable column headers. Yes, focus/hover styles would be required, but not as you have them because they would need to target the actual link (if present) rather than the whole th element.

AlOneill commented 4 years ago

Whilst we are deciding on the exact details of the sticky header styles, I recommend we change the background-colour of the current style to either $navy or $dark (?name of latter; #333 anyway) and delete the current sticky header focus/hover style.

I also suggest that we make the new colour combinations AA accessible, with a contrast ratio of at least 4.5:1, so that the styles can be used on public-facing pages.

Captainkirkdawson commented 4 years ago

For the members we are using the project colours with no hover or focus. This is what we have on REG batch listing batches.JPG Passes accessibility contrast except for the use of the red error batch

Captainkirkdawson commented 4 years ago

What we need is a th sticky_link defined that permits us to stick the search results table; something perhaps similar to the button styling with its focus/hover rather than a link

AlOneill commented 4 years ago

After considering the colour possibilities, and taking into account the wish for row-striping and row-hover, I propose the following general scheme:

The following mock-up summarises the essence of the proposed styles (the colours used here are just for example):

Sticky_headers

It will be much easier to set up if Members pages and public-facing pages use the same style(s).

AlOneill commented 4 years ago

@Captainkirkdawson On the REG batch listing example, the orange for "only Verified" is not accessible. I forget whether or not the maroon for "Locked with errors" is accessible or not. The red can be changed to our accessible red.

Also, those colours are not entirely accessible in that distinguishing one colour from another of similar saturation may not be comfortable for someone with impaired colour perception.

I wonder if it would make sense to replace one of the colours with our default text colour? But that is probably a matter for another issue entirely …

Captainkirkdawson commented 4 years ago

Your suggestions are interesting but a couple of question for my education and understanding.

Firstly why a different colour from the project colour?

Why cannot we not make the th sticky_link (using a different name from sticky_header) behave like a an element in a main_nav class under hover focus ie reverse colour and can be clicked and just like a button reveral

AlOneill commented 4 years ago

@Captainkirkdawson

  1. Because not all sticky headers will be links and to use the project colour would make them all look like (main menu) links: do not confuse or annoy

  2. For simplicity of use, applying the (edited) .sticky-header class to one element will automatically style a link, if present, appropriately. How the link behaves on focus/hover/active is a separate issue.

PatReynolds commented 4 years ago

After discussion, Navy for background. Links to look like (and not look like) links as per Alison's mock-up of Dec 10, 2019. Links will also have hover and focus on them.

Alison to set it up so the right class automatically styles the link without further intervention.

Now to be implemented.

PatReynolds commented 2 years ago

Found in FreeCEN scrum - realise have not touched this for 2+ years - need to understand what, if anything remains to be implemented.

AlOneill commented 2 years ago

@PatReynolds there is now a th.sticky-header class in our CSS — lap_and_up.css, but nothing for links AFAICT

I was meant to be implementing a version that would include automatic link styling but ran into a snag and then got distracted by other tasks. So, it is not complete. A plain link will not work — it needs the same styling, including focus and hover, as for a link in a navy isle.

BTW, I see the Accessibility label but I have no idea if there are any accessibility issues — I do not anticipate any, but would like some confirmation from a screen reader as I do not necessarily trust my judgement! But perhaps you had a different issue in mind … a year ago!?

DeniseColbert commented 2 years ago

@AlOneill to let us know what the CSS should be, for implementation by a developer

AlOneill commented 2 years ago

@Captainkirkdawson @DeniseColbert I think we might be barking up the wrong tree here. As ever, the devil is in the details.

Links go places; buttons perform actions. The "links" on the column headers on REG Search Results, for example, are for sorting the results and so should be buttons (or inputs). Is there really a need for actual links? Where would they go?

Captainkirkdawson commented 2 years ago

@AlOneill I have retired from new undertakings

AlOneill commented 2 years ago

@Captainkirkdawson I understand — just wanted to keep you in the loop as sticky-headers were your idea.

AlOneill commented 2 years ago

@DeniseColbert Unless anyone can suggest a legitimate use of a link in column headings, I suggest this be closed.

Whether or not we use sticky-headers on public pages, we need a better way of providing sorting actions on table columns than links — the method being developed for BMD tables looks far more suitable, once all the snags have been resolved. (Remember that links and buttons, or inputs, are two different things, with different semantics.)

AlOneill commented 2 years ago

New issue: At palm widths, the sticky-header styling disappears and the row-striping reverts to yellow. Deliberate or accidental?

DeniseColbert commented 1 year ago

In the wrong place in the CSS, in lap and up but should be in palm.

We should look to implement on search results

AlOneill commented 1 year ago

This is my attempt to summarise the requirements for the sticky headers distilled from the above discussion:

  1. The colour to be white text on a $navy background — headers that are not sticky to look as they do now
  2. There will be no links so there is no need for link styling
  3. Decision on column sorting (for tables with and without sticky headers) not clear: could be a short form as per BMD tables (more likely) or could be via buttons
DeniseColbert commented 1 year ago

@jayto581 is going to take a look

DeniseColbert commented 1 year ago

We DO want sorting on results tables, however they are currently links for sorting. We will move to the system on FreeBMD2, below, which will solve this image

DeniseColbert commented 10 months ago

@Vino-S to send @jayto581 the code snippet for table sorting on FreeBMD2 so he can look at it.

Vino-S commented 9 months ago

Table example in MyopicVicar code base: Physical File listing https://github.com/FreeUKGen/MyopicVicar/blob/master/app/views/physical_files/index.html.erb

Sorting code: https://github.com/FreeUKGen/MyopicVicar/blob/freebmd_development/app/views/search_queries/_count_and_tools_menu.html.erb

jayto581 commented 9 months ago

@DeniseColbert @AlOneill A functional prototype is setup on https://test3.freeReg.org.uk/

AlOneill commented 9 months ago

Perhaps I do not understand but I was expecting the results table to look more like this but with the table header sticking to the top of the table:

Search_Results___FreeBMD.png

Instead we have a table header that is sticking to the top of the screen. Although the buttons in the header are actual buttons rather than links disguised as buttons, that they are buttons is not obvious, especially as we tend to make links look like buttons. Is that what we asked for? If so, the colours need revising — the two dark background colours do not look at all good together, IMO anyway.

DeniseColbert commented 9 months ago

We're moving towards the FreeBMD2 way, Joseph is going to try to implement just the "Sort by" dropdown menu in FreeREG using info/code that Vino will send.

@AlOneill thanks for taking a look at Joseph's first pass.

jayto581 commented 8 months ago

@DeniseColbert

AlOneill commented 8 months ago

@jayto581 The Filter and Sort functions are working well, as are the sticky headers. Good work!

@DeniseColbert There are a few issues that, if they persist on the production site, need addressing:

DeniseColbert commented 6 months ago

@jayto581 to follow Alison's points and tidy up the prototype code, and remove navy (make it look like FreeBMD2 with REG styling).

jayto581 commented 6 months ago

@DeniseColbert @AlOneill Update prototype on https://test3.freeReg.org.uk/ :

DeniseColbert commented 4 months ago

@Vino-S Joseph's code isn't thee anymore on Test3, please could you get it back up?

DeniseColbert commented 3 months ago

Code back up, @jayto581 to look at update reults working for both dropdowns on one click and adding asc/desc order into event year sort.

jayto581 commented 3 months ago

Code updated and ready for review and testing

DeniseColbert commented 3 months ago

Looks very much like BMD2! Joseph to explore having the Apply button show an up/down arrow depending on asc/desc order of sort

jayto581 commented 2 months ago

Update prototype on https://test3.freeReg.org.uk/

image

jayto581 commented 2 months ago

See test3 for updates https://test3.freereg.org.uk/cms/refinery/login

Vino-S commented 2 months ago

@DeniseColbert , Could you give the new changes a test, please?

DeniseColbert commented 1 month ago

@richardofsussex could you test this please? Let me know if you need context

richardofsussex commented 1 month ago

The Filter drop-down should react to the number of event types in the search. If there is only one event type (a strategy you are forced to go for, if you don't specify a county) the Filter is meaningless and should not be displayed at all. If two event types are searched for, only those two types should be presented as Filter choices.

richardofsussex commented 1 month ago

Incidentally, as the designs of FreeReg and FreeBMD get closer to each other, I think it becomes more important that we choose whether to have Surname(s) or First Name(s)/Forename(s) first in the search form, and apply it consistently across all three sites. (Also to decide whether it's First Name(s) or Forename(s).)

Regardless of what other genealogy sites might do in this area, we should be self-consistent.

DeniseColbert commented 1 month ago

Surname - First name order is planned for review upon user testing feedback in FreeBMD2

Re. Filters @jayto581 will make the changes suggested