Skip to content

Upgrade to Angular 22#286

Open
bampakoa wants to merge 2 commits into
masterfrom
v22
Open

Upgrade to Angular 22#286
bampakoa wants to merge 2 commits into
masterfrom
v22

Conversation

@bampakoa

Copy link
Copy Markdown
Owner

@stevermeister this is a draft PR that prepares the library for Angular 22. Could you please check why the bold and italic buttons do not have any icon?

Thanks!

@sonarqubecloud

Copy link
Copy Markdown

@stevermeister

Copy link
Copy Markdown
Collaborator

@bampakoa thanks for the v22 work! 🎉

I dug into the bold/italic icon question. Good news: it's not caused by the v22 upgrade and it's not a library bug — it's a long-standing config issue in the demo app itself (src/app/app.module.ts), which this PR doesn't touch (the file is identical to master).

Root cause: the demo passes a custom buttonsConfig to NgxWigModule.forRoot(...) that overrides the default bold/italic buttons with the wrong icon class names:

bold:   { ..., styleClass: 'bold',   icon: 'icon-bold' },
italic: { ..., styleClass: 'italic', icon: 'icon-italic' },

The library's CSS only defines the nwe--prefixed classes (.nwe-icon-bold, .nwe-icon-italic). There's no .icon-bold / .icon-italic rule, so the background SVG never loads → blank button. The other buttons (UL, OL, link, underline) come straight from the library defaults, which already use the correct nwe-icon-* classes — that's why they render fine.

The class names were renamed icon-*nwe-icon-* back in 1cc0c67, but this demo override was never updated, so it's been broken on master too — the v22 upgrade just made it more noticeable.

Fix (in src/app/app.module.ts):

-    icon: 'icon-bold'
+    icon: 'nwe-icon-bold'
...
-    icon: 'icon-italic'
+    icon: 'nwe-icon-italic'

I verified locally on this branch by building the lib + running the demo: with that two-line change both the B and I icons render correctly alongside the rest. The styleClass: 'bold'/'italic' values are harmless (no CSS depends on them), so only the icon values need fixing.

@stevermeister

Copy link
Copy Markdown
Collaborator

Opened #287 against master with the two-line fix for this. Since it's independent of the v22 work, it can merge separately and you'll pick it up on rebase. 👍

@stevermeister

Copy link
Copy Markdown
Collaborator

@behdi behdi left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Hey lads, when can we expect this?

If there's any help I can give, please let me know!

Comment thread package.json Outdated
@bampakoa

bampakoa commented Jun 9, 2026

Copy link
Copy Markdown
Owner Author

Hello @behdi! We plan to release it this week. Stay tuned 🙂

@bampakoa bampakoa changed the title feat: upgrade Angular to v22.0.0 Upgrade to Angular 22 Jun 12, 2026
@bampakoa bampakoa marked this pull request as ready for review June 12, 2026 20:16
@bampakoa

Copy link
Copy Markdown
Owner Author

@stevermeister can you have a quick look so that I can merge it to the main branch?

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.

3 participants