Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: [M3-7577] - Add invoice byline for powered down instances #10208

Merged
merged 3 commits into from
Feb 29, 2024

Conversation

jaalah-akamai
Copy link
Contributor

@jaalah-akamai jaalah-akamai commented Feb 20, 2024

Description πŸ“

In an effort to clarify to customers that they are being charged for powered-down (shutdown) instances, we want to add the following byline to customer invoices:

This invoice may include Linode Compute Instances that have been powered off as the data is maintained and resources are still reserved. If you no longer need powered-down Linodes, you can <a href="https://www.linode.com/docs/products/platform/billing/guides/stop-billing/">remove the service</a> from your account.

Note

Adding a link in the PDF added a lot of complexity, so I reached out to Customer Success and they seemed fine with spelling out the link. Open to suggestions to make that better.

Changes πŸ”„

  • Updated generated PDF with logic to smartly break to new page if content doesn't fit
  • Added copy to Cloud Manager invoice page

Target release date πŸ—“οΈ

3/4/2024

Preview πŸ“·

Desc Screenshot
Cloud Manager Screenshot 2024-02-20 at 9 46 33 AM
PDF Screenshot 2024-02-20 at 12 15 24 PM

How to test πŸ§ͺ

Verification steps

(How to verify changes)

  • Go to /account/billing and look at any invoice
  • Download the PDF and ensure text is there too.
  • You can turn on MSW and update the buildList for *invoices/:invoiceId/items to check various heights
rest.get('*invoices/:invoiceId/items', (req, res, ctx) => {
    const items = invoiceItemFactory.buildList(10);
    return res(ctx.json(makeResourcePage(items, { page: 1, pages: 1 })));
  }),

As an Author I have considered πŸ€”

Check all that apply

  • πŸ‘€ Doing a self review
  • ❔ Our contribution guidelines
  • 🀏 Splitting feature into small PRs
  • βž• Adding a changeset
  • πŸ§ͺ Providing/Improving test coverage
  • πŸ” Removing all sensitive information from the code and PR description
  • 🚩 Using a feature flag to protect the release
  • πŸ‘£ Providing comprehensive reproduction steps
  • πŸ“‘ Providing or updating our documentation
  • πŸ•› Scheduling a pair reviewing session
  • πŸ“± Providing mobile support
  • β™Ώ Providing accessibility support

@jaalah-akamai jaalah-akamai self-assigned this Feb 20, 2024
@jaalah-akamai jaalah-akamai requested a review from a team as a code owner February 20, 2024 17:33
@jaalah-akamai jaalah-akamai requested review from jdamore-linode and carrillo-erik and removed request for a team February 20, 2024 17:33
Copy link

github-actions bot commented Feb 20, 2024

Coverage Report: βœ…
Base Coverage: 81.24%
Current Coverage: 81.24%

Copy link
Contributor

@jdamore-linode jdamore-linode left a comment

Choose a reason for hiding this comment

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

This is awesome! Confirmed that the blurb appears at the bottom of the last page of the invoice -- wasn't able to find an invoice with the right amount of data to properly test the new page logic, but the code looks good to me

@jaalah-akamai jaalah-akamai added Add'tl Approval Needed Waiting on another approval! Wait to Merge labels Feb 20, 2024
@jaalah-akamai
Copy link
Contributor Author

This is good for final approvals/review, I added wait to merge for some additional internal review as well.

Copy link
Contributor

@bnussman-akamai bnussman-akamai left a comment

Choose a reason for hiding this comment

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

Screenshot 2024-02-21 at 9 17 54 AM

@bnussman-akamai bnussman-akamai added Approved Multiple approvals and ready to merge! and removed Add'tl Approval Needed Waiting on another approval! labels Feb 21, 2024
}

const footerText =
'This invoice may include Linode Compute Instances that have been powered off as the data is maintained and resources are still reserved. If you no longer need powered-down Linodes, you can remove the service (https://www.linode.com/docs/products/platform/billing/guides/stop-billing/) from your account.';
Copy link
Contributor

Choose a reason for hiding this comment

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

Regarding your note about adding a link in the PDF, have we considered switching PDF libraries? The last version of jspdf was published 2 years ago, whereas, something like react-pdf/renderer was published 15 days ago and the package size is smaller by about 1/7.

@jaalah-akamai jaalah-akamai merged commit 879e308 into linode:develop Feb 29, 2024
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Approved Multiple approvals and ready to merge! Ready for Review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants