Modifies ExploreTool page to match sprint 4 design (#481)

* initial commit of sprint 4 explore page

* adds styling on HowYouCanHelp module

* troubleshooting li element on deployed URL

removing local bullet styles

* removing unused styles

* recreating HowYouCanHelp

* explicit list el styles

* adds bullets back in

* fixes tooltip style and alert padding

* componentize MapLegend

* fix links

* inital intl and unit tests

* adds trusswork tooltip for comparison

* updates based on various feedback and disucssions:

- removes react-tooltip
- placeholder trussworks tooltip
- removes download packet component
- intl on HowYouCanHelp
- updates MapLegend tests
- add initial cy test on ExploreTool page

* removes bold on alert

* PR feedback:

- removes location from J40Alert
- localizes `COLOR KEY`

* adds intl to constants file

* modifies download zip URL to new S3 location

* removes location depedencies on Alerts

* add localization for HowYouCanHelp
This commit is contained in:
Vim 2021-08-10 09:45:45 -07:00 committed by GitHub
commit 174a0e1330
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
44 changed files with 974 additions and 426 deletions

View file

@ -0,0 +1,44 @@
import * as React from 'react';
import {useIntl} from 'gatsby-plugin-intl';
import {defineMessages} from 'react-intl';
import J40Alert from '../J40Alert';
import J40Map from '../J40Map';
import * as styles from './mapWrapper.module.scss';
import * as constants from '../../data/constants';
interface IMapWrapperProps {
location: Location
}
const MapWrapper = ({location}: IMapWrapperProps) => {
const intl = useIntl();
const messages = defineMessages({
downloadLinkText: {
id: 'mapwrapper.download.link',
defaultMessage: 'Download the draft list of prioritized communities (pre-decisional) and datasets used',
description: 'download link for datasets',
},
downloadContents: {
id: 'mapwrapper.download.contents',
defaultMessage: 'ZIP file will contain one .xlsx, one .csv and one .pdf (30 MB).',
description: 'download link contents',
},
});
return (
<>
<J40Alert alertStyle={{'padding-left': '1rem'}}/>
<J40Map location={location}/>
<div className={styles.mapCaptionTextLink}>
<a href={constants.DOWNLOAD_ZIP_URL}>
{intl.formatMessage(messages.downloadLinkText)}
</a>
</div>
<div>{intl.formatMessage(messages.downloadContents)}</div>
</>
);
};
export default MapWrapper;