deptofdefense / move.mil

The entry point website to the Defense Personal Property System (DPS).
https://www.move.mil
Other
15 stars 15 forks source link

Print-Friendly PPM Estimator results #368

Closed jamesatheyDDS closed 6 years ago

jamesatheyDDS commented 6 years ago

Implements #356.

Checklist

I have…

Summary of Changes

This pull request adds a print-specific stylesheet for the PPM Estimator page. This stylesheet restricts the output during printing to only the results of the PPM calculation. The results have also been expanded to show all of the inputs the user fed to the calculation, including the origin and destination (with map), the branch of service, the rank, dependents, the date, and the weights.

Testing

To verify the changes proposed in this pull request…

  1. clone this repo,
  2. git checkout ppm-estimator-print-friendly,
  3. set up development dependencies according to CONTRIBUTING.md,
  4. run bin/rails server, and
  5. load up http://localhost:3000 in the Web browser of your choice.

Screenshots

Chrome ![fireshot capture 72 - personally procured move ppm_ - http___localhost_3000_resources_ppm-estimator](https://user-images.githubusercontent.com/26554826/37792679-cc056d08-2de2-11e8-9d65-2ce0501f8902.png)
Internet Explorer 11 ![virtualbox_msedge - win10_22_03_2018_15_42_02](https://user-images.githubusercontent.com/26554826/37794374-af4d2728-2de7-11e8-8cd7-067fa7592105.png)
Mobile Safari ![safari - mar 22 2018 at 4 24 pm](https://user-images.githubusercontent.com/26554826/37796486-d0195e8a-2ded-11e8-928f-e3bb37b74f8a.png)
Printed output - Chrome [Personally Procured Move (PPM) Estimator — Move.mil (Chrome).pdf](https://github.com/deptofdefense/move.mil/files/1838901/Personally.Procured.Move.PPM.Estimator.Move.mil.Chrome.pdf)
Printed output - Firefox (Background colors / Background images NOT enabled) [Personally Procured Move (PPM) Estimator — Move.mil (Firefox).pdf](https://github.com/deptofdefense/move.mil/files/1838921/Personally.Procured.Move.PPM.Estimator.Move.mil.Firefox.pdf)
Printed output - Safari [Personally Procured Move (PPM) Estimator — Move.mil (Safari).pdf](https://github.com/deptofdefense/move.mil/files/1838925/Personally.Procured.Move.PPM.Estimator.Move.mil.Safari.pdf)
Printed output - Internet Explorer 11 (Background colors / Background Images setting in Page Settings NOT enabled) [Personally Procured Move (PPM) Estimator - Move.mil (IE11).pdf](https://github.com/deptofdefense/move.mil/files/1839009/Personally.Procured.Move.PPM.Estimator.-.Move.mil.IE11.pdf)
Printed output - Edge (no way to control background images / colors) [Personally Procured Move (PPM) Estimator - Move.mil (Edge).pdf](https://github.com/deptofdefense/move.mil/files/1839008/Personally.Procured.Move.PPM.Estimator.-.Move.mil.Edge.pdf)
jamesatheyDDS commented 6 years ago

@jgarber623-gov If the ZIP code work is separated into another PR, then it wouldn't be used anywhere at first. This PR is the first and only user of that zip code work. The existing PPM estimator results don't recap the inputs. If I were looking at a PR that just added a bunch of data and dependencies and didn't use it anywhere, I wouldn't want to approve it, because there wouldn't be a guarantee that a later PR that does use the work would be approved.

jgarber623-gov commented 6 years ago

If the ZIP code work is separated into another PR, then it wouldn't be used anywhere at first. This PR is the first and only user of that zip code work.

@jamesatheyDDS We could potentially use this work on the locator map where we're currently displaying "Displaying results near , ." We'd previously talked about how the current display isn't terribly helpful.

Conversely, we could launch a version of the print stylesheet without the ZIP feature and follow it on with the addition of the new seed data, migrations, models, etc.

jamesatheyDDS commented 6 years ago

FYI, If you happen to look at the output from Safari, it spills one line onto a second page. Pretty obnoxious - desktop Safari is using a different DPI for print than all of the other browsers, so everything is larger (including fonts). I'm not eager to invest lots of effort to address this given desktop Safari's pitifully low market share.