Skip to content

Commit 4cd2f16

Browse files
authored
Merge pull request #3490 from Vizzuality/feature/map-v2
GFW Map 3.0
2 parents cc10a21 + 675868c commit 4cd2f16

File tree

948 files changed

+29723
-9777
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

948 files changed

+29723
-9777
lines changed

.babelrc

+4-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@
66
"mode": "remove",
77
"removeImport": true,
88
"ignoreFilenames": ["node_modules"]
9-
}]
9+
}],
10+
"react-hot-loader/babel"
1011
]
1112
}
1213
},
@@ -27,12 +28,13 @@
2728
],
2829
"plugins": [
2930
"syntax-dynamic-import",
31+
"transform-decorators-legacy",
3032
[
3133
"transform-class-properties",
3234
{
3335
"spec": true
3436
}
3537
],
36-
"transform-es2015-arrow-functions"
38+
"universal-import"
3739
]
3840
}

.env.prod.sample

+61
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
# Application
2+
3+
LAYER_SPEC=layerspec
4+
5+
# GFW Links
6+
GFW_API=https://production-api.globalforestwatch.org
7+
GFW_API_OLD=https://api.globalforestwatch.org
8+
GFW_ASSETS_URL=https://gfw-assets.s3.amazonaws.com/static/gfw-assets.nightly.js
9+
GFW_BLOG_HOST=http://blog.globalforestwatch.org
10+
GFW_HOWTO_URL=http://vizzuality.github.io/gfw-howto
11+
GFW_DEVELOPERS_URL=http://vizzuality.github.io/gfw-atlas
12+
13+
# External APIs
14+
CARTO_API=https://wri-01.carto.com/api/v2
15+
RESOURCE_WATCH_API=https://api.resourcewatch.org/v1
16+
CLIMATE_WATCH_API=https://climate-watch.vizzuality.com/api/v1
17+
18+
# AWS
19+
AWS_HOST=/uploads
20+
AWS_ACCESS_KEY_ID=
21+
AWS_SECRET_ACCESS_KEY=
22+
AWS_REGION=my-excellent-region
23+
S3_BUCKET_NAME=
24+
S3_DATA_BUCKET_NAME=
25+
26+
# Google
27+
ANALYTICS_PROPERTY_ID=
28+
LANDSTAD_KEY=
29+
SENTINEL_KEY=
30+
GOOGLE_MAPS_API_KEY=
31+
GOOGLE_CUSTOM_SEARCH_CX=
32+
GOOGLE_SEARCH_API_KEY=
33+
34+
# Bitly
35+
BITLY_API_URL=https://api-ssl.bitly.com/v3
36+
BITLY_USER=
37+
BITLY_API_KEY=
38+
39+
# Datasets
40+
COUNTRIES_PAGE_DATASET=a20e9c0e-8d7d-422f-90f5-3b9bca355aaf
41+
GLAD_ISO_DATASET=391ca96d-303f-4aef-be4b-9cdb4856832c
42+
GLAD_ADM1_DATASET=c7a1d922-e320-4e92-8e4c-11ea33dd6e35
43+
GLAD_ADM2_DATASET=428db321-5ebb-4e86-a3df-32c63b6d3c83
44+
FIRES_ISO_DATASET=ff289906-aa83-4a89-bba0-562edd8c16c6
45+
FIRES_ADM1_DATASET=9b9e56fc-270e-486d-8db5-e0a839c9a1a9
46+
FIRES_ADM2_DATASET=0f24299d-2aaa-4afc-945c-b614028c12d1
47+
48+
# Transifex
49+
TRANSIFEX_URL=https://www.transifex.com/api/2/project
50+
TRANSIFEX_PROJECT=
51+
TRANSIFEX_SLUG=
52+
TRANSIFEX_API_TOKEN=
53+
TRANSIFEX_RESOURCE_API_TOKEN=
54+
LOCALES_PATH=app/javascript/locales
55+
56+
# SMTP
57+
SMTP_USERNAME=
58+
SMTP_PASSWORD=
59+
60+
# CYPRESS
61+
CYPRESS_RECORD_KEY=

