Commit graph

70 commits

Author SHA1 Message Date
TomNUSDS
f7bfc979ba
Fix putting elements under <p> (#521)
* Fix putting elements under <p>
* Added Jest test to catch this mistake in the future. It does it by watching console.error().
To add in fixing the bug the test's emulated `console.error()` are echoed to the jest console.error() so they are not lost.
* I tested this by putting a `<h1>` back into the `<p>` and it caught it.
* Update scoreStepsList.test.tsx
* added comment to move console.error ticket to global location

Co-authored-by: Vim <86254807+vim-usds@users.noreply.github.com>
2021-08-19 17:34:12 -07:00
Vim
6691df3e31
adds VIEW_MAP_DATA readme (#505)
* adds VIEW_MAP_DATA readme

* removes SSL when hitting S3 directly

* fixed typo

* PR feedback
2021-08-18 12:28:11 -07:00
Vim
d449e9c554
update areaDetail with data from d3 CDN (#547)
* update areaDetail with data from d3 CDN

- updated constants with d3 CDN info
- placed AreaDetail component in folder
- fixed J40Alert padding-left console warning
- added tests for both J40Alert rendering

* udpates FE to percentile data

* testing CORS on PR'd URL

* testing PR'd URL
2021-08-18 08:47:34 -07:00
TomNUSDS
2af9d6dcd3
fix contact fix footer (#511)
* Fix footer
* Remove one contact
* Fix some spacing issues
* Update J40Footer.spec.tsx.snap
* Fixes suggested in code review
2021-08-16 09:08:54 -07:00
TomNUSDS
ec4344676d
Add Cumulative Score "steps" section to methodology page (#489)
* Step progress list
* Layout mostly done. Need to do intl() conversion but it's easier to understand the layout like this.
Will do intl in a different PR
* fix: `em` to `rem`
* Add basic snapshot unit test
2021-08-10 15:36:09 -07:00
Vim
176cb71d9a
updates snapshot (#498) 2021-08-10 11:43:24 -07:00
Vim
174a0e1330
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
2021-08-10 09:45:45 -07:00
TomNUSDS
73a205dc48
Refactor layout (#486)
* Refactor to move `<DatasetContainer>` out of layout
* `<DatasetContainer>` is now in the methodology page. Starting the review there will help understand the motive for this change.
* Fixed 404 page which seems way out of date.
* Use row/col grid syntax
2021-08-09 08:04:24 -07:00
TomNUSDS
9af8aba70b
Added .DS_Store (#482) 2021-08-06 12:13:49 -07:00
TomNUSDS
ef044fa36b
fix footer layout and links (#447)
* fix footer layout and links
* Fix up trusswork's `<Footer>` + `<Logo>` + `<Address>` to match design
2021-08-05 21:34:43 -07:00
Vim
849437c9d3
adds nvmrc file (#445) 2021-08-02 10:35:18 -07:00
Vim
51f7666062
Adds dataset cards to Methodology page (#442)
* intial cards for methodology page

* PR and QA feedback
- adds alert above dataset section
- adds intl
- removes nbsp
- creates directory structure for new components

* revert noUsedLocals flag

* fixed path error

* re-creates scss file to test build failure

* renaming file to troubleshoot build error

* links open in new tabs and removes console.log

* removes units on all scss value that equal 0

* resolving merge conflicts from header merge

* updates snapshots from conflict resolution
2021-08-02 08:49:49 -07:00
TomNUSDS
08e21e5d5b
fix #249 header 2 (#425)
* Header updates
* More pixel alignment for nav
* Update unit test snapshots
I removed a stray `,` from `testHelpers.tsx` which changed the output of several snapshots.
* Fixes from PR review
* Forgot to update snapshots after merge with main
* Removed unused (and outdated) timeline page
* Updated some translation descriptions.
2021-08-02 07:48:19 -07:00
Nat Hillard
3238e09792
Loading a URL with lat/lng/zoom specified does not work (#414) 2021-07-27 20:51:35 -04:00
Nat Hillard
937770ab3c
Fixes #383 - I want to see the cumulative impact score and associated info for communities that are not prioritized (#386) 2021-07-27 18:23:38 -04:00
Nat Hillard
a2ba9236ab
Clicking territory focus button sometimes focuses on a different CBG, not the actual territory (#412)
* Fixing #410 - Clicking a CBG region, then another, then hitting territory button results in random CBG being selected

* Part of fix for #410 - refactoring selection
logic to remove setFeatureState call.

* Renaming layers for clarity and adding constants

* Using constant for layer identifier

* Fixes #409 - Loading a URL with lat/lng/zoom specified occasionally does not work . We now parse the URL on page before initializing the map. Also adds tests for this
2021-07-27 18:21:47 -04:00
Vim
36f43b2d44
adds map side panel (#406)
* initial map side panel

* componentize MapSidePanel

* remove selection from J40Map

* adds isFeatureSelected to toggle component

* filters data from server for client UI

* styling and refactor

* added TODO

* adds styling to intro and pairing feedback

* add mobile styling

* adds popup back to fs feature flag

* adds tests and aria roles

* makes mobile content same as desktop

* prettier update

* initial e2e mapSidePanel test

* adds cypress tests on desktop and mobile

* adds sass util and updates cypress tests

* cleans up tests

* reverts tsconfig file

* fixes map alignment

* renaming and using constants

* renaming sidePanel to infoPanel

* intl messaging

* adds snapshot testing and utility sass file

* PR feedback
- adds intl messages
- adds data-cy attr to cy tests
- snapshot testing for unit tests
- fixes bug where side panel extends past the map
- moves all wrapper content in MapWrapper

* logs isMobile to troubleshoot deployed PR

* adds react-device-detect for isMobile detection

* adds new instance of map for mobile

* adds instance

* adds isMobile to state

* tests the fix for mobile map view on PR

* PR review feedback
- localize MapIntroduction
- update snapshot tests
- QA feedback
- constants.isMobile points to react-device-detect
2021-07-27 12:05:25 -07:00
Nat Hillard
7b241795fa
Cypress tests are failing locally (#403)
* adding readme with debug instructions
* updating translation tests to pass
* fixes failing latlng url test
* localizing focus buttons
* updating map tests to pass
* temporarily setting to only flag critical+  accessibility errors. To be addressed with full accessibility audit later
2021-07-23 08:52:34 -04:00
Nat Hillard
ab72dc24cf
Zoom button styling does not match spec (#395)
* Fixes #320, Zoom button styling does not match spec
* Setting explicit size for icon dimension to avoid automatic SVG sizing weirdness for gatsby build static site
2021-07-22 12:53:18 -04:00
Vim
14e6a98008
Update README.md
adds when flags are to be used
2021-07-21 08:08:08 -07:00
Shelby Switzer
5600443f1a
Update install steps (#359)
* Update INSTALLATION.md

Update INSTALLATION with more narrative text on how to install and start running parts of the app. We will need to update this soon with more info about the repo organization (once we have a `data` directory), but for now this reflects the current state of the repo.

* Update docs

Move client-specific things to client README, and update client README with steps to get the clientside app running locally.
2021-07-20 14:22:04 -04:00
TomNUSDS
d10f2ae0c9
Fix #353 - site icon (#388)
- site not being at the "topmost level" (e.g. there's a `/path`) makes the approach of having the favicon in a known, static location break (`https://[tld]/favicon.ico`).
Setting the icon via the plugin should make it work. It should be here anyways.
We'll still need to add the SEO plugin as part of the accessibility fixes (setting page meta tags in a i18n way)
2021-07-20 10:46:38 -07:00
TomNUSDS
609506d98d
Fix I18n and testing (#387)
Get snapshots working with Gatsby Intl plugin.
2021-07-20 10:46:13 -07:00
Vim
e5908cf7d7
updates filename and comments (#378) 2021-07-19 08:05:32 -07:00
TomNUSDS
dca7980195
Fix inlined css in every single page. (#369)
Fix for issue #366
* Create gatsby-ssr.js
Note: SSR means "server side rendering". This fix is from a long github discussion about how broken including all css inline in the file is. (Especially since newer CSP guidelines say all css should be in a separate file.)

* PR code review fixes
* Check el.props['data-href'] is valid
* Add comment for production only.
2021-07-16 22:09:55 -07:00
TomNUSDS
e066f459fa
Fixed es.json (#354)
* Fixed es.json
- converted remaining english to spanish in file so as to check more locations.
- the `formatjs compile` for Spanish was failing converted back to english for now. build does the correct thing, so it's more just to keep things correct in source.
* add support for eslint-plugin-formatjs
 - eslint rules for formatjs
 - we are mostly protected by typescript checking, but this is a nice sanity check.
2021-07-15 13:00:15 -07:00
Vim
33c3288160
Allows the user to download CBG list (#318)
* adds initial download CBG box

* componentize download packet, adds e2e tests

* changes download file url in test to smaller size

* improve testing functions

* removes underline, colors icon

* replace csv with zip for safari security issue
2021-07-15 11:01:10 -07:00
Nat Hillard
dbf1ae2ad8
Zoom button styling does not match spec // General custom controls fix (#357) 2021-07-15 10:28:51 -04:00
TomNUSDS
cfce0dc826
End-to-end working localization (#336)
* End-to-end localization working
* Update package.json
* fix FormattedMessage confusion by using the `FormattedMessage` from `gatsby-plugin-intl` NOT `react-intl`
* TODO: `client/src/intl/es.json` should be generated from a translation tool.
* Update package-lock.json
2021-07-14 12:05:18 -07:00
Nat Hillard
3cd6e06115
Parameterize zoom experiments (#339)
* Adding ability to set flags in url
* parameterizing tile layers
2021-07-14 11:26:12 -04:00
Nat Hillard
6c8d71c5b9
Followup styling fixes (#335)
* Followup to add proper score property to popup
* Adding Additional property name constants
2021-07-13 11:17:49 -04:00
Nat Hillard
68c345b950
Adding low zoom level styling (#334)
* Fixes #201 - As an EVCM, I want the map to make sense at varying zoom levels so that I'm not confused . For now uses a usa_low tileset created as part of #209 for zoom levels 3-7. Will need further iteration
* Adding comments
2021-07-12 18:05:11 -04:00
Nat Hillard
be0256e896
[BUG] Tiles disappear after zoom 11 (#324) 2021-07-12 08:41:29 -04:00
Nat Hillard
d0c281ec72
Census block groups should highlight when selected (#317)
* Fixes #280 - adds territory focus buttons for Alaska, Hawaii, Lower 48, and Puerto Rico to enable easy zoom to these locations

* Adding tests - Specifically:
    * Adding VSCode debug command for Cypress and debug port specification
    * Disabling CORS on local tests
    * Adding waitForMapIdle Cypress test helper
    * Adding constants for easy change and access
2021-07-09 10:56:38 -04:00
Nat Hillard
5bade764c6
Fixes #280 - adds territory focus buttons for Alaska, Hawaii, Lower 48, and Puerto Rico to enable easy zoom to these locations (#315) 2021-07-09 09:56:18 -04:00
Nat Hillard
2257627938
Use MapLibre for Map Visualization (#300)
* switching to MapLibre (see more at https://github.com/usds/justice40-tool/issues/299)
* Removing traces of OpenLayers
* Review comments - removing unused properties, component
This is a pre-requisite for addressing issue #280 and other similar control-related tickets
2021-07-07 15:04:00 -04:00
Nat Hillard
27d9472326
Add Zoom/Lat/Lng to the URL (#293)
* mandatory eslint fix
* Addresses #286 - Adding lat/lng to the URL
* setting zoom on map load
* adding integration tests for zoom
2021-07-06 14:52:35 -04:00
Vim
e8385e1439
fixes prettier error message during build (#295)
fixes #290
2021-07-02 12:32:55 -07:00
Nat Hillard
beac44ef20
Various map styling fixes (#278)
Addresses #182, #291, #273 and #191 

In particular:
* Removes zoom fading for now
* adds legend
* Styles mapbox popup correctly
* Styles zoom control
* Adds feature borders at higher zoom levels
2021-07-01 12:57:59 -04:00
TomNUSDS
f4f7c35ca8
Site content and style update for sprint2/3 (#279)
* add legend and styling for map page
* update header to latest style/content
* add contact page
* add methodology page
#199 and #200
2021-07-01 07:28:43 -07:00
Nat Hillard
92efc5c937
Zoom fade for higher zoom levels (#265) 2021-06-30 07:08:22 -04:00
Nat Hillard
f12ab4d3b7
Issue 191 - Multi-state visualization (#226)
Addresses issue #191 - As a stakeholder interested in the cumulative impact score, I want to see more states in the map, so that I can further analyze the score results. Introduces gradient coloration on limited 5-state dataset as well as the core of a few key visual aspects of the map to be expanded upon later.
2021-06-24 13:20:45 -04:00
Nat Hillard
8b8314aeb3
Addresses #199 - removing non-functioning layer switcher for now (#212)
* Addresses #199 , but just the switcher part. Not functioning at the moment, we should remove to minimize confusion
* Adding comment
2021-06-23 13:31:03 -04:00
Nat Hillard
922740a4cb
Addresses #210, aside should not appear on map page (#211) 2021-06-23 12:47:31 -04:00
TomNUSDS
e7ccd35aa6
Minimal refactor to make maps wider (#149)
Not particularly pretty, but it works.
2021-06-17 07:31:18 -07:00
Nat Hillard
a67b79a748
Adding ol-mapbox-style for easier styling (#148) 2021-06-17 09:28:37 -04:00
Nat Hillard
292c5bc8f5
CEJST Map (#139)
* styles prettier fix
* Addresses issue #100 from the frontend:
* Creates new cejst page and related OL components
* temporarily loads census-derived tileserver at higher zoom levels
* lays out cejst page : TODO :  remove aside
* temporarily removing license check - TODO: fix jsonlint
* review comments
2021-06-16 18:16:49 -04:00
TomNUSDS
9155326775
Make the accessibility checkers happy (#129)
* Make the accessibility checkers happy
* Include a lang specification in the `<html>` tag.
* reorder `<h#>` header tags.
The `<Aside` to from `<h1>`, `<h2>` to be `<h2>`, `<h3>`. This is because trusswork's `<Footer>` uses and `<h4>` and the accessibility checkers complain it was skipping from `<h2>` -> `<h4>`
* Change `<aria-details>` to `<aria-label>` for milestone list
* Update J40Header.tsx 80 column line
2021-06-14 19:35:35 -07:00
TomNUSDS
760edb4feb
Update global.scss (#127)
Fix some low-contrast accessibility issues for mobile menu.
2021-06-14 13:21:18 -07:00
TomNUSDS
3837538e51
Tomn usds/template8 (#118)
* Fix issues from #120
* Include USWDS scss into build.
  Allows us to do theme things. Compile time slower... Not sure if it's worth it since most items can be overridden in css and we can't theme the Navbar (e.g. invert colors).
* Update J40Footer.spec.tsx.snap
* Update gatsby-config.js
2021-06-14 11:06:23 -07:00