Skip to content

Commit

Permalink
Merge tag '6.9.8-rc'
Browse files Browse the repository at this point in the history
2023 Q2 data release
  • Loading branch information
agnessa committed Jul 6, 2023
2 parents 5c07a4d + 67e3159 commit 0159e75
Show file tree
Hide file tree
Showing 18 changed files with 157 additions and 79 deletions.
134 changes: 67 additions & 67 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -12,40 +12,40 @@ GEM
MailchimpMarketing (3.0.80)
excon (>= 0.76.0, < 1)
json (~> 2.1, >= 2.1.0)
actioncable (6.1.7.3)
actionpack (= 6.1.7.3)
activesupport (= 6.1.7.3)
actioncable (6.1.7.4)
actionpack (= 6.1.7.4)
activesupport (= 6.1.7.4)
nio4r (~> 2.0)
websocket-driver (>= 0.6.1)
actionmailbox (6.1.7.3)
actionpack (= 6.1.7.3)
activejob (= 6.1.7.3)
activerecord (= 6.1.7.3)
activestorage (= 6.1.7.3)
activesupport (= 6.1.7.3)
actionmailbox (6.1.7.4)
actionpack (= 6.1.7.4)
activejob (= 6.1.7.4)
activerecord (= 6.1.7.4)
activestorage (= 6.1.7.4)
activesupport (= 6.1.7.4)
mail (>= 2.7.1)
actionmailer (6.1.7.3)
actionpack (= 6.1.7.3)
actionview (= 6.1.7.3)
activejob (= 6.1.7.3)
activesupport (= 6.1.7.3)
actionmailer (6.1.7.4)
actionpack (= 6.1.7.4)
actionview (= 6.1.7.4)
activejob (= 6.1.7.4)
activesupport (= 6.1.7.4)
mail (~> 2.5, >= 2.5.4)
rails-dom-testing (~> 2.0)
actionpack (6.1.7.3)
actionview (= 6.1.7.3)
activesupport (= 6.1.7.3)
actionpack (6.1.7.4)
actionview (= 6.1.7.4)
activesupport (= 6.1.7.4)
rack (~> 2.0, >= 2.0.9)
rack-test (>= 0.6.3)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.0, >= 1.2.0)
actiontext (6.1.7.3)
actionpack (= 6.1.7.3)
activerecord (= 6.1.7.3)
activestorage (= 6.1.7.3)
activesupport (= 6.1.7.3)
actiontext (6.1.7.4)
actionpack (= 6.1.7.4)
activerecord (= 6.1.7.4)
activestorage (= 6.1.7.4)
activesupport (= 6.1.7.4)
nokogiri (>= 1.8.5)
actionview (6.1.7.3)
activesupport (= 6.1.7.3)
actionview (6.1.7.4)
activesupport (= 6.1.7.4)
builder (~> 3.1)
erubi (~> 1.4)
rails-dom-testing (~> 2.0)
Expand Down Expand Up @@ -78,22 +78,22 @@ GEM
activeadmin_sortable_table (1.3.0)
activeadmin (>= 1.0.0.pre1)
uber (= 0.0.15)
activejob (6.1.7.3)
activesupport (= 6.1.7.3)
activejob (6.1.7.4)
activesupport (= 6.1.7.4)
globalid (>= 0.3.6)
activemodel (6.1.7.3)
activesupport (= 6.1.7.3)
activerecord (6.1.7.3)
activemodel (= 6.1.7.3)
activesupport (= 6.1.7.3)
activestorage (6.1.7.3)
actionpack (= 6.1.7.3)
activejob (= 6.1.7.3)
activerecord (= 6.1.7.3)
activesupport (= 6.1.7.3)
activemodel (6.1.7.4)
activesupport (= 6.1.7.4)
activerecord (6.1.7.4)
activemodel (= 6.1.7.4)
activesupport (= 6.1.7.4)
activestorage (6.1.7.4)
actionpack (= 6.1.7.4)
activejob (= 6.1.7.4)
activerecord (= 6.1.7.4)
activesupport (= 6.1.7.4)
marcel (~> 1.0)
mini_mime (>= 1.1.0)
activesupport (6.1.7.3)
activesupport (6.1.7.4)
concurrent-ruby (~> 1.0, >= 1.0.2)
i18n (>= 1.6, < 2)
minitest (>= 5.1)
Expand All @@ -108,27 +108,27 @@ GEM
annotate (3.2.0)
activerecord (>= 3.2, < 8.0)
rake (>= 10.4, < 14.0)
appsignal (3.4.4)
appsignal (3.4.5)
rack
arbre (1.5.0)
activesupport (>= 3.0.0, < 7.1)
ruby2_keywords (>= 0.0.2, < 1.0)
ast (2.4.2)
aws-eventstream (1.2.0)
aws-partitions (1.780.0)
aws-sdk-core (3.175.0)
aws-partitions (1.782.0)
aws-sdk-core (3.176.0)
aws-eventstream (~> 1, >= 1.0.2)
aws-partitions (~> 1, >= 1.651.0)
aws-sigv4 (~> 1.5)
jmespath (~> 1, >= 1.6.1)
aws-sdk-kms (1.67.0)
aws-sdk-core (~> 3, >= 3.174.0)
aws-sdk-kms (1.68.0)
aws-sdk-core (~> 3, >= 3.176.0)
aws-sigv4 (~> 1.1)
aws-sdk-s3 (1.126.0)
aws-sdk-core (~> 3, >= 3.174.0)
aws-sdk-s3 (1.127.0)
aws-sdk-core (~> 3, >= 3.176.0)
aws-sdk-kms (~> 1)
aws-sigv4 (~> 1.4)
aws-sigv4 (1.5.2)
aws-sigv4 (~> 1.6)
aws-sigv4 (1.6.0)
aws-eventstream (~> 1, >= 1.0.2)
bcrypt (3.1.18)
bcrypt_pbkdf (1.1.0)
Expand Down Expand Up @@ -215,7 +215,7 @@ GEM
factory_bot_rails (6.2.0)
factory_bot (~> 6.2.0)
railties (>= 5.0.0)
faraday (2.7.6)
faraday (2.7.7)
faraday-net_http (>= 2.0, < 3.1)
ruby2_keywords (>= 0.0.4)
faraday-net_http (3.0.2)
Expand Down Expand Up @@ -302,11 +302,11 @@ GEM
mime-types-data (3.2023.0218.1)
mini_mime (1.1.2)
mini_portile2 (2.8.2)
minitest (5.18.0)
minitest (5.18.1)
msgpack (1.6.0)
multipart-post (2.3.0)
naught (1.1.0)
net-imap (0.3.4)
net-imap (0.3.6)
date
net-protocol
net-pop (0.1.2)
Expand Down Expand Up @@ -337,28 +337,28 @@ GEM
public_suffix (5.0.1)
puma (6.3.0)
nio4r (~> 2.0)
racc (1.7.0)
racc (1.7.1)
rack (2.2.7)
rack-cors (2.0.1)
rack (>= 2.0.0)
rack-proxy (0.7.6)
rack
rack-test (2.1.0)
rack (>= 1.3)
rails (6.1.7.3)
actioncable (= 6.1.7.3)
actionmailbox (= 6.1.7.3)
actionmailer (= 6.1.7.3)
actionpack (= 6.1.7.3)
actiontext (= 6.1.7.3)
actionview (= 6.1.7.3)
activejob (= 6.1.7.3)
activemodel (= 6.1.7.3)
activerecord (= 6.1.7.3)
activestorage (= 6.1.7.3)
activesupport (= 6.1.7.3)
rails (6.1.7.4)
actioncable (= 6.1.7.4)
actionmailbox (= 6.1.7.4)
actionmailer (= 6.1.7.4)
actionpack (= 6.1.7.4)
actiontext (= 6.1.7.4)
actionview (= 6.1.7.4)
activejob (= 6.1.7.4)
activemodel (= 6.1.7.4)
activerecord (= 6.1.7.4)
activestorage (= 6.1.7.4)
activesupport (= 6.1.7.4)
bundler (>= 1.15.0)
railties (= 6.1.7.3)
railties (= 6.1.7.4)
sprockets-rails (>= 2.0.0)
rails-controller-testing (1.0.5)
actionpack (>= 5.0.1.rc1)
Expand All @@ -370,9 +370,9 @@ GEM
rails-html-sanitizer (1.6.0)
loofah (~> 2.21)
nokogiri (~> 1.14)
railties (6.1.7.3)
actionpack (= 6.1.7.3)
activesupport (= 6.1.7.3)
railties (6.1.7.4)
actionpack (= 6.1.7.4)
activesupport (= 6.1.7.4)
method_source
rake (>= 12.2)
thor (~> 1.0)
Expand Down Expand Up @@ -494,7 +494,7 @@ GEM
thor (1.2.2)
thread_safe (0.3.6)
tilt (2.1.0)
timeout (0.3.2)
timeout (0.4.0)
turbolinks (5.2.1)
turbolinks-source (~> 5.2)
turbolinks-source (5.2.0)
Expand Down
3 changes: 3 additions & 0 deletions frontend/.storybook/preview-head.html
Original file line number Diff line number Diff line change
Expand Up @@ -507,5 +507,8 @@
<path
d="M1.23617 7.99995L1.23616 9.49995L2.24903 9.49995L-4.70578e-05 11.749L1.06061 12.8097L3.30969 10.5606L3.30969 11.5735L4.80969 11.5735L4.80969 7.99995L1.23617 7.99995Z" />
</symbol>
<symbol id="icon-warning-bell"width="13" height="17" viewBox="0 0 13 17" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M5.68924 8.86736H6.86632V4.70833H5.68924V8.86736ZM6.27742 10.9861C6.46076 10.9861 6.61455 10.9241 6.7388 10.8001C6.86305 10.6761 6.92517 10.5224 6.92517 10.3391C6.92517 10.1557 6.86317 10.0019 6.73916 9.87769C6.61513 9.75344 6.46145 9.69132 6.27813 9.69132C6.09479 9.69132 5.941 9.75333 5.81675 9.87734C5.69251 10.0014 5.63038 10.155 5.63038 10.3384C5.63038 10.5217 5.69239 10.6755 5.8164 10.7997C5.94043 10.924 6.0941 10.9861 6.27742 10.9861ZM0 13.3403V12.1632H1.64792V6.16007C1.64792 5.05918 1.97161 4.08098 2.61901 3.22546C3.26641 2.36995 4.11979 1.83102 5.17917 1.60868V1.03976C5.17917 0.738947 5.28553 0.490451 5.49825 0.294271C5.71097 0.0980903 5.96927 0 6.27317 0C6.57705 0 6.83689 0.0980903 7.05269 0.294271C7.26849 0.490451 7.37639 0.738947 7.37639 1.03976V1.60868C8.43576 1.83102 9.29242 2.36995 9.94635 3.22546C10.6003 4.08098 10.9273 5.05918 10.9273 6.16007V12.1632H12.5556V13.3403H0ZM6.27778 15.6944C5.85926 15.6944 5.49306 15.5408 5.17917 15.2334C4.86528 14.9261 4.70833 14.5566 4.70833 14.125H7.84722C7.84722 14.5566 7.69355 14.9261 7.3862 15.2334C7.07885 15.5408 6.70937 15.6944 6.27778 15.6944Z" fill="currentColor"/>
</symbol>
</svg>
</div>
6 changes: 6 additions & 0 deletions frontend/html/statics/icons.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 11 additions & 0 deletions frontend/scripts/app/app.selectors.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,3 +54,14 @@ export const getAppUrlProps = createStructuredSelector({
selectedYears: getAppSelectedYears,
selectedContextId: getAppSelectedContextId
});