.env.sample

+2-2
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ CLIMATE_WATCH_API=https://climate-watch.vizzuality.com/api/v1
1919
AWS_HOST=/uploads
2020
AWS_ACCESS_KEY_ID=
2121
AWS_SECRET_ACCESS_KEY=
22-
AWS_REGION=
22+
AWS_REGION=my-excellent-region
2323
S3_BUCKET_NAME=
2424
S3_DATA_BUCKET_NAME=
2525

@@ -58,4 +58,4 @@ SMTP_USERNAME=
5858
SMTP_PASSWORD=
5959

6060
# CYPRESS
61-
CYPRESS_RECORD_KEY=
61+
CYPRESS_RECORD_KEY=

.eslintrc.yml

+2
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@ rules:
3737
react/jsx-filename-extension: 0
3838
react/sort-comp: 0
3939
react/no-find-dom-node: 0
40+
react/no-array-index-key: 0
41+
react/no-danger: 0
4042
camelcase: 0
4143
no-mixed-operators: 0
4244
class-methods-use-this: 0

.gitignore

-1
Original file line numberDiff line numberDiff line change
@@ -58,4 +58,3 @@ todo.todo
5858
/public/packs
5959
/public/packs-test
6060
/node_modules
61-
package-lock.json

.jshintrc

-33
This file was deleted.

.postcssrc

