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

Don't auto-close Brave Payments statements #7699

Merged
merged 1 commit into from
Mar 15, 2017
Merged

Don't auto-close Brave Payments statements #7699

merged 1 commit into from
Mar 15, 2017

Conversation

bsclifton
Copy link
Member

Test Plan:

  1. Launch Brave, have payments enabled, and have a contribution history (if you don't have one, you can run npm run add-simulated-payment-history to add one)
  2. Go to Preferences > Payments
  3. Click the History icon (circle next to the gear) to bring up the contribution list
  4. Click any of the contributions to open them
  5. Notice it opens the contribution as an about:contributions page and stays open
  6. Once the new Muon build is available, it will still prompt the user to save

Description

It feels like bad UX to have the contribution statement open and then close really quick, especially when the statement itself looks great and has useful information.

This change only prevents the window from auto-closing; it will still prompt to save (we'll need a new Muon before that can be tested. See #7416 for more information)

Fixes #7698

Auditors: @willy-b, @bradleyrichter, @mrose17

  • Submitted a ticket for my issue if one did not already exist.
  • Used Github auto-closing keywords in the commit message.
  • Added/updated tests for this change (for new code or code which already has tests).
  • Ran git rebase -i to squash commits (if needed).

It feels like bad UX to have it open and then close really quick, especially when the statement itself looks great and has useful information.
This change only prevents the window from auto-closing; it will still prompt to save (we'll need a new Muon before that can be tested. See #7416 for more information)

Fixes #7698

Auditors: @willy-b, @bradleyrichter, @mrose17

Test Plan:
1. Launch Brave, have payments enabled, and have a contribution history (if you don't have one, you can run `npm run add-simulated-payment-history` to add one)
2. Go to Preferences > Payments
3. Click the History icon (circle next to the gear) to bring up the contribution list
4. Click any of the contributions to open them
5. Notice it opens the contribution as an about:contributions page and stays open
6. Once the new Muon build is available, it will still prompt the user to save
@bsclifton bsclifton added this to the 0.13.6 milestone Mar 14, 2017
@bsclifton bsclifton self-assigned this Mar 14, 2017
@bsclifton
Copy link
Member Author

Before this gets merged, let's make sure this is the behavior we'd like. I created this issue after discussion on Slack

As a user, it's frustrating when the PDF saving functionality breaks and I can't view my statement. While I'd like to view a PDF, I'm perfectly happy viewing the HTML

Copy link
Member

@mrose17 mrose17 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i think that seeing the window close is jarring, so i am in favor of this...

Copy link
Contributor

@willy-b willy-b left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Simply removing window.close() will keep the tab open so you can view the statement as HTML without having to open the generated/saved PDF.

I'm for it until #2714 is fixed and we can open the statement as a PDF in PDF.js (after #2714, can make a change like 2c4afcf because PDF.js will be able to access the locally generated PDF).

Thanks @bsclifton.

@bsclifton
Copy link
Member Author

Thanks for the review folks 😄 @willy-b, is there an issue created to track opening the contribution sheet as a PDF? If not, can you create one? (or let me know, I can create for you)

Just talked with @bradleyrichter and he gave approval, will merge this one for now 😄

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.

Fixed contribution statement display
4 participants