DEV: Refactor the Automation Plugin UI to match admin UI guidelines (#31060)

This change updates the Automation plugin to make use of the `use_new_show_route` plugin flag, as well as generally updating the UI to match current admin UI guidelines. Notable changes include:

- Moving template/router/controller files to make use of the `admin.adminPlugins.show` route.
- Changing the URIs from `/admin/plugins/discourse-automation` to `/admin/plugins/automation`, to match the `PLUGIN_NAME`.
- Adding UI wrappers around the New/Edit forms, and polishing the list of defined automations.
This commit is contained in:
Gary Pendergast
2025-02-05 14:34:15 +11:00
committed by GitHub
parent a2dbcedbd9
commit f439bf14cc
26 changed files with 432 additions and 421 deletions

View File

@ -4,7 +4,7 @@ module PageObjects
module Pages
class Automation < PageObjects::Pages::Base
def visit(automation)
super("/admin/plugins/discourse-automation/#{automation.id}")
super("/admin/plugins/automation/automation/#{automation.id}")
self
end
@ -34,7 +34,7 @@ module PageObjects
end
def form
@form ||= find(".discourse-automation-form.edit")
@form ||= find(".discourse-automation-edit")
end
end
end

View File

@ -4,7 +4,7 @@ module PageObjects
module Pages
class NewAutomation < PageObjects::Pages::Base
def visit
super("/admin/plugins/discourse-automation/new")
super("/admin/plugins/automation/automation/new")
self
end