+1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{
22
"plugins": {
33
"postcss-cssnext": {
4+
"warnForDuplicates": false,
45
"browsers": ["> 1%", "last 2 versions", "Firefox ESR", "Safari >= 8", "IE >= 11"]
56
}
67
}

.travis.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
language: ruby
22

33
node_js:
4-
- 8.10.0
4+
- 8.11.2
55

66
rvm:
77
- 2.4.0

Gemfile

+2-2
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ gem 'rack-reverse-proxy', '~> 0.12.0', :require => 'rack/reverse_proxy'
3333
gem 'aws-sdk', '~> 3'
3434

3535
#Webpacker
36-
gem 'webpacker', '~> 3.5'
36+
gem 'webpacker', '~> 3.5.5'
3737

3838
# http://edgeguides.rubyonrails.org/upgrading_ruby_on_rails.html#responders
3939
gem 'responders', '~> 2.0'
@@ -71,4 +71,4 @@ end
7171
gem 'newrelic_rpm'
7272
gem 'puma'
7373

74-
gem 'dotenv-rails', :groups => [:development, :test]
74+
gem 'dotenv-rails', :groups => [:development, :test, :production_local]

Gemfile.lock

+1-1
Original file line numberDiff line numberDiff line change
@@ -1132,7 +1132,7 @@ DEPENDENCIES
11321132
useragent
11331133
vcr
11341134
web-console (~> 2.0)
1135-
webpacker (~> 3.5)
1135+
webpacker (~> 3.5.5)
11361136

11371137
RUBY VERSION
11381138
ruby 2.4.0p0

Procfile.dev

+2-4
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,2 @@
1-
web: bundle exec rails s
2-
web: redis-server /usr/local/etc/redis.conf
3-
# watcher: ./bin/webpack-watcher
4-
webpacker: ./bin/webpack-dev-server
1+
web: bundle exec rails s -b 0.0.0.0
2+
webpacker: ./bin/webpack-dev-server --watch --colors --progress

README.md

+10-8
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
-2.7 KB
Binary file not shown.
-3.75 KB
Binary file not shown.
-5.84 KB
Binary file not shown.
-8.07 KB
Binary file not shown.
-9.62 KB
Binary file not shown.
-10.1 KB
Binary file not shown.
-12.6 KB
Binary file not shown.
-13.4 KB
Binary file not shown.
-16.6 KB
Binary file not shown.
-4.54 KB
Binary file not shown.
-4.86 KB
Binary file not shown.
-5.84 KB
Binary file not shown.
-6.28 KB
Binary file not shown.
Binary file not shown.
-15.7 KB
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
-12.2 KB
Binary file not shown.

app/assets/images/favicon/browserconfig.xml

-12
This file was deleted.
-1.04 KB
Binary file not shown.
-1.53 KB
Binary file not shown.
-5.9 KB
Binary file not shown.

app/assets/images/favicon/favicon.ico

-14.7 KB
Binary file not shown.

app/assets/images/favicon/manifest.json

-41
This file was deleted.
-12.6 KB
Binary file not shown.
-13.1 KB
Binary file not shown.
-34.4 KB
Binary file not shown.
-5.63 KB
Binary file not shown.
-8.96 KB
Binary file not shown.
-8.55 KB
Binary file not shown.
-9.17 KB
Binary file not shown.
-18.5 KB
Binary file not shown.
-5.95 KB
Binary file not shown.
6.08 KB
+17

app/assets/images/map-page.png

167 KB
307 KB
-320 KB
Binary file not shown.
-320 KB
Binary file not shown.
-6.16 KB
-70 KB
-21 Bytes
-46.3 KB
-44.9 KB
-212 Bytes
-197 Bytes
-1.61 KB
-2.39 KB
-1.26 KB
-397 Bytes
-1.53 KB
-2.79 KB
-950 Bytes
-1.9 KB
-945 Bytes
-2.45 KB
-2.14 KB
-274 Bytes
-279 Bytes
-2.2 KB
-557 Bytes
-1.71 KB
-724 Bytes
-1.57 KB
-937 Bytes
-2.62 KB
-3.13 KB
-1.97 KB
-2.67 KB
-1.15 KB
-1.81 KB
-2.18 KB
-1.88 KB
-1.76 KB
-435 Bytes
-391 Bytes
-1.08 KB
-145 Bytes
-140 Bytes
-2.29 KB
-2.16 KB
-1.85 KB
-1.99 KB
-2.82 KB
-1.33 KB
-2.94 KB
-8.37 KB
-3.16 KB
-1.86 KB
-51.3 KB
-3 KB
-6.45 KB
-2.94 KB
-1.35 KB

app/assets/javascripts/map/views/LayersNavView.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ define(
7070
render: function() {
7171
this.$el.html('').append(
7272
this.template({
73-
staging: window.gfw.config.RAILS_ENV !== 'production'
73+
staging: window.gfw.config.FEATURE_ENV !== 'production'
7474
})
7575
);
7676
this.cache();

app/assets/javascripts/map/views/LegendView.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -392,7 +392,7 @@ define(
392392
startYear: options.startYear,
393393
layerTitle: layer.title,
394394
layerSlug: layer.slug,
395-
staging: window.gfw.config.RAILS_ENV !== 'production'
395+
staging: window.gfw.config.FEATURE_ENV !== 'production'
396396
},
397397
subLayers
398398
)

app/assets/stylesheets/global/_base.scss

+4
Original file line numberDiff line numberDiff line change
@@ -81,3 +81,7 @@ h1,h2 {
8181
-ms-user-select: none;
8282
user-select: none;
8383
}
84+
85+
#react-header {
86+
height: 55px;
87+
}

app/assets/stylesheets/modules/_section-new.scss

+2
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,8 @@ $aside-width: 270px;
167167
svg {
168168
display: block;
169169
fill: $dark;
170+
width: 20px;
171+
height: 20px;
170172
&.-inactive {
171173
display: none;
172174
}

app/controllers/about_controller.rb

-7
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,3 @@
11
class AboutController < ApplicationController
22
layout 'application_react'
3-
4-
def index
5-
@title = 'About'
6-
@desc = 'Global Forest Watch (GFW) is an online platform that provides data and tools for monitoring forests. By harnessing cutting-edge technology, GFW allows anyone to access near real-time information about where and how forests are changing around the world.'
7-
@keywords = 'GFW, about, global forest watch, about gfw, history, staff, world resources institute, wri, about gfw commodities, about gfw fires'
8-
end
9-
103
end

0 commit comments

Comments
 (0)