Aman-Mittal opened a new issue, #565:
URL: https://github.com/apache/fineract-backoffice-ui/issues/565
## Problem
`eslint-suppressions.json` counts violations **per rule id**. ADR 0005
(#540) put the Ionic component boundary on `no-restricted-imports`, which
already carried ADR 0003's Material and `@ngx-translate` backlogs, and seeded
~280 existing Ionic imports into that same counter.
The three boundaries are therefore fungible. A file allowed two
`no-restricted-imports` violations can drop its Ionic import, add a second
`@ngx-translate` import, and the ratchet does not move — the i18n boundary is
enforced in name while its backlog grows unseen.
### Reproduction
Against `main`, in
`src/app/features/accounting/accounting-closure-form.component.ts` (suppressed
count `2`): add a second `@ngx-translate/core` import and delete the Ionic
import block. `npm run lint` reports **no** `no-restricted-imports` error.
Before #540, when that file's count was `1`, the same edit failed.
Totals moved from 306 → 588 across 305 → 366 files, so this applies to 282
seeded violations.
## A second effect: the seeding under-counts
Eight files import Ionic components *and* `ModalController` in one
statement, for example:
```ts
import { IonButton, IonIcon, ModalController } from
'@ionic/angular/standalone';
```
Under the shared counter these were charged once, because the pre-#540
controller violation already occupied the slot. Their component imports were
never recorded, so the ADR 0005 baseline is eight violations short of the real
backlog.
## Proposal
Move the component boundary to a local ESLint rule with its own rule id, so
each boundary ratchets on its own counter. `no-restricted-imports` returns to
exactly what ADR 0003 gave it — Material, direct ngx-translate, and Ionic's
imperative controllers — at its former per-file counts.
An import naming nothing but controllers should stay on the ADR 0003
boundary alone, so that migrating it to OVERLAY decrements one counter rather
than two. A mixed import counts on both, because it genuinely is two violations.
`scripts/ui-boundary.test.mjs` should assert *which* rule reports, not
merely that something did, so that a change merging the counters back together
fails rather than passing quietly.
## Related defects found in the same code
Three smaller items, fixed alongside because they sit in the files this
touches:
1. **`TabsComponent` drops the tab stop on a disabled selection.**
`focusIndex` skips a selected-but-disabled tab and falls through to the first
enabled one, so `aria-selected="true"` and `tabindex="0"` name different
buttons — entering the strip with Tab lands on a tab whose panel is not the one
displayed.
2. **`TabsComponent` escapes tab values but not `idPrefix`.** The one caller
builds that prefix from the apptable name. A space or quote produces a
malformed `id`, leaving `aria-controls` and `aria-labelledby` present but
pointing at nothing, with no error.
3. **`EntityDatatablesComponent` can display one table's rows under
another's headers.** Nothing cancels the in-flight request, so switching
custom-field tabs A → B → A leaves two running, and whichever resolves last
writes `tableData` regardless of which tab is selected. The columns come from
`activeTable()` and switch synchronously; the rows do not. When the superseded
request is slower its rows are displayed and stay there. This predates #540 —
the Ionic segment had the same structure. Happy to split this one out into its
own issue if it is worth tracking separately.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]