aa4 - #2061
Conversation
|
Agree with you. IT would be great to update ActiveAdmin to 4 version. |
There was a problem hiding this comment.
Pull request overview
This PR upgrades the admin UI stack to ActiveAdmin 4 (beta22) and reintroduces several AA3-era UI components/behaviors (tabs, dropdown menus, columns, deep menu nesting, table footers, etc.) via local patches and view overrides, while updating feature specs and helper selectors to match AA4 markup. It also switches ActiveAdmin styling to a Tailwind build pipeline and updates related assets and initializers.
Changes:
- Upgrade ActiveAdmin to
4.0.0.beta22, remove AA3-only plugins/theme, and addimportmap-rails+cssbundling-rails. - Add AA4-compatible view overrides/components (layout/header/nav/sidebar, tabs/dropdown_menu/columns, index/table tweaks, deep menu nesting).
- Update Capybara/RSpec helpers and many feature specs to use AA4 selectors and markup.
Reviewed changes
Copilot reviewed 151 out of 155 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| tailwind-active_admin.config.js | Tailwind content config for AA4 assets |
| spec/support/helpers/tom_select.rb | Update filter markup selectors |
| spec/support/helpers/feature_test_helper.rb | Update batch-action checkbox selectors |
| spec/support/helpers/capybara_active_admin_aa4.rb | AA4 selector overrides for capybara_active_admin |
| spec/support/examples/test_unset_tag_action_value.rb | Update page-load wait selector |
| spec/support/examples/test_unset_routing_tag_ids.rb | Update page-load wait selector |
| spec/spec_helper.rb | Include AA4 Capybara selector module |
| spec/features/system/oauth_access_tokens_spec.rb | Update table/filter selectors |
| spec/features/system/cdr_configs/index_cdr_config_spec.rb | Update attributes table row selector |
| spec/features/routing/destinations/index_destination_spec.rb | Update filter/table selectors |
| spec/features/routing/destinations/create_destination_spec.rb | Assert redirect path instead of body classes |
| spec/features/routing/customers_auths/filters_spec.rb | Update table/filter predicate selectors |
| spec/features/realtime_data/active_calls/batch_actions_spec.rb | Update row selection selector |
| spec/features/cdr/cdr_history/filter_predicate_labels_spec.rb | Update filter predicate selectors |
| spec/features/cdr/cdr_history/cdr_show_spec.rb | Update row/action-items selectors |
| spec/features/billing/contractors/show_spec.rb | Update action-items selector |
| spec/features/billing/contractors/create_import_spec.rb | Update action-items/main content selectors |
| spec/features/billing/contractors/apply_unique_import_spec.rb | Update action-items/main content selectors |
| spec/features/billing/contractors/apply_only_update_import_spec.rb | Update action-items selector |
| spec/features/billing/contractors/apply_only_create_import_spec.rb | Update action-items selector |
| spec/features/billing/contractors/apply_create_and_update_import_spec.rb | Update action-items selector |
| spec/features/ajax_filters_spec.rb | Update filter form selector |
| package.json | Add Tailwind/AA4 JS build deps + scripts |
| lib/resource_dsl/with_global_dsl.rb | Use action_item_link helper for AA4 styling |
| lib/resource_dsl/report_sheduler.rb | Use action_item_link helper for AA4 styling |
| lib/resource_dsl/acts_as_status.rb | Use action_item_link helper for AA4 styling |
| lib/resource_dsl/acts_as_stat.rb | Wrap dropdown_menu in Arbre context for AA4 |
| lib/resource_dsl/acts_as_lock.rb | Use action_item_link helper for AA4 styling |
| lib/resource_dsl/acts_as_import_preview.rb | Use action_item_link helper for AA4 styling |
| lib/resource_dsl/acts_as_clone.rb | Use action_item_link helper for AA4 styling |
| lib/resource_dsl/acts_as_audit.rb | Use action_item_link helper for AA4 styling |
| lib/resource_dsl/acts_as_async_update.rb | Removed (AA3 scoped action) |
| lib/resource_dsl/acts_as_async_destroy.rb | Removed (AA3 scoped action) |
| lib/active_admin/views/tabbed_navigation.rb | Removed (AA3 override) |
| lib/active_admin/views/pages/index.rb | Removed (AA3 override) |
| lib/active_admin/views/index_as_table.rb | Patch AA4 index-as-table behavior |
| lib/active_admin/views/components/tabs.rb | Restore tabs component (Flowbite markup) |
| lib/active_admin/views/components/table_for.rb | Patch TableFor to support footer totals |
| lib/active_admin/views/components/dropdown_menu.rb | Restore dropdown_menu component (Flowbite) |
| lib/active_admin/views/components/columns.rb | Restore columns component (grid) |
| lib/active_admin/view_helpers/display_helper.rb | Removed (AA3 formatting override) |
| lib/active_admin/menu_deep_nesting.rb | Restore deep menu nesting support |
| lib/active_admin/inputs/date_time_picker_input.rb | Removed (AA3 datetimepicker patch) |
| lib/active_admin/fast_count.rb | Move fast count hook to AA4 IndexHelper |
| lib/active_admin/collapsed_sidebar/pages/index.rb | Removed (AA3 sidebar page override) |
| Gemfile.lock | Dependency updates for AA4/css/importmap |
| Gemfile | Pin AA4 + adjust related gems |
| config/initializers/yeti.rb | Remove AA3 datetimepicker defaults |
| config/initializers/ransack_datetime_picker.rb | Re-add removed Ransack predicates |
| config/initializers/active_admin.rb | AA4 notes + remove AA3-only hooks |
| app/views/layouts/active_admin.html.erb | Override AA4 layout (AA3-like chrome) |
| app/views/layouts/active_admin_logged_out.html.erb | Override logged-out layout |
| app/views/active_admin/shared/_sidebar_sections.html.erb | Restore titled sidebar panels |
| app/views/active_admin/resource/index.html.arb | Override AA4 index (toolbar/state classes) |
| app/views/active_admin/resource/_index_blank_slate.html.erb | Restore AA3 blank-slate options |
| app/views/active_admin/devise/sessions/new.html.erb | Adjust login template for AA4/OIDC |
| app/views/active_admin/_top_navigation.html.erb | Horizontal top navigation (Flowbite dropdowns) |
| app/views/active_admin/_top_menu_items.html.erb | Recursive top-nav dropdown rendering |
| app/views/active_admin/_site_header.html.erb | Compact header w/ logo, clock, menus |
| app/views/active_admin/_site_footer.html.erb | Footer partial replacing config.footer |
| app/views/active_admin/_sidebar.html.erb | Sidebar wrapper restoring #sidebar id |
| app/views/active_admin/_page_header.html.erb | Compact AA3-style page header bar |
| app/views/active_admin/_main_navigation.html.erb | Mobile drawer-only main nav |
| app/views/active_admin/_html_head.html.erb | Move meta/styles/scripts into head partial |
| app/views/active_admin/_footer.html.arb | Removed (AA3 footer Arbre) |
| app/views/active_admin/_flash_messages.html.erb | Restore flash hooks + role=alert |
| app/views/active_admin/_drawer_menu_item.html.erb | Recursive drawer nav item rendering |
| app/helpers/active_admin/action_item_helper.rb | Helper to apply AA4 action-item styling |
| app/assets/stylesheets/yeti/tom-select-customizations.scss | Rescope + AA4/dark-mode fixes |
| app/assets/stylesheets/yeti/sorting_persist.css.scss | Update selectors for AA4 table headers |
| app/assets/stylesheets/yeti/sidebar_filter_actions.css.scss | Update selectors for AA4 sidebar layout |
| app/assets/stylesheets/yeti/panel_toggle.css.scss | Update selectors for AA4 panel-body |
| app/assets/stylesheets/yeti/charts.css.scss | Remove #wrapper dependency + fix select width |
| app/assets/stylesheets/themes/variables.scss | Removed (AA3 theme overrides) |
| app/assets/stylesheets/themes/tokens.scss | New design tokens for AA3 palette on AA4 |
| app/assets/stylesheets/active_admin/components/active_admin_scoped_collection_actions.scss | Removed (plugin styles) |
| app/assets/stylesheets/active_admin.tailwind.css | Tailwind entrypoint for ActiveAdmin CSS |
| app/assets/stylesheets/active_admin.css.scss | Removed (AA3 SASS pipeline) |
| app/assets/javascripts/yeti_admin.js | Remove AA3 requires + add dialog widget |
| app/assets/javascripts/tom-select.js | Update filter predicate selector for AA4 |
| app/assets/javascripts/sorting_persist.js | Update header selector for AA4 |
| app/assets/javascripts/panel_toggle.js | Update panel contents selector for AA4 |
| app/assets/javascripts/modal_confirm_fix.js | Removed (jQuery UI confirm patch) |
| app/assets/javascripts/datetimepicker_dark.js | Removed (AA3 datetimepicker dark mode) |
| app/assets/javascripts/chart_init.js | Update tab click binding for AA4 tabs |
| app/assets/javascripts/cdr_stats.js | Update section selector for AA4 sidebar panels |
| app/assets/javascripts/ajax_tab.js | Replace jQuery UI tabsactivate with click handler |
| app/assets/javascripts/active_calls.js | Remove AA3 checkboxToggler reinit |
| app/assets/config/manifest.js | Link Tailwind builds + renamed yeti_admin assets |
| app/assets/builds/.keep | Keep builds directory in repo |
| app/admin/system/schedulers.rb | Update comments rendering helper |
| app/admin/system/pops.rb | Update comments rendering helper |
| app/admin/system/nodes.rb | Update comments rendering helper |
| app/admin/system/lua_scripts.rb | Update comments rendering helper |
| app/admin/system/background_tasks.rb | Update comments rendering helper |
| app/admin/system/admin_users.rb | Use action_item_link for styling |
| app/admin/routing/routing_plans.rb | Remove async actions + update comments helper |
| app/admin/routing/routing_plan_static_routes.rb | Remove async actions + use action_item_link |
| app/admin/routing/routing_plan_lnp_rules.rb | Remove async actions + filter type change |
| app/admin/routing/routing_groups.rb | Update comments rendering helper |
| app/admin/routing/routeset_discriminators.rb | Update comments rendering helper |
| app/admin/routing/rate_groups.rb | Update comments rendering helper |
| app/admin/routing/numberlists.rb | Remove async actions |
| app/admin/routing/numberlist_items.rb | Filter type changes + comments helper |
| app/admin/routing/lnp_caches.rb | Remove async destroy |
| app/admin/routing/dialpeers.rb | Remove async actions + many selector/input updates |
| app/admin/routing/dialpeer_next_rates.rb | Use action_item_link + input/filter type changes |
| app/admin/routing/destinations.rb | Remove scoped action + use action_item_link + input/filter changes |
| app/admin/routing/destination_next_rates.rb | Use action_item_link + input/filter type changes |
| app/admin/routing/customers_auths.rb | Remove async actions |
| app/admin/reports/vendor_traffics.rb | Filter/input type changes |
| app/admin/reports/vendor_traffic_schedulers.rb | Filter type changes |
| app/admin/reports/interval_cdrs.rb | Filter/input type changes |
| app/admin/reports/interval_cdr_schedulers.rb | Filter type changes |
| app/admin/reports/customer_traffics.rb | Filter/input type changes |
| app/admin/reports/customer_traffic_schedulers.rb | Filter type changes |
| app/admin/reports/customer_traffic_data_fulls.rb | Use action_item_link for styling |
| app/admin/reports/customer_traffic_data_by_vendors.rb | Use action_item_link for styling |
| app/admin/reports/customer_traffic_data_by_destinations.rb | Use action_item_link for styling |
| app/admin/reports/customer_auth_statistics.rb | Filter type changes |
| app/admin/reports/custom_data.rb | Use action_item_link for styling |
| app/admin/reports/custom_cdrs.rb | Filter/input type changes |
| app/admin/realtime_data/active_calls.rb | Use action_item_link for styling |
| app/admin/rate_management/projects.rb | Filter type changes |
| app/admin/rate_management/pricelists.rb | Filter/input type changes |
| app/admin/rate_management/pricelist_items.rb | Use action_item_link for styling |
| app/admin/logs/audit_log_items.rb | Filter type changes |
| app/admin/logs/api_logs.rb | Filter type changes + comments helper |
| app/admin/equipment/stir_shaken/stir_shaken_trusted_repositories.rb | Update comments rendering helper |
| app/admin/equipment/stir_shaken/stir_shaken_trusted_certificates.rb | Update comments rendering helper |
| app/admin/equipment/stir_shaken/stir_shaken_signing_certificates.rb | Update comments rendering helper |
| app/admin/equipment/stir_shaken/stir_shaken_rcd_profiles.rb | Update comments rendering helper |
| app/admin/equipment/lnp_databases.rb | Wrap dropdown_menu in Arbre context |
| app/admin/equipment/gateways.rb | Remove async actions + comments helper |
| app/admin/equipment/gateway_groups.rb | Remove async actions |
| app/admin/equipment/dns/zones.rb | Update comments rendering helper |
| app/admin/equipment/dns/records.rb | Update comments rendering helper |
| app/admin/equipment/disconnect_policies.rb | Update comments rendering helper |
| app/admin/equipment/cnam_databases.rb | Wrap dropdown_menu in Arbre context |
| app/admin/cdr/tx_streams.rb | Filter type changes |
| app/admin/cdr/rx_streams.rb | Filter type changes |
| app/admin/cdr/cdrs.rb | Filter type change + use action_item_link |
| app/admin/cdr/cdr_exports.rb | Use action_item_link + input type changes + comments helper |
| app/admin/cdr/auth_logs.rb | Filter type changes |
| app/admin/billing/transactions.rb | Filter type changes |
| app/admin/billing/services.rb | Filter/input type changes |
| app/admin/billing/payments.rb | Filter type changes + comments helper + action item styling |
| app/admin/billing/invoices.rb | Remove async destroy + action item styling + filter/input changes |
| app/admin/billing/invoice_templates.rb | Remove sidebar hook + action item styling + comments helper |
| app/admin/billing/contractors.rb | Remove async actions + comments helper |
| app/admin/billing/contacts.rb | Remove async actions |
| app/admin/billing/accounts.rb | Remove async actions + action item styling + comments helper |
| .gitignore | Ignore node_modules and Tailwind builds output |
Suppressed comments (2)
lib/resource_dsl/report_sheduler.rb:13
- Button label is missing a space before the count (
"Schedulers(#{n})"), which reads like a typo in the UI.
package.json:24 bugs.urlandhomepagecurrently point atdmitry-sinina/yeti-web. If this package belongs toyeti-switch/yeti-web, these should be updated to match the canonical repository.
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| action_item :disable, only: %i[show edit] do | ||
| if resource.enabled? && authorized?(:disable) && (!resource.respond_to?(:live?) || resource.live?) | ||
| link_to 'Disable ', action: :disable, id: resource.id | ||
| action_item_link 'Disable ', action: :disable, id: resource.id | ||
| end |
| action_item :create_and_update, only: [:index] do | ||
| if authorized?(:batch_replace) | ||
| link_to 'Create and update ', action: :batch_replace unless Importing::ImportingDelayedJob.jobs? | ||
| action_item_link 'Create and update ', action: :batch_replace unless Importing::ImportingDelayedJob.jobs? | ||
| end |
| # frozen_string_literal: true | ||
|
|
||
| module ResourceDSL | ||
| module ReportScheduler | ||
| def report_scheduler(klass) |
| # frozen_string_literal: true | ||
|
|
||
| # ActiveAdmin 4 removed the `tabs` component. app/admin uses it in ~14 resources |
| "repository": { | ||
| "type": "git", | ||
| "url": "git+https://github.com/dmitry-sinina/yeti-web.git" | ||
| }, |
No description provided.