WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

Conversation

@MayaRainer
Copy link
Member

@MayaRainer MayaRainer commented Nov 5, 2025

Closes #1502.

Removes the interstitial modal when clicking on an invoice row, instead taking the user to the invoice page directly.

Before

Screencast_20251105_173455.webm

After

Screencast_20251105_182918.webm

@MayaRainer MayaRainer marked this pull request as ready for review November 5, 2025 19:55
Copy link
Member Author

@MayaRainer MayaRainer left a comment

Choose a reason for hiding this comment

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

@slavingia / @laugardie lmkwyt! test failures are on main as well

await invoiceRow.click();

await expect(page.getByRole("dialog")).toBeVisible();
await page.getByRole("row").filter({ hasText: "Awaiting approval" }).click();
Copy link
Member Author

Choose a reason for hiding this comment

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

Just simplified this a little bit.

await page.getByRole("row").getByText("Awaiting approval").first().click();
await page.getByRole("row").filter({ hasText: "Awaiting approval" }).click();

await expect(page.getByRole("heading", { name: "INV-123456" })).toBeVisible();
Copy link
Member Author

Choose a reason for hiding this comment

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

Asserting that the new page is visible rather than a modal.

}
};

const [rowSelection, setRowSelection] = useState<Record<string, boolean>>(() => {
Copy link
Member Author

Choose a reason for hiding this comment

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

To preserve the row selection when coming back from the detail page.

await login(page, preOnboardingUser, `/invoices/${invoice.externalId}`);
await expect(page.getByText("Missing tax information.")).toBeVisible();
await page.getByRole("link", { name: "Invoices" }).click();
await page.getByRole("link", { name: "Invoices", exact: true }).click();
Copy link
Member Author

Choose a reason for hiding this comment

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

To disambiguate from the "Back to invoices" link

@laugardie
Copy link
Contributor

We could probably remove “View invoice” from the contextual menu since the row is now clickable to open it.Screenshot 2025-11-06 at 11 49 48

Also, when testing on mobile, I am not able to navigate to the invoice page.

Screen.Recording.2025-11-06.at.11.52.07.mov

Copy link
Member Author

@MayaRainer MayaRainer left a comment

Choose a reason for hiding this comment

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

@laugardie _a Thanks! Could you have another look please?

@laugardie
Copy link
Contributor

@MayaRainer _a looks good to me!

@neetogit-bot neetogit-bot bot assigned MayaRainer and unassigned laugardie Nov 7, 2025
@MayaRainer
Copy link
Member Author

@laugardie Thanks!
@slavingia _a lmk if this is good to merge!

@neetogit-bot neetogit-bot bot assigned slavingia and unassigned MayaRainer Nov 7, 2025
Copy link
Member Author

@MayaRainer MayaRainer left a comment

Choose a reason for hiding this comment

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

Added the new invoice totals UI - @ershad @laugardie lmkwyt!

Before

image image image

After

image image image

await page.getByPlaceholder("Description").first().fill("first item updated");
await fillByLabel(page, "Hours / Qty", "04:30", { index: 0 });
await expect(page.getByText("$870", { exact: true })).toBeVisible();
await Promise.all([
Copy link
Member Author

Choose a reason for hiding this comment

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

These checks were unnecessary and making the test flaky.

</div>
) : null}
{company.equityEnabled ? (
<Totals
Copy link
Member Author

Choose a reason for hiding this comment

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

Made a component to share between the edit and show page as they're so similar now.

@laugardie
Copy link
Contributor

@MayaRainer just pushed some small UI changes. Rest looks good to me!

I have one small concern regarding the UX when editing the equity (not strictly an issue with this PR, but related). If a contractor adds line items to a new invoice and then realizes they need to update the payment split, clicking that link navigates them away and they lose all the data they just entered. Even if open on a new tab, we need to reload to get the updated equity split.
I'm thinking maybe we could just save the form progress temporarily? Keep the info while the invoice hasn't been sent, and then clear it out once they successfully hit send? @ershad

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Remove invoice interstitial

4 participants