@smartbit4all/ng-client 7.3.48 → 7.3.50

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/MIGRATION-7.0.md CHANGED
@@ -2236,6 +2236,60 @@ Additive, and needs the matching platform. Nothing changes for a layout that nam
2236
2236
  of `resolveHtml`, `DataSheetPageApi.CONTEXT_DATA_SHEET`. See HTML-WIDGET.md, *Template-kulcs egy
2237
2237
  tárolt layoutban*.
2238
2238
 
2239
+ ### Icon font: Material Symbols (7.3.30, loaded by the library from 7.3.50)
2240
+
2241
+ From 7.3.30 the library renders its font icons — `smart-icon`, the grid, form, tree, dialog and
2242
+ filter buttons, the menus, and from 7.3.50 the navbar — with
2243
+ `fontSet="material-symbols-outlined"`. Without that font loaded, every such icon shows its
2244
+ ligature as raw text (`refresh`, `search`, `more_vert`).
2245
+
2246
+ **On 7.3.30 – 7.3.49 the link below is mandatory.** From 7.3.50 `provideSmartNgClient()` links
2247
+ the stylesheet itself at start-up when the document does not load the font, so a host without
2248
+ the link still renders its icons. The link stays the recommended way: the browser fetches the
2249
+ font in parallel with the application, and a production build inlines the stylesheet.
2250
+
2251
+ ```html
2252
+ <link
2253
+ rel="stylesheet"
2254
+ href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@24,400,0,0"
2255
+ />
2256
+ ```
2257
+
2258
+ - **The library looks before it links.** A `<link>` to Material Symbols or a font face named
2259
+ `Material Symbols Outlined` declared by an already loaded stylesheet counts as loaded, and
2260
+ the library adds nothing. What it adds is the URL above with `&display=block`
2261
+ (`SMART_ICON_FONT_URL`), so the ligature text stays hidden while the font arrives.
2262
+ - **`iconFont` in `SmartNgClientConfig`** sets the stylesheet the library links (a self-hosted
2263
+ one, a mirror), and `iconFont: false` turns the linking off.
2264
+ - **A self-hosted icon font** (the `material-icons` npm package imported in `styles.css`, as
2265
+ in p009) has its pair in the `material-symbols` package: `@import
2266
+ 'material-symbols/outlined.css';`. Set `iconFont: false` next to it: a stylesheet that loads
2267
+ after the application started is not seen, and the library would reach for Google.
2268
+ - **A Content Security Policy** has to allow the stylesheet and the font
2269
+ (`style-src https://fonts.googleapis.com`, `font-src https://fonts.gstatic.com`) whichever
2270
+ side links them.
2271
+ - **Ask for the default axis values only.** The library sets no `font-variation-settings`, so
2272
+ `@24,400,0,0` (≈320 KB) renders exactly what the full variable range
2273
+ (`@20..48,100..700,0..1,-50..200`, ≈4 MB) would.
2274
+ - **Material Icons is the host's own business from 7.3.50.** No library icon uses the default
2275
+ font set any more; keep its link as long as a host template has a plain `<mat-icon>`.
2276
+ - **`materialSymbolsByDefault: true`** draws those plain `<mat-icon>`s with Material Symbols
2277
+ too, so the whole screen is one icon style and the Material Icons link can go. The host's own
2278
+ icons turn from filled to outlined; check their names against the list below first.
2279
+ - **Filled instead of outlined** is a property of the font, not of the library. For every icon
2280
+ at once, ask for the filled instance in the link and in `iconFont`
2281
+ (`…:opsz,wght,FILL,GRAD@24,400,1,0`, ≈400 KB). For some icons only (an active menu item), ask
2282
+ for the range (`@24,400,0..1,0`, ≈460 KB) and set `font-variation-settings: 'FILL' 1` where
2283
+ wanted.
2284
+ - **Check the icon names stored as data.** 87 of the 2235 Material Icons names do not exist in
2285
+ Material Symbols and render as raw text: brand logos, and old aliases such as
2286
+ `info_outline`, `favorite_outline`, `bookmark_outline`, `play_circle_outline`,
2287
+ `play_circle_filled`, `highlight_remove`, `radio_button_on`, `local_print_shop`. A source
2288
+ search finds the ones in code; the ones in MDM entries need a look at the data.
2289
+
2290
+ The codemod's `icon-font` rule adds the link next to a Google Material Icons link and reports a
2291
+ host that loads its icon font some other way.
2292
+
2239
2293
  ### Bugfixes shipped with 7.0
2240
2294
 
2241
2295
  - (7.3.2) A view dialog no longer disappears on the browser's back button. MatDialog's default