mirror of
https://github.com/penpot/penpot.git
synced 2026-11-26 21:00:32 +00:00
♻️ Use a DS secondary button in the request access dialog (#13284)
* ♻️ Use a DS secondary button in the request access dialog The "Go to Personal Projects" button of the request access dialog (no permission to a file or team, SSO error) was a raw button styled by hand. It is now a DS secondary button next to the primary one. The space between them moves from the button margin to a gap on the actions row. A zero-tolerance visual test covers both buttons at rest and on hover. AI-assisted-by: claude-opus-5-5 * ♻️ Drop the unused cancel button styles of the request dialog The request access dialog uses a DS button now, so its hand-made button styles go away. Removed (no use left in frontend/src): .cancel-button inside .overlay .dialog .sign-info and .overlay .dialog-login .sign-info. AI-assisted-by: claude-opus-5-5
This commit is contained in:
parent
6aedbc330e
commit
f65009a254
@ -1065,6 +1065,42 @@ test.describe("Download report", () => {
|
||||
});
|
||||
});
|
||||
|
||||
test.describe("Request access dialog controls", () => {
|
||||
test("Go to Personal Projects and Ask buttons", async ({ page }) => {
|
||||
const shot = { maxDiffPixelRatio: 0, threshold: 0 };
|
||||
await DashboardPage.mockConfigFlags(page, ["disable-onboarding"]);
|
||||
const dashboardPage = new DashboardPage(page);
|
||||
await dashboardPage.setupDashboardFull();
|
||||
await page.route("**/api/main/methods/get-projects?*", (route) =>
|
||||
route.fulfill({
|
||||
status: 404,
|
||||
contentType: "application/transit+json",
|
||||
body: '["^ ","~:type","~:not-found","~:code","~:object-not-found"]',
|
||||
}),
|
||||
);
|
||||
await page.route("**/api/main/methods/get-team-info?*", (route) =>
|
||||
route.fulfill({
|
||||
status: 200,
|
||||
contentType: "application/transit+json",
|
||||
body: `["^ ","~:id","~u${DashboardPage.anyTeamId}","~:is-default",false]`,
|
||||
}),
|
||||
);
|
||||
await page.goto(
|
||||
`/?screen=dashboard-recent&team-id=${DashboardPage.anyTeamId}`,
|
||||
);
|
||||
|
||||
const actions = page.locator("[class*='static__sign-info']");
|
||||
const goToDashboard = actions.getByText("Go to Personal Projects", {
|
||||
exact: true,
|
||||
});
|
||||
await expect(goToDashboard).toBeVisible();
|
||||
await page.mouse.move(10, 10);
|
||||
await expect(actions).toHaveScreenshot(shot);
|
||||
await goToDashboard.hover();
|
||||
await expect(actions).toHaveScreenshot(shot);
|
||||
});
|
||||
});
|
||||
|
||||
test.describe("Team settings organization", () => {
|
||||
test("Shows the Add to an organization link", async ({ page }) => {
|
||||
const shot = { maxDiffPixelRatio: 0, threshold: 0 };
|
||||
|
||||
@ -240,8 +240,9 @@
|
||||
[:div {:key index} content])
|
||||
[:div {:class (stl/css :sign-info)}
|
||||
(when cancel-text
|
||||
[:button {:class (stl/css :cancel-button)
|
||||
:on-click on-close}
|
||||
[:> button* {:variant "secondary"
|
||||
:type "button"
|
||||
:on-click on-close}
|
||||
cancel-text])
|
||||
[:> button* {:variant "primary" :on-click on-click} button-text]]]]))
|
||||
|
||||
|
||||
@ -324,28 +324,10 @@
|
||||
.overlay .dialog-login .sign-info {
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
gap: var(--sp-l);
|
||||
margin-block-start: var(--sp-xxxl);
|
||||
}
|
||||
|
||||
.overlay .dialog .sign-info,
|
||||
.overlay .dialog-login .sign-info {
|
||||
.cancel-button {
|
||||
background: none;
|
||||
cursor: pointer;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
border-radius: $br-8;
|
||||
background-color: var(--color-background-tertiary);
|
||||
border: $b-1 solid var(--color-background-tertiary);
|
||||
color: var(--color-foreground-secondary);
|
||||
padding: var(--sp-s) var(--sp-l);
|
||||
font-size: 0.688rem;
|
||||
text-transform: uppercase;
|
||||
margin-inline-end: var(--sp-l);
|
||||
}
|
||||
}
|
||||
|
||||
.overlay .dialog {
|
||||
gap: var(--sp-m);
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user