Skip to content

OF-1387 Add confirmation before deleting subscribers in pubsub admin UI#3215

Open
MilanTyagi2004 wants to merge 8 commits intoigniterealtime:mainfrom
MilanTyagi2004:OF-1387-fix-subscriber-delete-confirmation
Open

OF-1387 Add confirmation before deleting subscribers in pubsub admin UI#3215
MilanTyagi2004 wants to merge 8 commits intoigniterealtime:mainfrom
MilanTyagi2004:OF-1387-fix-subscriber-delete-confirmation

Conversation

@MilanTyagi2004
Copy link
Contributor

Fixes OF-1387.

This change adds a confirmation prompt before deleting subscribers in pubsub-node-subscribers.jsp to prevent accidental deletions.

The implementation uses a localized message (pubsub.node.subscribers.confirm_delete) and aligns with existing confirmation patterns used in the admin console.

This ensures a consistent and safer user experience across the UI.

@MilanTyagi2004
Copy link
Contributor Author

Hi @guusdk , I’ve implemented the fix for OF-1387. Let me know if any changes are needed.

Copy link
Member

@guusdk guusdk left a comment

Choose a reason for hiding this comment

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

Thanks for this change! Although technically, it seems to work, visually, something weird happens. Can you change this please?

Consider this node (with one affiliation), which is a node in a PEP service.

Image

When you click the red cross button, you get the a confirmation message, as expected. However, the affiliation has already disappeared and the information box also appears to have changed:

Image

This may be a result from this node being a node in a PEP service (which is a special kind of Pubsub service). I am not able to easily test this with a 'regular' Pubsub service, but regardless, the confirmation page should also work properly for PEP services.

My last bit of feedback: I don't quite like how the confirmation dialog shows "under" the data. I see that this is how it was mocked in the JIRA ticket, but it is not very consistent with other pages. They typically show a dedicated page for such a confirmation. Take, for example, this confirmation of deleting a roster item:

Image

I would prefer the new dialog to be more like this, to be more consistent with the rest of the admin console.

Copy link
Member

Choose a reason for hiding this comment

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

This is a trivial change, but please, whenever you change a file, modify the copyright notice to cover the current year. So, in this example, change 2017-2025 to 2017-2026.

@MilanTyagi2004
Copy link
Contributor Author

Hi @guusdk,

I have implemented the new changes, but before pushing the code to Git, I want to verify that everything is working properly. However, I’m unable to find any button or link in Openfire where I can create a new node and then delete it, similar to what we have in the user Roster.

image

Technically, the implementation seems correct. Could you please guide me a bit or let me know how I can properly test whether the implementation is working?

@MilanTyagi2004
Copy link
Contributor Author

Hi @guusdk ,
I’ve implemented the changes and raised this PR.

Summary of updates:

Moved deletion logic from pubsub-node-subscribers.jsp to pubsub-node-subscriber-delete.jsp.
Added a confirmation step before deletion (instead of inline handling).
Introduced i18n entries for confirmation messages, including dynamic affiliation and node details.

The larger diff mainly comes from separating the deletion flow into a dedicated page and adding the confirmation layer.
Manually verified the flow over XMPP.

Let me know if anything should be adjusted.

@guusdk
Copy link
Member

guusdk commented Mar 24, 2026

This looks pretty good! While testing, I noticed one small issue. IF a node has no affiliates, the (empty) table renders incorrectly. I think the colspan is wrong or something. I don't think that's caused by your changes, but would you mind fixing this, as you're already touching these files?

image

@MilanTyagi2004
Copy link
Contributor Author

yes, you are right there is the UI Inconsistency after the affiliation deletion.
and i check with old code , this UI issue has nothing to do with new changes.

i will fix this , just need some time

@MilanTyagi2004
Copy link
Contributor Author

Hey guss the UI issue is solved.

image

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.

2 participants