ondrej
4 Febbraio 2026, 7:47pm
1
Nella pagina di amministrazione degli utenti, se si scorre fino a “Gruppi” e si tenta di aggiungere l’utente a un gruppo personalizzato, il pulsante apparirà come si può vedere nell’immagine seguente.
Tuttavia, quando lo si preme, non scompare, dando l’impressione che l’azione non sia stata completata. Ma se si aggiorna la pagina, l’utente è stato effettivamente aggiunto al gruppo, ma l’interfaccia utente non lo riflette.
2 Mi Piace
Un’altra pagina che sarebbe più adatta a una corretta rifattorizzazione in Glimmer
Nel frattempo, ecco la correzione
main ← fix/admin-user-custom-groups-save
opened 11:13PM - 07 Feb 26 UTC
The approve/reject buttons for custom group changes on the admin user page would… remain visible after saving, even though the changes were persisted successfully. Removing a group also failed to update the UI.
Three issues in the reactivity chain caused this:
1. The `@filter` computed macros (classic Ember) on the AdminUser model did not react to `@trackedArray` mutations. Replaced `customGroups` and `automaticGroups` with native getters so they participate in Glimmer autotracking.
2. The controller's `groupAdded()` and `groupRemoved()` wrappers did not return their promise chains, so `await` in `saveCustomGroups()` resolved immediately before the API calls completed and before the groups array was updated.
3. The controller's `customGroupIds`, `customGroupsDirty`, and `automaticGroups` used `@discourseComputed` which could not track changes from native getters on the model. Converted these to native getters and made `customGroupIdsBuffer` `@tracked`.
Additionally, `saveCustomGroups()` now awaits each operation sequentially and calls `resetCustomGroups()` on completion to sync the buffer with the updated group list, clearing the dirty state.
Note: only the properties involved in the groups reactivity chain were converted to modern Glimmer patterns. The rest of the controller and model still use classic Ember (`@discourseComputed`, `this.set`, etc.) and can be modernized separately.
Ref - https://meta.discourse.org/t/395210
1 Mi Piace
zogstrip
Chiuso
14 Febbraio 2026, 7:00am
5
Questo argomento è stato chiuso automaticamente dopo 2 giorni. Non sono più consentite nuove risposte.