export const hasConfidenceWarningFunction = (context) => {
if (!context) return false;
const { countryName, commodityName } = context;
// This condition may come from the CMS in the future
return countryName === 'INDONESIA' && commodityName === 'SHRIMP';
}

export const hasConfidenceWarning = createSelector(
[getSelectedContext],
hasConfidenceWarningFunction);
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,6 @@ class ActorSummary extends React.PureComponent {
titles={titles}
on={onChange}
/>

{status !== Sticky.STATUS_FIXED &&
headerAttributes &&
Object.keys(headerAttributes).length > 0 &&
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ function CountrySummary(props) {
} = {},
data: { summary, headerAttributes } = {}
} = props;

const renderCountryMap = () => (
<div className="c-overall-info page-break-inside-avoid">
<div className="c-locator-map map-country-banner">
Expand All @@ -43,9 +42,9 @@ function CountrySummary(props) {
</div>
</div>
);

const selectedCommodity = commodities.find(c => c.id === commodityId);
const selectedActivity = activities.find(a => a.name === activity);

const titles = [
{
dropdown: true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,6 @@ function PlaceSummary(props) {
</div>
)}
</Sticky>

{renderStats()}
</div>

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import React from 'react';
import Text from 'react-components/shared/text';
import './confidence-warning.scss';

const ConfidenceWarning = () => (
<Text className="warning" color="grey">
<svg className="icon warning-bell-icon">
<use xlinkHref="#icon-warning-bell" />
</svg>
<div className="warning-text">
<Text weight="bold" className="warning-bold" as="span">
Note:{' '}
</Text>
This dataset is experimental and we welcome feedback. Please refer to the methods to
understand the modelling work and its limitations.
</div>
</Text>
);

export default ConfidenceWarning;
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
.warning {
margin-top: 10px;
display: flex;
align-items: flex-start;
}

.warning-bell-icon {
overflow: visible;
margin: 2px 5px 0 0;
}

.warning-text {
display: inline;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export { default } from './confidence-warning.component';
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,10 @@ import PropTypes from 'prop-types';
import Heading from 'react-components/shared/heading';
import Text from 'react-components/shared/text';
import cx from 'classnames';

import 'react-components/shared/tool-bar/edit-filter/edit-filter.scss';

function EditFilter(props) {
const { id, title, subtitle, onClick, className, label } = props;

return (
<button onClick={() => onClick(id)} className={cx('c-edit-filter', className)}>
<Text as="span" size="rg" variant="sans" transform="uppercase" className="options-menu-label">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,27 @@
.edit-subtitle {
color: $gray-500;
}

.warning-bell-icon {
color: $gray-500;
}
}

.options-menu-label {
display: block;
color: $gray-300;
margin-top: 7px;
}

.warning-bell-icon {
transform: translate(5px, 2px);
}
}

.warning-tooltip {
padding: 16px 10px;
margin: 10px 0 0;
max-width: 280px;

z-index: $z-tooltip;
}
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ const types = {
function ToolBar(props) {
const { leftSlot, rightSlot, className } = props;
const [activeId, setId] = useState(null);

function getListItem(item, ref) {
const {
noHover,
Expand Down
Loading

0 comments on commit 0159e75

Please sign in to comment.