mainIine / foe-helfer-extension

FoE Helfer - Extension for chromium based browsers and Firefox ;-)
https://foe-helper.com
GNU Affero General Public License v3.0
119 stars 181 forks source link

BlueGalaxy table thead sticky and sorting must be three-states option #2735

Open valimaties opened 5 months ago

valimaties commented 5 months ago

Hi. It is better that in every table the thead to be stiky, it is a better visibility to each of the data, to see the column's names. Adding this css in boxes.css file seems to do the job:

thead {
    position: sticky;
    top: 0px;
    z-index: 1;
}

and removing the background-color: transparent; from .foe-table, table.foe-table classes.

image

TableHeaderSticky

However, the issue I see here is with sorting options which must be a three-states soting option (ascending, descending and not-sorted). So, as I see, there is an event which changes the th class of the table, which will add the ascending descending classes to the th clicked. I suggest to remove the class name descending if exists without adding the ascending. This will do the three-states sorting. When you first click on the header will add ascending. If ascending is present, then will remove ascending and add descending. If descending is present, remove descending without adding ascending.

outoftheline commented 5 months ago

the foe-table class is used for so many things. would need to check if it breaks on any module.