Repository navigation
Theme 4.0 for ActiveAdmin 4 #78
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
senid231
wants to merge
59
commits into
activeadmin-plugins:master
Choose a base branch
from
senid231:activeadmin-v4
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from all commits
Commits
Show all changes
59 commits
Select commit
Hold shift + click to select a range
2c99573
Theme v4 for ActiveAdmin 4
senid231 b826d58
Use the ActiveAdmin layout hooks, with copies until they ship
senid231 66fc739
Support menus nested deeper than one level
senid231 a231d48
Add data hooks to the top menu and tooltips
senid231 ec9584d
Add page objects built on active_admin_page_objects
senid231 a668b95
Document the page objects
senid231 ba7f6ce
Read the drawer state from aria-modal
senid231 c5dd0c0
Define the css rake task once
senid231 abe53bf
Let a host's searchable_select_options win in any load order
senid231 9d6796a
Add confirm_dialog triggers and params, truncate_text popup
senid231 8402ae6
Register the searchable select page objects with the gem
senid231 91095e8
Upgrade every select to Tom Select, extend the searchable select
senid231 32de369
Keep the case of a sidebar's String name
senid231 f813180
Style the confirm_dialog trigger as an action item
senid231 b503bc6
Put the action items below the title on narrow screens
senid231 d877604
Load the first page whenever typing starts a search
senid231 8987b1a
Build the confirm_dialog_tag body in the Arbre context
senid231 bbd0ee5
Look up selected searchable options through the read scope
senid231 8250cad
Keep the server clock text when the server sends no zone
senid231 94bc15e
Include links and tabindex elements in the confirm dialog Tab loop
senid231 2677924
Give tabs unique ids that start with a letter
senid231 d1d9af5
Fail the overrides test when ActiveAdmin drops a replaced view
senid231 61f56ba
Say that inputs cannot show a lambda value's selected record
senid231 c291a1b
Declare the ActiveAdmin override once in the Gemfile
senid231 115bc3c
Drive dialog body controls, read CSS clipping, wrap show tables
senid231 cc7dbcc
Match theme 3.x look: title band, dense tables, one-line pages
senid231 1a0a3b9
Solid v3 flash bands, flat label cells, eye toggle on secrets
senid231 34232b4
Make form field labels bold and high-contrast
senid231 d378f98
Read status tag text in its DOM case
senid231 4cee628
Put panels and tab content on the v3 surface
senid231 902586a
Match v3 panels, tabs and show-page spacing
senid231 3452fe6
Match v3 links, menu, status tags and sidebar width
senid231 3de1462
Add v3 text, field, flash and table tweaks
senid231 64daaa6
Point repo links at the activeadmin-plugins org
senid231 9ad4fce
Render every flash type and accept warning in page objects
senid231 0c44a57
Color status tag aliases such as green and red
senid231 a094f18
Titleize Symbol tab titles as ActiveAdmin 3 did
senid231 9d2aff2
Page objects: Regexp tabs, sidebar selector, select and status helpers
senid231 bb3747e
confirm_dialog: number and date fields, scope, multiple, open event
senid231 3dc207f
secret_reveal: inline value: mode
senid231 a8b02ef
Searchable select: several parents, optional parent, single auto-select
senid231 4b70e58
Tabs: open the tab the URL hash names
senid231 38dca49
Add warning and danger text colour tokens
senid231 fe39031
Add lazy_load component
senid231 d8d810e
Add dropdown_menu for action items
senid231 226b518
Document the new components and page object helpers
senid231 e9ed1e7
Use --aat-text-danger in confirm_dialog and secret_reveal
senid231 58795f7
Searchable select: understand the filter None option
senid231 2ef7863
Searchable select: drop a stale refresh when the select closes
senid231 0dbf0bf
Footer and title link config, Tailwind sources task, precompile
senid231 27784b0
String helpers, notice component, success token, pre_wrap max_height
senid231 547a2b5
Add collapsible panels
senid231 547cae5
Link sidebars, id search, per_page default, composite keys
senid231 9375932
Page objects: secret cells and RSpec matchers
senid231 f13ff2f
Document the new components, settings and page objects
senid231 583ea58
Link sidebars: groups with headings and countable counts
senid231 107805b
Load panel_toggle by default so collapsed panels can open
senid231 d0ceb96
Link sidebars: new_tab links and default priorities
senid231 96ddac0
Searchable select: wait for dependent selects to be ready
senid231 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,26 +1,33 @@ | ||
| source 'https://rubygems.org' | ||
|
|
||
| # Specify your gem's dependencies in active_admin_theme.gemspec | ||
|
|
||
| # Run against an unreleased ActiveAdmin, such as a branch with the layout hooks: | ||
| # ACTIVEADMIN_PATH=../activeadmin bundle exec rake test | ||
| # ACTIVEADMIN_BRANCH=extensible-layout bundle exec rake test | ||
| if ENV["ACTIVEADMIN_PATH"] | ||
| gem "activeadmin", path: ENV["ACTIVEADMIN_PATH"] | ||
| elsif ENV["ACTIVEADMIN_BRANCH"] | ||
| gem "activeadmin", github: ENV.fetch("ACTIVEADMIN_REPO", "senid231/activeadmin"), branch: ENV["ACTIVEADMIN_BRANCH"] | ||
| end | ||
| gemspec | ||
|
|
||
| # Dummy ActiveAdmin 4 app (test/dummy): importmap + propshaft, Tailwind CSS | ||
| # built with the npm CLI. It hosts the Capybara tests and the screenshot | ||
| # scripts. | ||
| group :development, :test do | ||
| gem 'rake' | ||
| gem 'sassc' | ||
| end | ||
|
|
||
| # Dummy ActiveAdmin app (test/dummy) that hosts the Capybara integration test | ||
| # (`rake test`) and sources the neutral README screenshot. Sprockets + | ||
| # sassc-rails is the pipeline AA 3.x targets (it emits `//= require` directives | ||
| # and SCSS). Rails 8 needs Ruby >= 3.2, so keep these out of the 3.1 bundle — | ||
| # `rake css` still runs on 3.1 without them. | ||
| if Gem::Version.new(RUBY_VERSION) >= Gem::Version.new('3.2') | ||
| group :development, :test do | ||
| gem 'rails', '~> 8.0' | ||
| gem 'sprockets-rails' | ||
| gem 'sassc-rails' | ||
| gem 'sqlite3' | ||
| gem 'puma' | ||
| gem 'capybara' | ||
| gem 'cuprite' | ||
| end | ||
| gem 'rails', '~> 8.0' | ||
| gem 'propshaft' | ||
| gem 'importmap-rails' | ||
| gem 'sqlite3' | ||
| gem 'puma' | ||
| gem 'capybara' | ||
| gem 'cuprite' | ||
| gem 'rspec-expectations' | ||
| # Drives the dummy app in the tests of active_admin_theme/page_objects. Not on | ||
| # RubyGems yet, so pinned to a commit. | ||
| gem 'active_admin_page_objects', github: 'activeadmin-plugins/active_admin_page_objects', ref: '8ec1677d4118559af117421fbf6576cdd5e33721' | ||
| # Tests the searchable select with its None filter option. Pinned until the option is released. | ||
| gem 'active_admin_filter_extensions', github: 'activeadmin-plugins/active_admin_filter_extensions', ref: '31d4797a30a5e964f6eb0e15fe52f8e6097d7093' | ||
| end |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,21 +1,23 @@ | ||
| require "bundler/gem_tasks" | ||
|
|
||
| desc "Compile the theme against ActiveAdmin and check the result" | ||
| task :css do | ||
| ruby "test/css_check.rb" | ||
| desc "Build the dummy app's Tailwind CSS (npm CLI)" | ||
| task :assets do | ||
| Dir.chdir("test/dummy") do | ||
| unless Dir.exist?("node_modules") | ||
| sh "npm #{ENV['CI'] ? 'ci' : 'install'} --no-audit --no-fund" | ||
| end | ||
| sh "npm run build" | ||
| end | ||
| end | ||
|
|
||
| desc "Capybara integration test: the server clock renders + ticks (needs Chrome)" | ||
| task :test do | ||
| ruby "test/clock_test.rb" | ||
| desc "Smoke test: every demo page renders with the theme (builds CSS first)" | ||
| task test: :assets do | ||
| Dir["test/*_test.rb"].sort.each { |file| ruby file } | ||
| end | ||
|
|
||
| desc "Regenerate the neutral README screenshot img/clock.png (needs Chrome)" | ||
| desc "Regenerate the README screenshot img/clock.png (needs Chrome)" | ||
| task :screenshot do | ||
| ruby "test/screenshot.rb" | ||
| end | ||
|
|
||
| # css only: :test needs the Rails/Capybara stack the Gemfile excludes on | ||
| # Ruby 3.1 (the gem's own minimum) plus a local Chrome. Run `rake test` | ||
| # explicitly where both are available; CI names its tasks per job anyway. | ||
| task default: :css | ||
| task default: :test |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
test it with ruby 4.0 as well