Skip to content
This repository has been archived by the owner on Dec 11, 2019. It is now read-only.

Replace Payment History CSV export with Contribution Statement PDF (rebased) #5909

Merged
merged 4 commits into from
Nov 29, 2016
Merged

Replace Payment History CSV export with Contribution Statement PDF (rebased) #5909

merged 4 commits into from
Nov 29, 2016

Conversation

willy-b
Copy link
Contributor

@willy-b willy-b commented Nov 29, 2016

This is a rebase of work reviewed in PR #4771 and replaces it. Implements #4769.

Test Plan:

  1. Open Brave
  2. Open Preferences -> Payments, and ensure it is enabled
  3. If you don't have a Payment History, you can generate a fake one at terminal with npm run add-simulated-payment-history
  4. Click "Show Payment History"
  5. Observe "Receipt Link" column now has links ending in ".pdf"
  6. Click a receipt link, and confirm that a Save dialog opens and suggested filename is same as the one displayed in Receipt Link column
  7. Click "Save", and observe that the PDF is downloaded and appears in the Downloads bar at bottom of screen
  8. Double click the downloaded file
  9. Check PDF against mockup

Screencap:
contrib_statement_pdf_final gif final

replaces CSV export in Payment History with PDF export

Fixes #4769
Willy Bruns and others added 3 commits November 29, 2016 10:14
- add page break every 20 publishers
- different info box messages per page (as in spec)
- add page legend (N of M)
- "Contribution Time" now uses 12 hour format, consistent with display of AM/PM
- added gap between two columns of Summary table on first page
- added a spacing row to bottom of the contribution detail table on each page
- remove log lines

fixes #4769
… of about:preferences

- contribution statement uses localized strings (only added for en-US for now)
- JS moved to new file: js/about/contributionStatement.js
- CSS moved to  new file: less/contributionStatement.less

- added statement date range above the publisher detail table
  e.g. "October 15th at 6:00pm - November 15th at 4:00 pm"

nits
- got rid of react warnings
  (triggered by forceUpdate being called before a setState)
- fix  character in front of copyright in Contribution Statement
- fix contribution statement wrong filename issue
- increased font sizes across board to better use page space
- added "=" between verified icon and text definition
- fixed "Site" capitalization in publisher table header row
- explicitly define page part ordering in CSS
  using "-webkit-box" and "-webkit-box-ordinal-group"
- increase spacing of lines in publisher detail table

for aiding development
- a single contribution statement can be loaded by navigating to "about:contributions[#VIEWING_ID]"
- all statements are also listed at "about:contributions"
- Note: "about:contributions" is hidden from "about:about" list

fixes #4769
- moved ledgerExportUtil / ledgerExportUtilTest to new location
- moved exampleLedgerData to fixtures directory
- updated style of ledgerExportUtil to be more consistent with rest of codebase
- added tests for new sort functionality
- tweak to fix JavaScript error I got when testing
@bsclifton
Copy link
Member

bsclifton commented Nov 29, 2016

I rebased to squash the commits I had made and added the autoclosing keywords (ex: "fixes")

Giving this one last spin locally before accepting... also will look at the automated tests 😄

@bsclifton bsclifton added this to the 0.13.0 milestone Nov 29, 2016
@bsclifton bsclifton self-assigned this Nov 29, 2016
@bsclifton
Copy link
Member

tests failed for some reason (they didn't even start to run); but locally, they ran great 😄 Merging!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants