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

SWED-2276 import & adapt for atlas icons #927

Merged
merged 25 commits into from
Feb 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
f3619f2
SWED-2276 import & adapt for atlas icons
goldenraphti Dec 18, 2023
c38a516
SWED-2276 fix linter import font-icons
goldenraphti Dec 18, 2023
20aab21
SWED-2276 update jest tests
goldenraphti Dec 18, 2023
9ea7c64
SWED-2276 update alert component wherever used
goldenraphti Dec 20, 2023
3ce64f4
SWED-2276 style alert component icons
goldenraphti Dec 20, 2023
6141ce6
SWED-2276 add basic custom icon
goldenraphti Dec 21, 2023
7243459
SWED-2276 move accordion internal icon to custom via CSS
goldenraphti Dec 21, 2023
1b83741
SWED-2276 add support for custom icons & fix mask
goldenraphti Dec 24, 2023
0973c8b
SWED-2276 fix E2E tests icons
goldenraphti Dec 24, 2023
dd266f0
SWED-2276 update package-lock
goldenraphti Jan 3, 2024
356b1bb
SWED-2276 update E2E screenshots
goldenraphti Jan 3, 2024
f08a7aa
SWED-2276 style i tags + icon docs & tests
goldenraphti Jan 4, 2024
6a926f1
SWED-2276 fix & skip flaky E2E tests
goldenraphti Jan 4, 2024
38cd81f
SWED-2276 update icons topbar with custom icons
goldenraphti Jan 4, 2024
9621a38
SWED-2276 update login alert with custom icon
goldenraphti Jan 4, 2024
d0743e7
SWED-2276 tests E2E screenshots
goldenraphti Jan 5, 2024
71e0b6b
SWED-2276 fix E2E visual + swepay-icon media-object
goldenraphti Jan 5, 2024
292fc74
SWED-2276 refactor CSS Alert component clean
goldenraphti Jan 5, 2024
0ac98ae
SWED-2276 defensive CSS iconography base selector
goldenraphti Jan 5, 2024
147f30f
SWED-2276 fix custom chevron icon rotation
goldenraphti Jan 15, 2024
7037f95
SWED-2276 style constrain aspect ratio swepay-icon
goldenraphti Jan 16, 2024
ea7f386
SWED-2276 fix style for swepay-icons using mask
goldenraphti Jan 17, 2024
7eec3ca
SWED-2276 fix comments PR icon implementation Steph
goldenraphti Jan 30, 2024
cf0c2de
Merge branch 'develop' into feature/SWED-2276-icon_library_atlas
goldenraphti Jan 30, 2024
60ae86f
SWED-2276 add more custom icons + improve hamburger menu + release notes
goldenraphti Jan 31, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 13 additions & 16 deletions RELEASE_NOTES.md
Original file line number Diff line number Diff line change
@@ -1,29 +1,26 @@
# Changelog

## \[10.9.1\] - 24.01.2024
## \[11.0.0\] - 05.02.2024

## Component changes

### Non breaking UI changes

- PayEx - non-breaking UI updates
- color variables updates (brand-secondary hover, btn-secondary-hover, disabled, ...)
- input fields colors (for states disabled & success)
- badge colors
- skip-link font
- link
- hover state colors on bright mode
- hover state for inline links
- code tags secondary & tertiary background colors
-

### Bugfix

- Tooltip
- fix position tooltip (it got detached from its parent element a few versions back)
- Icons migration step 1 (NON BREAKING ... for now and until next major release. But we're moving away from Google's material-icons)
- Import Atlas icons (via CDN via CSS) for Atlas icons
- Add custom icons "Swepay-icons": a few svg icons saved locally to complement where missing from Atlas icons set (called Swepay-icons but supported for both Swedbankpay AND PayEx sides)
- Add support in the components styles for the Atlas icons and our new custom made "Swepay-icons"

## Maintenance

- npm packages dependencies upgrades

## Design System website

- Update iconography page

- Add sections about new Atlas and custom icons
- Improve sections about sizes
- Update status of material-icons

- Deadlink fix (thanks Yvonne for the heads-up)
46 changes: 23 additions & 23 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
"@babel/eslint-parser": "^7.23.3",
"@babel/preset-env": "^7.23.3",
"@babel/preset-react": "^7.23.3",
"@playwright/test": "^1.39.0",
"@playwright/test": "^1.40.1",
"@sentry/webpack-plugin": "^1.20.0",
"@testing-library/jest-dom": "^5.16.5",
"@testing-library/react": "^14.1.2",
Expand Down
14 changes: 5 additions & 9 deletions src/App/AppHeader/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,7 @@ const AppHeader = () =>
aria-label="Close menu"
title="Close menu"
>
<i className="material-icons-outlined" aria-hidden="true">
close
</i>
<i className="swepay-icon-close" aria-hidden="true"></i>
</button>
</div>
<div className="topbar-modal-body">
Expand All @@ -54,9 +52,7 @@ const AppHeader = () =>
</div>
<div className="topbar-modal-footer">
<button className="btn btn-secondary btn-sm" type="button">
<i className="material-icons-outlined" aria-hidden="true">
exit_to_app
</i>
<i className="at-exit" aria-hidden="true"></i>
<span>Log out</span>
</button>
</div>
Expand All @@ -70,7 +66,7 @@ const AppHeader = () =>
aria-expanded="false"
aria-controls="topbar-nav"
>
<i className="material-icons topbar-btn-icon">menu</i>
<i className="swepay-icon-menu-hamburger topbar-btn-icon"></i>
</button>
</div>
</header>
Expand All @@ -87,10 +83,10 @@ const AppHeader = () =>
aria-expanded="false"
aria-controls="topbar-nav"
>
<i className="material-icons topbar-btn-icon">menu</i>
<i className="swepay-icon-menu-hamburger topbar-btn-icon"></i>
</button>
<button type="button" className="topbar-close" aria-label="Close menu">
<i className="material-icons topbar-btn-icon">close</i>
<i className="swepay-icon-close topbar-btn-icon"></i>
</button>
<a href="/" className="topbar-logo">
{"\n"}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,28 +9,25 @@ test("Accordion page exist", async ({ page }) => {
})
.click();
await expect(page.getByRole("link", { name: "Accordion" })).toHaveCount(
page.viewportSize().width < 991 ? 1 : 2
page.viewportSize().width < 991 ? 1 : 2,
);
await page.getByText("calendar_view_dayAccordionarrow_forward").click();
await expect(page).toHaveTitle(/Accordion/);
await expect(
page.getByRole("heading", { name: "Accordion", exact: true, level: 1 })
page.getByRole("heading", { name: "Accordion", exact: true, level: 1 }),
).toBeVisible();
});

