add titles to column headers

closes #413
This commit is contained in:
Collin M. Barrett 2018-09-29 15:08:14 -05:00
parent 349bd97b6d
commit 6def1034bb
10 changed files with 11 additions and 10 deletions

View file

@ -2,7 +2,7 @@ import * as React from "react";
import { Column, RowRenderProps } from "react-table";
export const DetailsButton = {
Header: "Details",
Header: <span title="Learn more about the FilterList.">Details</span>,
accessor: "id",
sortable: false,
expander: true,

View file

@ -5,7 +5,7 @@ import { IColumnVisibility, ILanguage } from "../../../interfaces";
export const Languages = (columnVisibility: IColumnVisibility[], languages: ILanguage[]) => {
const languagesSorted = languages.sort((a, b) => a.name.localeCompare(b.name));
return ({
Header: "Languages",
Header: <span title="Written forms of communication used by sites targeted by the FilterList.">Languages</span>,
accessor: "languageIds",
filterable: true,
filterMethod: (f: Filter, r: any[]) => filterMethod(f, r),

View file

@ -4,7 +4,7 @@ import { IColumnVisibility, ILicense } from "../../../interfaces";
export const License = (columnVisibility: IColumnVisibility[], licenses: ILicense[]) =>
({
Header: "License",
Header: <span title="A legal document governing the use or redistribution of a FilterList.">License</span>,
accessor: "licenseId",
filterable: true,
filterMethod: (f: Filter, r: any[]) => filterMethod(f, r, licenses),

View file

@ -4,7 +4,7 @@ import { IColumnVisibility, IMaintainer } from "../../../interfaces";
export const Maintainers = (columnVisibility: IColumnVisibility[], maintainers: IMaintainer[]) =>
({
Header: "Maintainers",
Header: <span title="Individuals, groups, or organizations who maintain the FilterList.">Maintainers</span>,
accessor: "maintainerIds",
filterable: true,
filterMethod: (f: Filter, r: any[]) => filterMethod(f, r, maintainers),

View file

@ -2,7 +2,7 @@ import * as React from "react";
import { Column, Filter } from "react-table";
export const Name = {
Header: "Name",
Header: <span title="The name/title of the FilterList in title case.">Name</span>,
accessor: "name",
filterable: true,
filterMethod: (f: Filter, r: any[]) => filterMethod(f, r),

View file

@ -4,7 +4,7 @@ import { IColumnVisibility } from "../../../interfaces";
export const RuleCount = (columnVisibility: IColumnVisibility[]) =>
({
Header: "Rules",
Header: <span title="The number of rules in the FilterList.">Rules</span>,
accessor: "ruleCount",
sortMethod: (a: string, b: string) => sortMethod(a, b),
Cell: (c: any) => Cell(c.value),

View file

@ -6,7 +6,8 @@ import { SoftwareIcon } from "../../softwareIcon";
export const Software = (columnVisibility: IColumnVisibility[], software: ISoftware[]) => {
const softwareSorted = software.sort((a, b) => a.name.localeCompare(b.name));
return ({
Header: "Software",
Header:
<span title="Applications, browser extensions, or other utilities that consume the FilterList.">Software</span>,
accessor: "syntaxId",
filterable: true,
filterMethod: (f: Filter, r: any[]) => filterMethod(f, r, softwareSorted),

View file

@ -4,7 +4,7 @@ import { IColumnVisibility, ISyntax } from "../../../interfaces";
//TODO: https://github.com/collinbarrett/FilterLists/issues/488
export const Syntax = (columnVisibility: IColumnVisibility[], syntaxes: ISyntax[]) => ({
Header: "Syntax",
Header: <span title="A named set of rules that govern the format of the FilterList.">Syntax</span>,
accessor: "syntaxId",
filterable: true,
filterMethod: (f: Filter, r: any[]) => filterMethod(f, r, syntaxes),

View file

@ -6,7 +6,7 @@ import { IColumnVisibility, ITag } from "../../../interfaces";
export const Tags = (columnVisibility: IColumnVisibility[], tags: ITag[]) => {
const tagsSorted = tags.sort((a: ITag, b: ITag) => a.name.localeCompare(b.name));
return ({
Header: "Tags",
Header: <span title="Generic taxonomies applied to the FilterList to provide information about its contents and/or purpose.">Tags</span>,
accessor: "tagIds",
filterable: true,
filterMethod: (f: Filter, r: any[]) => filterMethod(f, r),

View file

@ -5,7 +5,7 @@ import { IColumnVisibility } from "../../../interfaces";
export const UpdatedDate = (columnVisibility: IColumnVisibility[]) =>
({
Header: "Updated",
Header: <span title="The estimated date that the FilterList was last updated by the maintainer.">Updated</span>,
accessor: "updatedDate",
sortMethod: (a: string, b: string) => sortMethod(a, b),
Cell: (c: any) => Cell(c.value),