Conversation
Fix params_to_s pushing [string] instead of string and add URL encoding via CGI.escape. Fix Flash component using "notices" CSS class for all message types instead of "warnings"/"errors". Add nil guard on Head#style_links and Store#prepare_sections navbar. Add rescue in Support.to_date for values that do not respond to to_date.
…Page DRY up duplicated update_attributes into a Views::Attributes module shared by BasicLayout and BasicComponent. Extract inline actions_buttons methods from Index and Show into a reusable ActionsButtons component. Consolidate three identical error page view_templates into an ErrorPage base class. Also adds nil guard on field access in Index and Show table/record iteration.
…arden settings Consolidate to_class into BasicApp.authentication_plugin via Utils include. Use Utils.humanize in Field.create_field instead of inline logic. Extract repeated authorization checks in Router into a single authorize! helper method. Guard Settings#load_settings against nil authentication plugin and make it idempotent with @loaded flag so repeated calls (e.g. per-request) are a no-op.
The session secret was regenerated with SecureRandom.hex(64) on every boot, which invalidates all existing sessions on restart. Now reads from ENV["TINY_ADMIN_SECRET"] with fallback to the random value, so production deployments can maintain stable sessions across restarts.
Update gemspec constraint from ~> 1, >= 1.10.0 to ~> 2. Replace deprecated unsafe_raw(content) with raw(safe(content)) in Content page. Replace removed yield_content(&block) with plain yield in DefaultLayout. All existing tests pass with Phlex 2.4.1.
… view components Add 31 new specs bringing line coverage to 100% and branch coverage from 80.97% to 83.4%. Covers TinyAdmin.configure block form, Utils#prepare_page, Settings#load_settings idempotency, and unit specs for FieldValue, Widgets, FiltersForm (all filter types), and ActionsButtons components.
…ored methods The RBS runtime type checker was failing because signatures were stale after the Phlex 2 upgrade and code refactoring. Key changes: - Fix view_template block arity: (untyped) -> () for Phlex 2 yield pattern - Add signatures for Attributes module, ActionsButtons, and ErrorPage - Update BasicLayout/BasicComponent to include Attributes module - Add authorize! to Router, @loaded to Settings - Remove stale actions_buttons from Index/Show (now a component)
There was a problem hiding this comment.
Remaining comments which cannot be posted as a review comment to avoid GitHub Rate Limit
rubocop
[rubocop] reported by reviewdog 🐶
[Correctable] Layout/SpaceInsideHashLiteralBraces: Space inside { missing.
[rubocop] reported by reviewdog 🐶
[Correctable] Layout/SpaceInsideHashLiteralBraces: Space inside } missing.
[rubocop] reported by reviewdog 🐶
[Correctable] Layout/SpaceInsideHashLiteralBraces: Space inside { missing.
[rubocop] reported by reviewdog 🐶
[Correctable] Layout/SpaceInsideHashLiteralBraces: Space inside } missing.
[rubocop] reported by reviewdog 🐶
[Correctable] Layout/SpaceInsideHashLiteralBraces: Space inside { missing.
[rubocop] reported by reviewdog 🐶
[Correctable] Layout/SpaceInsideHashLiteralBraces: Space inside } missing.
[rubocop] reported by reviewdog 🐶
[Correctable] Layout/SpaceInsideHashLiteralBraces: Space inside { missing.
[rubocop] reported by reviewdog 🐶
[Correctable] Layout/SpaceInsideHashLiteralBraces: Space inside } missing.
[rubocop] reported by reviewdog 🐶
RSpec/MultipleExpectations: Example has too many expectations [2/1].
[rubocop] reported by reviewdog 🐶
RSpec/MultipleExpectations: Example has too many expectations [3/1].
[rubocop] reported by reviewdog 🐶
[Correctable] Layout/SpaceInsideHashLiteralBraces: Space inside { missing.
[rubocop] reported by reviewdog 🐶
[Correctable] Layout/SpaceInsideHashLiteralBraces: Space inside } missing.
[rubocop] reported by reviewdog 🐶
[Correctable] Layout/SpaceInsideHashLiteralBraces: Space inside { missing.
[rubocop] reported by reviewdog 🐶
[Correctable] Layout/SpaceInsideHashLiteralBraces: Space inside } missing.
[rubocop] reported by reviewdog 🐶
[Correctable] Layout/SpaceInsideHashLiteralBraces: Space inside { missing.
[rubocop] reported by reviewdog 🐶
[Correctable] Layout/SpaceInsideHashLiteralBraces: Space inside } missing.
[rubocop] reported by reviewdog 🐶
RSpec/VerifiedDoubles: Prefer using verifying doubles over normal doubles.
[rubocop] reported by reviewdog 🐶
RSpec/MultipleExpectations: Example has too many expectations [2/1].
[rubocop] reported by reviewdog 🐶
[Correctable] Layout/SpaceInsideHashLiteralBraces: Space inside { missing.
[rubocop] reported by reviewdog 🐶
[Correctable] Layout/SpaceInsideHashLiteralBraces: Space inside } missing.
[rubocop] reported by reviewdog 🐶
RSpec/VerifiedDoubles: Prefer using verifying doubles over normal doubles.
[rubocop] reported by reviewdog 🐶
RSpec/MultipleExpectations: Example has too many expectations [3/1].
[rubocop] reported by reviewdog 🐶
[Correctable] Layout/SpaceInsideHashLiteralBraces: Space inside { missing.
[rubocop] reported by reviewdog 🐶
[Correctable] Layout/SpaceInsideHashLiteralBraces: Space inside } missing.
[rubocop] reported by reviewdog 🐶
RSpec/VerifiedDoubles: Prefer using verifying doubles over normal doubles.
[rubocop] reported by reviewdog 🐶
[Correctable] Layout/SpaceInsideHashLiteralBraces: Space inside { missing.
[rubocop] reported by reviewdog 🐶
[Correctable] Layout/SpaceInsideHashLiteralBraces: Space inside { missing.
[rubocop] reported by reviewdog 🐶
[Correctable] Layout/SpaceInsideHashLiteralBraces: Space inside { missing.
[rubocop] reported by reviewdog 🐶
[Correctable] Layout/SpaceInsideHashLiteralBraces: Space inside } missing.
[rubocop] reported by reviewdog 🐶
[Correctable] Layout/SpaceInsideHashLiteralBraces: Space inside } missing.
[rubocop] reported by reviewdog 🐶
[Correctable] Layout/SpaceInsideHashLiteralBraces: Space inside } missing.
[rubocop] reported by reviewdog 🐶
RSpec/MultipleExpectations: Example has too many expectations [3/1].
[rubocop] reported by reviewdog 🐶
[Correctable] Layout/SpaceInsideHashLiteralBraces: Space inside { missing.
[rubocop] reported by reviewdog 🐶
[Correctable] Layout/SpaceInsideHashLiteralBraces: Space inside { missing.
[rubocop] reported by reviewdog 🐶
[Correctable] Layout/SpaceInsideHashLiteralBraces: Space inside { missing.
[rubocop] reported by reviewdog 🐶
[Correctable] Layout/SpaceInsideHashLiteralBraces: Space inside } missing.
[rubocop] reported by reviewdog 🐶
[Correctable] Layout/SpaceInsideHashLiteralBraces: Space inside } missing.
[rubocop] reported by reviewdog 🐶
[Correctable] Layout/SpaceInsideHashLiteralBraces: Space inside } missing.
[rubocop] reported by reviewdog 🐶
RSpec/MultipleExpectations: Example has too many expectations [2/1].
[rubocop] reported by reviewdog 🐶
[Correctable] Layout/SpaceInsideHashLiteralBraces: Space inside { missing.
[rubocop] reported by reviewdog 🐶
[Correctable] Layout/SpaceInsideHashLiteralBraces: Space inside { missing.
[rubocop] reported by reviewdog 🐶
[Correctable] Layout/SpaceInsideHashLiteralBraces: Space inside { missing.
[rubocop] reported by reviewdog 🐶
[Correctable] Layout/SpaceInsideHashLiteralBraces: Space inside } missing.
[rubocop] reported by reviewdog 🐶
[Correctable] Layout/SpaceInsideHashLiteralBraces: Space inside } missing.
[rubocop] reported by reviewdog 🐶
[Correctable] Layout/SpaceInsideHashLiteralBraces: Space inside } missing.
[rubocop] reported by reviewdog 🐶
[Correctable] Layout/SpaceInsideHashLiteralBraces: Space inside { missing.
[rubocop] reported by reviewdog 🐶
[Correctable] Layout/SpaceInsideHashLiteralBraces: Space inside { missing.
[rubocop] reported by reviewdog 🐶
[Correctable] Layout/SpaceInsideHashLiteralBraces: Space inside { missing.
[rubocop] reported by reviewdog 🐶
[Correctable] Layout/SpaceInsideHashLiteralBraces: Space inside } missing.
[rubocop] reported by reviewdog 🐶
[Correctable] Layout/SpaceInsideHashLiteralBraces: Space inside } missing.
[rubocop] reported by reviewdog 🐶
[Correctable] Layout/SpaceInsideHashLiteralBraces: Space inside } missing.
[rubocop] reported by reviewdog 🐶
[Correctable] Layout/SpaceInsideHashLiteralBraces: Space inside { missing.
[rubocop] reported by reviewdog 🐶
[Correctable] Layout/SpaceInsideHashLiteralBraces: Space inside { missing.
[rubocop] reported by reviewdog 🐶
[Correctable] Layout/SpaceInsideHashLiteralBraces: Space inside { missing.
[rubocop] reported by reviewdog 🐶
[Correctable] Layout/SpaceInsideHashLiteralBraces: Space inside } missing.
[rubocop] reported by reviewdog 🐶
[Correctable] Layout/SpaceInsideHashLiteralBraces: Space inside } missing.
[rubocop] reported by reviewdog 🐶
[Correctable] Layout/SpaceInsideHashLiteralBraces: Space inside } missing.
[rubocop] reported by reviewdog 🐶
RSpec/MultipleExpectations: Example has too many expectations [3/1].
[rubocop] reported by reviewdog 🐶
[Correctable] Layout/SpaceInsideHashLiteralBraces: Space inside { missing.
[rubocop] reported by reviewdog 🐶
[Correctable] Layout/SpaceInsideHashLiteralBraces: Space inside { missing.
[rubocop] reported by reviewdog 🐶
[Correctable] Layout/SpaceInsideHashLiteralBraces: Space inside } missing.
[rubocop] reported by reviewdog 🐶
[Correctable] Layout/SpaceInsideHashLiteralBraces: Space inside } missing.
[rubocop] reported by reviewdog 🐶
RSpec/MultipleExpectations: Example has too many expectations [2/1].
[rubocop] reported by reviewdog 🐶
[Correctable] Layout/SpaceInsideHashLiteralBraces: Space inside { missing.
[rubocop] reported by reviewdog 🐶
[Correctable] Layout/SpaceInsideHashLiteralBraces: Space inside { missing.
[rubocop] reported by reviewdog 🐶
[Correctable] Layout/SpaceInsideHashLiteralBraces: Space inside } missing.
[rubocop] reported by reviewdog 🐶
[Correctable] Layout/SpaceInsideHashLiteralBraces: Space inside } missing.
[rubocop] reported by reviewdog 🐶
RSpec/MultipleExpectations: Example has too many expectations [2/1].
[rubocop] reported by reviewdog 🐶
RSpec/MultipleExpectations: Example has too many expectations [2/1].
No description provided.