test("visual regresion accordions", async ({ page }) => {
await page.goto("http://localhost:3000/components/accordion");
await page
.getByRole("button", { name: "keyboard_arrow_down My title" })
.first()
.click();
await page.getByRole("button", { name: "My title" }).first().click();

const brand = (await page.title()).includes("Swedbank")
? "SwedbankPay"
: "PayEx";

await expect(
page.locator(".component-preview-content > div")
page.locator(".component-preview-content > div"),
).toHaveScreenshot(`${brand}-accordions.png`);
});

Expand All @@ -40,41 +37,35 @@ test.describe(`accordions options behave correctly`, () => {
}) => {
await page.goto("http://localhost:3000/components/accordion");

await page
.getByRole("button", { name: "keyboard_arrow_down My title" })
.first()
.click();
await page.getByRole("button", { name: "My title" }).first().click();
await expect(
page
.locator("#exp-1")
.getByText(
"Proident cupidatat irure excepteur id minim dolore mollit amet reprehenderit con"
)
"Proident cupidatat irure excepteur id minim dolore mollit amet reprehenderit con",
),
).toBeVisible();
await expect(
page
.locator("#exp-3")
.getByText(
"Proident cupidatat irure excepteur id minim dolore mollit amet reprehenderit con"
)
"Proident cupidatat irure excepteur id minim dolore mollit amet reprehenderit con",
),
).not.toBeVisible();
await page
.getByRole("button", { name: "keyboard_arrow_down My title" })
.nth(2)
.click();
await page.getByRole("button", { name: "My title" }).nth(2).click();
await expect(
page
.locator("#exp-1")
.getByText(
"Proident cupidatat irure excepteur id minim dolore mollit amet reprehenderit con"
)
"Proident cupidatat irure excepteur id minim dolore mollit amet reprehenderit con",
),
).toBeVisible();
await expect(
page
.locator("#exp-3")
.getByText(
"Proident cupidatat irure excepteur id minim dolore mollit amet reprehenderit con"
)
"Proident cupidatat irure excepteur id minim dolore mollit amet reprehenderit con",
),
).toBeVisible();
});
test(`accordions option "Open one at a time" can be clicked and works`, async ({
Expand All @@ -94,44 +85,41 @@ test.describe(`accordions options behave correctly`, () => {
await page.getByRole("button", { name: "Close options menu" }).click();
}

await page
.getByRole("button", { name: "keyboard_arrow_down My title" })
.first()
.click();
await page.getByRole("button", { name: "My title" }).first().click();
await expect(
page
.locator("#exp-1")
.getByText(
"Proident cupidatat irure excepteur id minim dolore mollit amet reprehenderit con"
)
"Proident cupidatat irure excepteur id minim dolore mollit amet reprehenderit con",
),
).toBeVisible();
await expect(
page
.locator("#exp-3")
.getByText(
"Proident cupidatat irure excepteur id minim dolore mollit amet reprehenderit con"
)
"Proident cupidatat irure excepteur id minim dolore mollit amet reprehenderit con",
),
).not.toBeVisible();

// FIXME: this part fails on Mobile Chrome, not sure why. Therefore skipping for now, but should be fixed
if (page.viewportSize().width >= 991 || browserName !== "chromium") {
await page
.getByRole("button", { name: "keyboard_arrow_down My title" })
.nth(2)
.click();
// FIXME: this part fails on Mobile Chrome and mobile Safari, not sure why. Therefore skipping for now, but should be fixed
if (
page.viewportSize().width >= 991 ||
(browserName !== "chromium" && browserName !== "webkit")
) {
await page.getByRole("button", { name: "My title" }).nth(2).click();
await expect(
page
.locator("#exp-1")
.getByText(
"Proident cupidatat irure excepteur id minim dolore mollit amet reprehenderit con"
)
"Proident cupidatat irure excepteur id minim dolore mollit amet reprehenderit con",
),
).not.toBeVisible();
await expect(
page
.locator("#exp-3")
.getByText(
"Proident cupidatat irure excepteur id minim dolore mollit amet reprehenderit con"
)
"Proident cupidatat irure excepteur id minim dolore mollit amet reprehenderit con",
),
).toBeVisible();
}
});
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Loading