Re: [I] fix(ux): no unsaved changes warning when canceling edit on detail pages [apisix-dashboard]

2026-07-09 Thread via GitHub


moonming commented on issue #3344:
URL: 
https://github.com/apache/apisix-dashboard/issues/3344#issuecomment-4932692229

   This was fixed by #3391 (`c8d3466`) and I verified the coverage on current 
`master` (`9979b31`): every detail page now wires Cancel through 
`useEditCancelGuard`, which shows an unsaved-changes confirm before discarding.
   
   Checked all 12 detail pages individually (routes, services, upstreams, 
consumers, credentials, ssls, protos, secrets, stream_routes, global_rules, 
plugin_configs, consumer_groups) — each contains `const handleCancel = 
useEditCancelGuard(form, () => setReadOnly(true));` — plus the two nested 
service sub-pages which inherit it by reusing 
`RouteDetail`/`StreamRouteDetail`. No remaining Cancel path calls 
`setReadOnly(true)` directly.
   
   This can be closed. Two related gaps worth tracking separately (not blockers 
for this issue):
   
   1. The guard deliberately shows the modal on **every** Cancel — including 
when nothing was changed — because the current `disabled`-toggling form 
architecture makes `isDirty` unreliable (documented in 
`useEditCancelGuard.tsx`'s own comment). Fixing the dirty signal would remove 
one needless click per clean cancel.
   2. Browser-level exits are still unguarded: navigating away via the sidebar, 
browser Back, or closing the tab with a dirty form discards everything silently 
(`useBlocker`/`beforeunload` appear nowhere in `src/`). That's the most common 
real-world data-loss path and deserves its own issue — I'm filing a 
review-summary issue that includes it.
   


-- 
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]



Re: [I] fix(ux): no unsaved changes warning when canceling edit on detail pages [apisix-dashboard]

2026-03-25 Thread via GitHub


vanshaj2023 commented on issue #3344:
URL: 
https://github.com/apache/apisix-dashboard/issues/3344#issuecomment-4126488648

   Hi @Baoyuantop, understood! I will combine the changes so that both areas 
are handled in a single PR.
   
   Hi @Jaswanth-arjun, thank you for the suggestion! I'm also considering 
extracting the unsaved changes logic into a reusable hook/utility for better 
consistency.
   @Baoyuantop, would you prefer that approach, or should I just focus on 
combining the fixes without refactoring?
   
   Once we're aligned, I'll submit the updated PR shortly.


-- 
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]



Re: [I] fix(ux): no unsaved changes warning when canceling edit on detail pages [apisix-dashboard]

2026-03-25 Thread via GitHub


Jaswanth-arjun commented on issue #3344:
URL: 
https://github.com/apache/apisix-dashboard/issues/3344#issuecomment-4124298576

   Hi @vanshaj2023  ,
   
   Nice catch on extending the fix from # to detail pages.
   
   One small suggestion: since this logic is being reused across multiple 
places, would it make sense to extract the unsaved changes check into a 
reusable hook or utility? This could help avoid duplication and ensure 
consistency across all edit flows.
   
   Just a thought — happy to hear your opinion.


-- 
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]



Re: [I] fix(ux): no unsaved changes warning when canceling edit on detail pages [apisix-dashboard]

2026-03-24 Thread via GitHub


Baoyuantop commented on issue #3344:
URL: 
https://github.com/apache/apisix-dashboard/issues/3344#issuecomment-4124003516

   Hi @vanshaj2023, I believe this is the same function, and we should complete 
it in a single PR.


-- 
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]



Re: [I] fix(ux): no unsaved changes warning when canceling edit on detail pages [apisix-dashboard]

2026-03-24 Thread via GitHub


vanshaj2023 commented on issue #3344:
URL: 
https://github.com/apache/apisix-dashboard/issues/3344#issuecomment-4122173494

   Hi @Baoyuantop, they fix the same type of bug but in different places.
   
   PR # fixed the Plugin Editor Drawer, while PR #3355 applies the exact 
same fix to the main Detail/Edit pages (Upstreams, Routes, etc.) where changes 
were still being silently discarded.


-- 
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]



Re: [I] fix(ux): no unsaved changes warning when canceling edit on detail pages [apisix-dashboard]

2026-03-24 Thread via GitHub


Baoyuantop commented on issue #3344:
URL: 
https://github.com/apache/apisix-dashboard/issues/3344#issuecomment-4118750999

   Hi @vanshaj2023, why do you need to submit #3355 after submitting #? 
Aren't they solving the same problem?


-- 
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]



Re: [I] fix(ux): no unsaved changes warning when canceling edit on detail pages [apisix-dashboard]

2026-03-23 Thread via GitHub


vanshaj2023 commented on issue #3344:
URL: 
https://github.com/apache/apisix-dashboard/issues/3344#issuecomment-4114159286

   Hi @Baoyuantop,
   
   Sorry for submitting a PR without waiting for a discussion first. 
   
   I went ahead and opened PR #3355 because this is the exact same issue we 
just resolved in #, so I applied the same established pattern here. 
   
   Let me know if you need any changes!


-- 
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]



Re: [I] fix(ux): no unsaved changes warning when canceling edit on detail pages [apisix-dashboard]

2026-03-20 Thread via GitHub


vanshaj2023 commented on issue #3344:
URL: 
https://github.com/apache/apisix-dashboard/issues/3344#issuecomment-4101434154

   # 


-- 
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]



Re: [I] fix(ux): no unsaved changes warning when canceling edit on detail pages [apisix-dashboard]

2026-03-20 Thread via GitHub


vanshaj2023 commented on issue #3344:
URL: 
https://github.com/apache/apisix-dashboard/issues/3344#issuecomment-4101435265

   # 


-- 
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]



Re: [I] fix(ux): no unsaved changes warning when canceling edit on detail pages [apisix-dashboard]

2026-03-20 Thread via GitHub


vanshaj2023 commented on issue #3344:
URL: 
https://github.com/apache/apisix-dashboard/issues/3344#issuecomment-4101432192

   Hi @Baoyuantop ,
   I noticed the same issue that we fixed in # 
   Do I do the same thing here.


-- 
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]