yesod/yesod-core/test
Isaac van Bakel b9fbdb3950 Add idempotent versions of setDescription API
`setDescription` and `setDescriptionI` present a similar API to
`setTitle` and `setTitleI`, but unlike those functions the description
functions are not idempotent - so calling them multiple times inserts
multiple `<meta/>` tags in HTML `<head/>`.

This adds explicitly idempotent versions of those functions which are
handled in a similar way to the title, so that calling them multiple
times has the effect of taking the final value specified.

Because the non-idempotent behaviour of setDescription is not obvious,
this also adds warnings for that behaviour to make it clear what the
effect of multiple calls will be. Unfortunately, setDescriptionIdemp
can't be made a drop-in replacement because developers may have defined
their own layouts which need to take pageDescription into account.
2022-04-20 12:54:23 +01:00
..
fixtures Recommend .yesodroutes file extension (#1686) 2020-07-26 17:08:39 +03:00
YesodCoreTest Add idempotent versions of setDescription API 2022-04-20 12:54:23 +01:00
en.msg Add 'yesod-core/' from commit '982d6185bee75b078bee92bd8a2e8743707f1922' 2011-07-22 08:59:56 +03:00
Hierarchy.hs Change mkYesodWith to accept separate lists for contexts and type 2018-01-22 00:19:04 -05:00
RouteSpec.hs Recommend .yesodroutes file extension (#1686) 2020-07-26 17:08:39 +03:00
test.hs Compile with -Wall -Werror 2017-02-05 12:09:18 +02:00
YesodCoreTest.hs Add test of setDescription idempotency 2022-04-20 12:01:34 +01:00