Skip to content
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

Type system #99

Merged
merged 161 commits into from
Sep 18, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
161 commits
Select commit Hold shift + click to select a range
e3c74f9
add and modify CSS vars for fonts
pkd2512 Jan 3, 2023
9c5658f
Add type vars to CSS variable docs
pkd2512 Jan 3, 2023
5affacd
Merge branch 'main' into type-system
pkd2512 Mar 2, 2023
cf72248
add typography system
pkd2512 Mar 3, 2023
3de3b36
create typography stories
pkd2512 Mar 6, 2023
317c355
docs for using type styles
pkd2512 Mar 14, 2023
5e38bb6
Update style.md
pkd2512 Mar 15, 2023
d146d60
add CSS vars defaults and typo docs
pkd2512 Mar 16, 2023
be250cf
custom fonts and css vars
pkd2512 Mar 16, 2023
a54c70c
describe style classes and mixins
pkd2512 Mar 16, 2023
8ca9656
fix sort of Theming section
hobbes7878 Mar 20, 2023
205efb7
fix theming folder name in docs
hobbes7878 Mar 20, 2023
db35bf4
edits to CSS variables
hobbes7878 Mar 20, 2023
c224971
typo
hobbes7878 Mar 20, 2023
b721c0b
reframe of using docs
hobbes7878 Mar 21, 2023
961be5a
Merge pull request #59 from reuters-graphics/type-system-jon
pkd2512 Mar 22, 2023
60cd098
demo framework
hobbes7878 Mar 22, 2023
4b21126
merge 7.0 changes
hobbes7878 Jul 7, 2023
392fb9a
cleanup typography docs and Theme types
hobbes7878 Jul 7, 2023
fed40a0
various
hobbes7878 Jul 7, 2023
cefae20
kills bootstrap per #92, but probably still some cleanup needed
hobbes7878 Jul 8, 2023
27c450e
redo spacers
hobbes7878 Jul 8, 2023
dbcb92b
text rules
hobbes7878 Jul 8, 2023
fc1e408
text utility classes and docs with new CopyTable
hobbes7878 Jul 8, 2023
f949fef
few more text utilities
hobbes7878 Jul 8, 2023
69751ee
theme builder. closes #93
hobbes7878 Jul 8, 2023
6177379
few ThemeBuilder fixes. replaces bootstrap example in Block docs. clo…
hobbes7878 Jul 9, 2023
31ca5f0
more docs and improvements to CopyTable
hobbes7878 Jul 9, 2023
f317074
docs cleanup
hobbes7878 Jul 9, 2023
4ffcf1b
first attempt to update storybook. failing due to storybookjs/addon-s…
hobbes7878 Jul 11, 2023
444d8b6
nicer copy flag in CopyTable
hobbes7878 Jul 11, 2023
32183b9
few things on ThemeBuilder
hobbes7878 Jul 11, 2023
b301a37
better typecheck for them input
hobbes7878 Jul 11, 2023
0c8e7ed
mass colour replace
hobbes7878 Jul 11, 2023
8698f76
cleanup
hobbes7878 Jul 12, 2023
dde40d9
bump storybook to release
hobbes7878 Jul 20, 2023
b0900df
remove silly file
hobbes7878 Jul 20, 2023
2ad5f15
rever to svelte and scss syntax
hobbes7878 Jul 20, 2023
8644cc1
pin to canary svelte csf for now
hobbes7878 Jul 21, 2023
7a72c06
colour tables
hobbes7878 Jul 21, 2023
b60ee5f
colour table imports
hobbes7878 Jul 22, 2023
4e154ff
couple primary colour scales
hobbes7878 Jul 22, 2023
bee17e7
other primary colours
hobbes7878 Jul 22, 2023
cd1d4d9
closes #103
hobbes7878 Jul 22, 2023
0d86d6f
fix merge conflicts
hobbes7878 Jul 22, 2023
f67c89d
fix blockquote styles
hobbes7878 Jul 22, 2023
4547d46
css token proposal
hobbes7878 Jul 24, 2023
d6240e2
better scss token convention
hobbes7878 Jul 24, 2023
be8ff06
final really final last definitely token conventions and docs
hobbes7878 Jul 25, 2023
e89408c
style siteheadline as example
hobbes7878 Jul 25, 2023
7db8d15
typography reset
hobbes7878 Jul 25, 2023
08d5c67
last of the night... I hope
hobbes7878 Jul 25, 2023
1343a8a
first crack at fluid margins and paddings
hobbes7878 Jul 26, 2023
75ac988
variables
hobbes7878 Jul 26, 2023
10dd858
update fonts
hobbes7878 Jul 28, 2023
038af64
#95 Spinner
hobbes7878 Jul 29, 2023
44be442
#95 Video
hobbes7878 Jul 29, 2023
896ceb3
#95 SimpleTimeline
hobbes7878 Jul 29, 2023
d5d0564
correct syntax for fluid placeholder
hobbes7878 Jul 29, 2023
d00e8bd
correct syntax for fluid placeholder
hobbes7878 Jul 29, 2023
3b6251c
typography sample
hobbes7878 Jul 29, 2023
29a9138
sizing tokens
hobbes7878 Jul 29, 2023
e19c6f9
#95 FeaturePhoto
hobbes7878 Jul 29, 2023
1557f5a
blockquotes
hobbes7878 Jul 29, 2023
5515c0c
#95 BodyText
hobbes7878 Jul 30, 2023
8d0b00c
#95 NoteText
hobbes7878 Jul 30, 2023
4d3b1ee
#95 GraphicBlock
hobbes7878 Jul 30, 2023
1d08b2d
#95 PhotoPack
hobbes7878 Jul 30, 2023
f2fea5d
object-cover
hobbes7878 Jul 30, 2023
e178a81
#95 PhotoCarousel
hobbes7878 Jul 30, 2023
f4618de
#25 Scroller
hobbes7878 Jul 30, 2023
a42dae0
#95 BeforeAfter
hobbes7878 Jul 30, 2023
cfaaad8
#95 ReferralBlock
hobbes7878 Jul 30, 2023
0afcaf1
#95 SearchInput
hobbes7878 Jul 30, 2023
8dc3ccb
#95 Headline
hobbes7878 Jul 30, 2023
31f6c15
update SiteHeadline with hedSize prop
hobbes7878 Jul 30, 2023
4ef43b9
switch indentation
hobbes7878 Jul 30, 2023
97b1d61
token docs
hobbes7878 Jul 30, 2023
2b3cb8f
token docs
hobbes7878 Jul 30, 2023
f247c30
token docs
hobbes7878 Jul 30, 2023
f3ed0b6
mermaid
hobbes7878 Jul 30, 2023
6fddf7c
token docs
hobbes7878 Jul 30, 2023
6993fa0
new monospace font
hobbes7878 Jul 31, 2023
9b2dd3b
re-update monospace
hobbes7878 Aug 1, 2023
86757b6
bump svelte-csf
hobbes7878 Aug 1, 2023
e0d226a
docs
hobbes7878 Aug 1, 2023
682f3a9
try canary release with dry run
hobbes7878 Aug 1, 2023
29db605
fo real canaries
hobbes7878 Aug 1, 2023
130bc70
try ephemerally commiting build
hobbes7878 Aug 1, 2023
8be4955
built package
invalid-email-address Aug 1, 2023
d6d0b16
try not building
hobbes7878 Aug 1, 2023
62af622
Merge branch 'type-system' of https://github.com/reuters-graphics/gra…
hobbes7878 Aug 1, 2023
b7bf6ff
try with publish config for public access
hobbes7878 Aug 1, 2023
dec0b31
one last try
hobbes7878 Aug 1, 2023
a780467
really last
hobbes7878 Aug 1, 2023
2a857f5
lasty last
hobbes7878 Aug 1, 2023
331bdb0
try more explicit node auth env
hobbes7878 Aug 1, 2023
4f7b833
restrict canary workflow a bit better
hobbes7878 Aug 1, 2023
37ca781
restrict canary workflow a bit better
hobbes7878 Aug 1, 2023
fd8fc9d
stick on this for now
hobbes7878 Aug 1, 2023
7fcc859
bigger heap for chromatic
hobbes7878 Aug 1, 2023
8b527e9
restrict sitehed sizes
pkd2512 Aug 3, 2023
addf8e0
add font sizes and fluid spacers
pkd2512 Aug 4, 2023
a658b52
body text mixins and reset WIP
pkd2512 Aug 7, 2023
d7517c1
block and graphic block text styles
pkd2512 Aug 8, 2023
e53e091
scrub text styles into components
pkd2512 Aug 8, 2023
cd68e3c
role tokens table
hobbes7878 Aug 9, 2023
a9955b2
docs ordering
hobbes7878 Aug 15, 2023
fc463df
cleanup
hobbes7878 Aug 15, 2023
a39d79c
bump deps
hobbes7878 Aug 15, 2023
0652757
build package
hobbes7878 Aug 15, 2023
35dd07a
initial byline stab
hobbes7878 Aug 15, 2023
b0e3f11
first draft of byline
hobbes7878 Aug 15, 2023
cc553d9
incorporate byline into headlines
hobbes7878 Aug 15, 2023
08a0e99
headline component and general sweep
pkd2512 Aug 24, 2023
f1ae721
basic hero headline
pkd2512 Aug 25, 2023
10f4c55
hero with graphic
pkd2512 Aug 25, 2023
60ba223
hero headline stories
pkd2512 Aug 30, 2023
e7a79c5
component text style sweep
pkd2512 Aug 31, 2023
01266d2
table text styles
pkd2512 Aug 31, 2023
2e76af6
Update Table.svelte
pkd2512 Aug 31, 2023
570fbf7
Update Table.svelte
pkd2512 Aug 31, 2023
090fea9
build so package is updated
hobbes7878 Sep 1, 2023
00d53ad
quick fixes for #116
pkd2512 Sep 1, 2023
c2c99e0
edits for #116
pkd2512 Sep 1, 2023
4664808
some more stuff #116
pkd2512 Sep 1, 2023
c6a52df
fixes parseCSS when inline includes media queries
hobbes7878 Sep 1, 2023
4767578
edits for #116
pkd2512 Sep 2, 2023
a1e7671
video comp edits for #116
pkd2512 Sep 2, 2023
124c83f
Edit line heights
pkd2512 Sep 2, 2023
0ed0c89
edits for #116
pkd2512 Sep 5, 2023
18dc8cb
Update NoteText.svelte
pkd2512 Sep 5, 2023
bd13962
font-styles
pkd2512 Sep 5, 2023
cafe0f3
spacing adjust #116
pkd2512 Sep 5, 2023
fa09cbb
Update _typography.scss
pkd2512 Sep 5, 2023
e2780e7
more edits #116
pkd2512 Sep 5, 2023
917bcc9
byline spacings
pkd2512 Sep 5, 2023
fa5f588
Update _main.scss
pkd2512 Sep 5, 2023
ca97ddf
body-caption spacing #116
pkd2512 Sep 5, 2023
a779e53
Matt edits #116
pkd2512 Sep 7, 2023
5a61f95
fixes to headline and table #116
pkd2512 Sep 7, 2023
07c9720
list style and header fixes
pkd2512 Sep 8, 2023
7534582
update endnnotes component
pkd2512 Sep 8, 2023
c523f6e
build
pkd2512 Sep 8, 2023
b5fcb05
parse doc props for endnotes
pkd2512 Sep 8, 2023
5746d5a
try export again
pkd2512 Sep 8, 2023
b8b6103
change h2 margins
pkd2512 Sep 8, 2023
9b04daa
fix dropcap and add correction style
pkd2512 Sep 8, 2023
9ab2fe4
change size scale 18-21px
pkd2512 Sep 13, 2023
cf0e57d
Update _line-height.scss
pkd2512 Sep 13, 2023
0e884ca
edits to margins and css import order
pkd2512 Sep 13, 2023
deaec9c
Update _text-role.scss
pkd2512 Sep 13, 2023
38bd41d
spacing edits
pkd2512 Sep 13, 2023
0fc787a
spacing tweaks
pkd2512 Sep 13, 2023
4b4dbd5
Update GraphicBlock.svelte
pkd2512 Sep 13, 2023
5a69daf
hero, photo, video fixes #116
pkd2512 Sep 16, 2023
fd9aa87
add infobox #120
pkd2512 Sep 16, 2023
5e0df34
build
pkd2512 Sep 16, 2023
638a6f1
try again
hobbes7878 Sep 18, 2023
925a947
build
hobbes7878 Sep 18, 2023
84a74e1
bump chromatic. skip ci
hobbes7878 Sep 18, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
15 changes: 7 additions & 8 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ module.exports = {
root: true,
parser: '@typescript-eslint/parser',
ignorePatterns: ['node_modules', 'docs/**'],
extends: ['standard'],
plugins: ['svelte3', '@typescript-eslint'],
extends: ['standard', 'plugin:svelte/recommended'],
plugins: ['@typescript-eslint'],
parserOptions: {
ecmaVersion: 2020,
sourceType: 'module',
Expand All @@ -15,12 +15,8 @@ module.exports = {
browser: true,
es2022: true,
},
settings: {
'svelte3/ignore-styles': () => true,
'svelte3/typescript': require('typescript'),
},
rules: {
indent: ['error', 2],
indent: ['error', 2, { 'SwitchCase': 1 }],
semi: ['error', 'always'],
'comma-dangle': [
'error',
Expand All @@ -38,7 +34,10 @@ module.exports = {
overrides: [
{
files: ['*.svelte'],
processor: 'svelte3/svelte3',
parser: 'svelte-eslint-parser',
parserOptions: {
parser: '@typescript-eslint/parser'
},
rules: {
'no-multiple-empty-lines': ['error', { max: 2, maxBOF: 2 }],
'import/first': 'off',
Expand Down
59 changes: 59 additions & 0 deletions .github/workflows/canary.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: Canary

on:
push:

jobs:
release:
name: Release
runs-on: ubuntu-latest
# Restricts to:
# 1) the base repository
# 2) NOT the default branch ("main")
# 3) NOT "ci skip" in commit message
# 4) NOT "skip ci" in commit message
if: |
github.repository == 'reuters-graphics/graphics-components' &&
endsWith(github.event.base_ref, github.event.repository.default_branch) != true &&
contains(github.event.head_commit.message, 'ci skip') != true &&
contains(github.event.head_commit.message, 'skip ci') != true
steps:
- id: checkout
name: Checkout repository
uses: actions/checkout@v3

- id: prepare
name: Prepare repository
run: git fetch --unshallow --tags

- id: setup-node
name: Setup Node.JS
uses: actions/setup-node@v3
with:
node-version: 16
registry-url: https://registry.npmjs.org

- id: cache
name: Cache node modules
uses: actions/cache@v3
with:
path: node_modules
key: yarn-deps-${{ hashFiles('yarn.lock') }}
restore-keys: |
yarn-deps-${{ hashFiles('yarn.lock') }}

- id: install-deps
name: Install dependencies
run: yarn install --frozen-lockfile

- id: build-package
name: Build package
run: npm run build:package

- id: canary-release
name: Create Canary Release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
run: npx auto canary
2 changes: 2 additions & 0 deletions .github/workflows/chromatic.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ on: push
jobs:
chromatic-deployment:
runs-on: ubuntu-latest
env:
NODE_OPTIONS: '--max_old_space_size=4096'
steps:
- name: Checkout repository
uses: actions/checkout@v3
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,10 @@ jobs:
name: Build docs
run: npm run build:docs

- id: build-package
name: Build package
run: npm run build:package

- id: version
name: Version
run: npm version ${{ github.ref_name }} --no-git-tag-version
Expand Down
4 changes: 4 additions & 0 deletions .storybook/preview-head.html
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@48,400,0,0" />
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Fira+Code:wght@400;600&family=Inter+Tight:ital,wght@0,300;0,400;1,300;1,400&family=Inter:wght@300;400;500;600;700;800&display=swap" rel="stylesheet">
<script>
window.global = window;
</script>
63 changes: 50 additions & 13 deletions .storybook/preview.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
@import "../src/scss/mixins";
@import "../src/scss/colours/thematic/tr";
body {
font-family: "Nunito Sans", Helvetica, Arial, sans-serif;
}

table.docblock-argstable {
p {
Expand All @@ -12,7 +13,14 @@ table.docblock-argstable {
}
}

div.sbdocs-content {
div.sbdocs :where(p:not(.sb-anchor, .sb-unstyled, .sb-unstyled p)) {
font-size: 16px;
}

div.sbdocs-content {
h1 {
font-family: 'Knowledge', sans-serif;
}
& > h2, & > div > div > h2 {
margin-top: 4rem;
margin-bottom: 2rem;
Expand All @@ -26,7 +34,33 @@ div.sbdocs-content {
margin: 1rem 0;
}

blockquote.sbdocs {
& > div > :where(p, ul, ol),
.sb-anchor > div > :where(p, ul, ol) {
font-size: 18px;
line-height: 29px;
font-family: 'Knowledge', sans-serif;

.highlight {
background-color: rgb(254, 254, 160);
padding: 0 4px;
}
.bold {
font-weight: bold;
}
a {
font-family: 'Knowledge', sans-serif;
color: #0071a1;
text-decoration: none;
text-underline-offset: 2px;
&:hover {
text-decoration: underline;
}
}
}
}

.sbdocs-content {
blockquote:not(.sb-unstyled *) {
background-color: #ededed;
padding: 15px 20px;
border: 1px solid #ccc;
Expand All @@ -39,17 +73,16 @@ div.sbdocs-content {
}
}

.sbdocs {
@include font-display;
.sbdocs-content div.sbdocs:not(.sb-unstyled) {
font-family: 'Knowledge', sans-serif;

h1 {
@include font-display;
font-family: 'Knowledge', sans-serif;
}

p, ul, li {
font-size: 18px;
line-height: 29px;
@include font-display;
font-family: 'Knowledge', sans-serif;

.highlight {
background-color: rgb(254, 254, 160);
Expand All @@ -59,11 +92,11 @@ div.sbdocs-content {
font-weight: bold;
}
}

a {
@include font-display;
color: $tr-muted-blue;
font-family: 'Knowledge', sans-serif;
color: #0071a1;
text-decoration: none;
text-underline-offset: 2px;
&:hover {
text-decoration: underline;
}
Expand Down Expand Up @@ -92,7 +125,11 @@ div.sbdocs-content {
}
}

.sbdocs.sbdocs-wrapper {
padding-top: 1rem;
}

div.reset-article {
width: calc(100% + 30px);
margin-left: -15px;
}
}
19 changes: 17 additions & 2 deletions .storybook/preview.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import '../src/scss/main.scss';
import './preview.scss';

import { PrismLight as SyntaxHighlighter } from 'react-syntax-highlighter';
import { SyntaxHighlighter } from '@storybook/components';
import Wrapper from './Wrapper.svelte';
import markdown from 'react-syntax-highlighter/dist/esm/languages/prism/markdown';
import scss from 'react-syntax-highlighter/dist/esm/languages/prism/scss';
Expand Down Expand Up @@ -42,14 +42,29 @@ export const parameters = {
'Layout',
['Intro', '*'],
'Theming',
['*'],
['Theme', '*'],
'Components',
['Intro', '*'],
'*',
'Utilities',
['Intro', '*'],
'SCSS',
['Intro', '*'],
'Styles',
[
'Intro',
'Colours', [
'Intro',
'Primary',
'Thematic',
'*',
],
'Tokens', [
'Intro',
'Typography',
'*',
],
],
'Actions',
['Intro', '*'],
'Contributing',
Expand Down
6 changes: 6 additions & 0 deletions .storybook/svelte-highlighting.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
declare function svelte(Prism: any): void;
declare namespace svelte {
let displayName: string;
let aliases: any[];
}
export default svelte;
3 changes: 2 additions & 1 deletion .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"recommendations": [
"unifiedjs.vscode-mdx"
"unifiedjs.vscode-mdx",
"somewhatstationery.some-sass"
]
}
7 changes: 6 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,16 +1,21 @@
{
"i18n-ally.localesPaths": ["locales"],
"i18n-ally.keystyle": "nested",
"eslint.validate": ["javascript", "svelte"],
"eslint.validate": ["javascript", "svelte", "jsx"],
"editor.formatOnSave": true,
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
},
"emmet.excludeLanguages": [
"markdown",
"scss"
],
"files.associations": {
"*.svx": "mdx"
},
"[mdx]": {
"editor.wordWrap": "on"
},

"typescript.tsdk": "node_modules/typescript/lib"
}
43 changes: 0 additions & 43 deletions .vscode/svelte.scripts.code-snippets

This file was deleted.

Loading
Loading