-
Notifications
You must be signed in to change notification settings - Fork 29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update Source to 8.0.0 #12474
base: main
Are you sure you want to change the base?
Update Source to 8.0.0 #12474
Conversation
Hello 👋! When you're ready to run Chromatic, please apply the You will need to reapply the label each time you want to run Chromatic. |
@@ -105,7 +105,7 @@ const MetaGridByline = ({ | |||
padding-bottom: 0px; | |||
} | |||
address > div > span > svg:first-of-type { | |||
address > div > span > div:first-of-type { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The DottedLines
component in Source Development Kitchen has been updated to be rendered with CSS rather than as an SVG, therefore there's no longer an svg
element to target here. This selector feels very fragile and the spacing would be better applied elsewhere, but I've left as is for now and simply updated the element it's targeting.
Size Change: -6.11 kB (-0.66%) Total Size: 917 kB
ℹ️ View Unchanged
|
> fieldset > div > div { | ||
padding: 0; | ||
align-items: center; | ||
margin-bottom: ${space[2]}px; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The answer buttons would be better refactored to avoid needing to override so many radio button styles, but that feels like a separate task and out of scope for this update.
9972637
to
7912051
Compare
d729375
to
b5d715a
Compare
b5d715a
to
f4cc50e
Compare
f4cc50e
to
85a3e58
Compare
What does this change?
@guardian/source
and@guardian/source-development-kitchen
to8.0.0
.@guardian/braze-components
to21.0.0
@guardian/commercial
to22.1.0
These releases remove the deprecated typography API and disallow direct use of Emotion's
css
prop. A previous PR (#12465) removed remaining uses of the typography API and replaced with typography presets, and replaced incorrect usage of thecss
prop withcssOverrides
.Source now consistently includes the unit for
rem
values so these have been removed where previously added. This PR also contains some small styling tweaks to compensate for changes to layout and markup in Source components.Note
This is branched from #12465 which is currently set as the base branch so the diff only shows the changes made in this PR. Once merged the base branch can be changed back to
main
.Source 6.1.0–8.0.0 release notes
8.0.0
Major Changes
33608e2: Disallows direct use of Emotion's
css
prop on Source components.If you need to override the internal styling of Source components, use
cssOverrides
instead.7.0.1
Patch Changes
7.0.0
Major Changes
238dfd3: Removes deprecated typography API.
In
@guardian/[email protected]
(2024-04-07), we added new web typography presets to standardise on the typographic language used by Design, and deprecated the old typography API.This release removes that old API, in order to simplify the ongoing maintenance of the library.
The following exports have been removed:
titlepiece
headline
body
textSans
titlepieceSizes
headlineSizes
bodySizes
textSansSizes
remTitlepieceSizes
remHeadlineSizes
remBodySizes
remTextSansSizes
fonts
fontWeights
lineHeights
bodyObjectStyles
headlineObjectStyles
textSansObjectStyles
titlepieceObjectStyles
along with the following
type
exports:ScaleUnit
Category
LineHeight
FontWeight
FontStyle
FontWeightDefinition
Option
TypographySizes
TypographyStyles
TitlepieceSizes
HeadlineSizes
BodySizes
TextSansSizes
Fs
FontScaleFunction
FontScaleFunctionStr
FontScaleArgs
If you cannot map existing uses of the old API to the new presets, please check which preset you should use with a designer.
447e6b6: Applies consistent spacing around checkboxes and radio buttons by removing conditional styles and using padding to ensure minimum height of 44px.
The external padding is now consistent regardless of the presence of a label and / or supporting text, and removes any inconsistency when these elements are stacked vertically.
Checkboxes and radio buttons are also now aligned with the first line of text when labels wrap on to multiple lines.
7805d16: Brings
remSize
,remIconSize
,remHeight
andremWidth
into line withremSpace
, by changing their values from anumber
(of rems) to astring
that ends withrem
units.pxToRem
also now returns a string withrem
units, rather than anumber
of rems.The sizes haven't changed, only the way they are exported.
Before
After
If you have been performing calculations with the old number values in JS, you can use the CSS
calc
function instead:Before
After
Patch Changes
69ecc3f: Moves design tokens into
@guardian/source
itself.Allows us to calculate
@guardian/source/foundations
values during build, rather than at the point of consumption, which relieves user's devices of this overhead and means the design tokens JSON will no longer be included in consumer's bundles.6.1.0
Minor Changes
headlineBold15
,headlineLight15
,headlineLightItalic15
,headlineMedium15
andheadlineMediumItalic15
to the typography presetsSource Development Kitchen 6.0.0–8.0.0 release notes
8.0.0
Patch Changes
7.1.0
Minor Changes
ticker
component7.0.1
Patch Changes
7.0.0
Major Changes
Updated peer dependency to
@guardian/[email protected]
6.0.0
Major Changes
DottedLines
to render pattern with CSS rather than SVGWhy?
DCR has fallen several major versions behind. This brings us up-to-date and allows use of features and bug fixes added in later releases.