@financial-times/n-myft-ui 23.0.1 → 24.0.0
Sign up to get free protection for your applications and to get access to all the features.
- package/.circleci/config.yml +13 -16
- package/.circleci/shared-helpers/helper-npm-install-peer-deps +6 -5
- package/.github/settings.yml +1 -1
- package/.scss-lint.yml +3 -3
- package/Makefile +1 -0
- package/README.md +11 -8
- package/build-state/npm-shrinkwrap.json +11383 -10733
- package/components/collections/collections.html +3 -11
- package/components/concept-list/concept-list.html +1 -4
- package/components/csrf-token/__tests__/input.test.js +23 -0
- package/components/csrf-token/input.jsx +26 -0
- package/components/follow-button/__tests__/follow-button.test.js +40 -0
- package/components/follow-button/follow-button.jsx +174 -0
- package/components/instant-alert/instant-alert.html +1 -1
- package/components/pin-button/pin-button.html +1 -1
- package/components/save-for-later/save-for-later.html +6 -9
- package/components/unread-articles-indicator/README.md +2 -62
- package/components/unread-articles-indicator/date-fns.js +5 -12
- package/components/unread-articles-indicator/index.js +1 -62
- package/components/unread-articles-indicator/storage.js +0 -44
- package/demos/app.js +30 -3
- package/demos/templates/demo.html +2 -4
- package/demos/templates/demo.jsx +33 -0
- package/demos/templates/digest-on-follow.html +1 -1
- package/jest.config.js +8 -0
- package/mixins/lozenge/_themes.scss +8 -4
- package/mixins/lozenge/main.scss +50 -4
- package/myft/main.scss +0 -1
- package/myft/ui/index.js +0 -2
- package/package.json +20 -6
- package/test/unread-articles-indicator/index.spec.js +13 -65
- package/test/unread-articles-indicator/storage.spec.js +0 -93
- package/components/csrf-token/input.html +0 -5
- package/components/follow-button/follow-button.html +0 -79
- package/components/header-tooltip/index.js +0 -37
- package/components/header-tooltip/main.scss +0 -12
- package/components/unread-articles-indicator/constants.js +0 -4
- package/components/unread-articles-indicator/count-unread-articles.js +0 -26
- package/components/unread-articles-indicator/main.scss +0 -59
- package/components/unread-articles-indicator/tracking.js +0 -15
- package/components/unread-articles-indicator/ui.js +0 -99
- package/components/unread-articles-indicator/update-count.js +0 -40
- package/test/unread-articles-indicator/count-unread-articles.spec.js +0 -72
- package/test/unread-articles-indicator/tracking.spec.js +0 -26
- package/test/unread-articles-indicator/ui.spec.js +0 -123
- package/test/unread-articles-indicator/update-count.spec.js +0 -156
package/.circleci/config.yml
CHANGED
@@ -2,7 +2,6 @@
|
|
2
2
|
# template: component
|
3
3
|
|
4
4
|
references:
|
5
|
-
|
6
5
|
container_config_node12: &container_config_node12
|
7
6
|
working_directory: ~/project/build
|
8
7
|
docker:
|
@@ -13,8 +12,7 @@ references:
|
|
13
12
|
docker:
|
14
13
|
- image: lambci/lambda:build-nodejs12.x
|
15
14
|
|
16
|
-
workspace_root: &workspace_root
|
17
|
-
~/project
|
15
|
+
workspace_root: &workspace_root ~/project
|
18
16
|
|
19
17
|
attach_workspace: &attach_workspace
|
20
18
|
attach_workspace:
|
@@ -22,31 +20,31 @@ references:
|
|
22
20
|
|
23
21
|
npm_cache_keys: &npm_cache_keys
|
24
22
|
keys:
|
25
|
-
|
26
|
-
|
27
|
-
|
23
|
+
- v3-dependency-npm-{{ checksum "package.json" }}-
|
24
|
+
- v3-dependency-npm-{{ checksum "package.json" }}
|
25
|
+
- v3-dependency-npm-
|
28
26
|
|
29
27
|
cache_npm_cache: &cache_npm_cache
|
30
28
|
save_cache:
|
31
|
-
|
32
|
-
|
29
|
+
key: v3-dependency-npm-{{ checksum "package.json" }}-{{ epoch }}
|
30
|
+
paths:
|
33
31
|
- ./node_modules/
|
34
32
|
|
35
33
|
restore_npm_cache: &restore_npm_cache
|
36
34
|
restore_cache:
|
37
|
-
|
35
|
+
<<: *npm_cache_keys
|
38
36
|
|
39
37
|
filters_ignore_gh_pages: &filters_ignore_gh_pages
|
40
38
|
branches:
|
41
39
|
ignore: gh_pages
|
42
40
|
|
43
|
-
|
41
|
+
filters_only_main: &filters_only_main
|
44
42
|
branches:
|
45
|
-
only:
|
43
|
+
only: main
|
46
44
|
|
47
|
-
|
45
|
+
filters_ignore_main: &filters_ignore_main
|
48
46
|
branches:
|
49
|
-
ignore:
|
47
|
+
ignore: main
|
50
48
|
|
51
49
|
filters_ignore_tags: &filters_ignore_tags
|
52
50
|
tags:
|
@@ -62,7 +60,6 @@ references:
|
|
62
60
|
version: 2
|
63
61
|
|
64
62
|
jobs:
|
65
|
-
|
66
63
|
build:
|
67
64
|
<<: *container_config_node12
|
68
65
|
steps:
|
@@ -149,7 +146,7 @@ workflows:
|
|
149
146
|
- build
|
150
147
|
- deploy:
|
151
148
|
filters:
|
152
|
-
<<: *
|
149
|
+
<<: *filters_only_main
|
153
150
|
requires:
|
154
151
|
- build
|
155
152
|
build-test-publish:
|
@@ -173,7 +170,7 @@ workflows:
|
|
173
170
|
- schedule:
|
174
171
|
cron: "0 0 * * *"
|
175
172
|
filters:
|
176
|
-
<<: *
|
173
|
+
<<: *filters_only_main
|
177
174
|
jobs:
|
178
175
|
- build:
|
179
176
|
context: next-nightly-build
|
@@ -11,10 +11,10 @@
|
|
11
11
|
#
|
12
12
|
# Why we pass the flags we do to `npm install`:
|
13
13
|
#
|
14
|
-
# --no-package-lock - While we now use package-lock.json
|
15
|
-
# in our repos, skip package-lock.json in this instance
|
16
|
-
# as we don't want to accidentally modify the file
|
17
|
-
# for subsequent steps in the workflow, e.g cache keys
|
14
|
+
# --no-package-lock - While we now use package-lock.json
|
15
|
+
# in our repos, skip package-lock.json in this instance
|
16
|
+
# as we don't want to accidentally modify the file
|
17
|
+
# for subsequent steps in the workflow, e.g cache keys
|
18
18
|
# and artefact generation.
|
19
19
|
#
|
20
20
|
# --no-save - We don't want to modify package.json as we
|
@@ -34,6 +34,7 @@ if [ -e package.json ]; then
|
|
34
34
|
|
35
35
|
npm ls --production --parseable 2>&1 >/dev/null | \
|
36
36
|
sed -n -e 's/^npm ERR! peer dep missing: \(.*\),.*/\1/p' | \
|
37
|
-
|
37
|
+
xargs -I{} echo -n '"{}" ' | \
|
38
|
+
xargs npm install --no-package-lock --no-save
|
38
39
|
|
39
40
|
fi
|
package/.github/settings.yml
CHANGED
package/.scss-lint.yml
CHANGED
@@ -1,7 +1,6 @@
|
|
1
1
|
linters:
|
2
|
-
|
3
2
|
# Documentation:
|
4
|
-
# https://github.com/causes/scss-lint/blob/
|
3
|
+
# https://github.com/causes/scss-lint/blob/HEAD/lib/scss_lint/linter/README.md
|
5
4
|
|
6
5
|
# "value !important;" not "value!important ;"
|
7
6
|
BangFormat:
|
@@ -262,7 +261,8 @@ linters:
|
|
262
261
|
enabled: true
|
263
262
|
identifier_list: base
|
264
263
|
additional_identifiers: []
|
265
|
-
excluded_identifiers:
|
264
|
+
excluded_identifiers:
|
265
|
+
["user-select", "appearance", "font-smoothing", "osx-font-smoothing"]
|
266
266
|
severity: warning
|
267
267
|
|
268
268
|
# No units on zero values: 0 not 0px
|
package/Makefile
CHANGED
package/README.md
CHANGED
@@ -16,22 +16,25 @@ These subdirectories may contain a README. If not, please speak to the myft team
|
|
16
16
|
n-myft-ui provides the CSS, JS and most templates for the myFT components on FT.com. We use semver to control rollout of the code.
|
17
17
|
|
18
18
|
As of August 2017, The following apps use n-myft-ui:
|
19
|
-
* next-front-page
|
20
|
-
* next-stream-page
|
21
|
-
* next-article
|
22
|
-
* next-myft-page
|
23
|
-
* next-tour-page
|
24
|
-
* next-video-page
|
25
|
-
* next-search-page
|
26
19
|
|
27
|
-
|
20
|
+
- next-front-page
|
21
|
+
- next-stream-page
|
22
|
+
- next-article
|
23
|
+
- next-myft-page
|
24
|
+
- next-tour-page
|
25
|
+
- next-video-page
|
26
|
+
- next-search-page
|
27
|
+
|
28
|
+
When you merge to main, you should make a new release and then roll it out to the apps, plus n-topic-card which contains a reference to this so that there aren't missing dependencies.
|
28
29
|
|
29
30
|
If you are making a major change, you will need to update the bower.json and package.json files for the above apps. For minor and patch updates, you can rebuild without cache from CircleCI.
|
30
31
|
|
31
32
|
## Running locally
|
33
|
+
|
32
34
|
```
|
33
35
|
make install
|
34
36
|
make build
|
35
37
|
make demo
|
36
38
|
```
|
39
|
+
|
37
40
|
View the demo on `localhost:5005`
|