You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Aug 13, 2023. It is now read-only.
Is your feature request related to a problem? Please describe.
World Service has a UX requirement that GEL Types (Canon, Long Primer, Double Pica, etc) should allow for mutable values across services. These values were grouped into 11 different scripts: arabic, arabic-pashto, bengali, burmese, devanagari-and-gurmukhi, latin-and-cyrillic, latin-with-diacritics, no-ascenders-or-descenders, sinhalese, tamil, and thai.
The latin-and-cyrillic script contains the default values GEL for all the Types. The previous constants (GEL_CANON, GEL_LONG_PRIMER, GEL_DOUBLE_PICA, etc) are being deprecated in favour of script-specific methods such as getCanon(), getLongPrimer() and so on. These methods take the current component's script as an argument.
This issue is part of a wider work to update all existing components to use the new methods, eventually removing the old constants from the codebase.
Describe the solution you'd like
Allow the component to pass the script name and children as a prop.
Update the component's propTypes and defaultProps to include a prop of script that defaults to latin
Import the appropriate getTypeSizes() method for the component's Type Styles (getCannon for Headline, getTrafalgar for Subheading)
Implement the method above, replacing any references to the deprecated GEL Type constant (GEL_CANON, GEL_TRAFALGAR) in the styled-component CSS string
Remove existing imports of the previous GEL Type constant
Testing notes
[Tester to complete]
Dev insight: Will Cypress tests be required or are unit tests sufficient? Will there be any potential regression? etc
Additional context
Add any other context or screenshots about the feature request here.
Prior to the work being done for adding the script props to the front-end components such as this one, could you please have a short write-up in an ADR explaining the approach? Thanks!
As indicated above #344 had been closed in favour of this issue since the work for Headline and SubHeading is to be done in the psammead-headings component.
cc @jblaut
Blocked by #342
Is your feature request related to a problem? Please describe.
World Service has a UX requirement that GEL Types (Canon, Long Primer, Double Pica, etc) should allow for mutable values across services. These values were grouped into 11 different scripts:
arabic
,arabic-pashto
,bengali
,burmese
,devanagari-and-gurmukhi
,latin-and-cyrillic
,latin-with-diacritics
,no-ascenders-or-descenders
,sinhalese
,tamil
, andthai
.The
latin-and-cyrillic
script contains the default values GEL for all the Types. The previous constants (GEL_CANON, GEL_LONG_PRIMER, GEL_DOUBLE_PICA, etc) are being deprecated in favour of script-specific methods such asgetCanon()
,getLongPrimer()
and so on. These methods take the current component's script as an argument.This issue is part of a wider work to update all existing components to use the new methods, eventually removing the old constants from the codebase.
Describe the solution you'd like
script
that defaults tolatin
Testing notes
[Tester to complete]
Dev insight: Will Cypress tests be required or are unit tests sufficient? Will there be any potential regression? etc
Additional context
Add any other context or screenshots about the feature request here.
The text was updated successfully, but these errors were encountered: