Skip to content

WIP: Add Field::ActiveStorage#2980

Draft
goosys wants to merge 1 commit intothoughtbot:mainfrom
goosys:feature/field-active_storage
Draft

WIP: Add Field::ActiveStorage#2980
goosys wants to merge 1 commit intothoughtbot:mainfrom
goosys:feature/field-active_storage

Conversation

@goosys
Copy link
Contributor

@goosys goosys commented Feb 8, 2026

WIP

index form
image image

Usage

apt install lib-vips
# config/application.rb
config.load_defaults "#{Rails::VERSION::MAJOR}.#{Rails::VERSION::MINOR}"
# Or,
# config/enviroments/development.rb
config.active_storage.variant_processor = :vips
bin/rails db:migrate

TODO

  • Field
    • Base
    • PreviewRenderer
    • ItemsRenderer
    • Refactor
  • Upload
    • has_one_attached
    • has_many_attached
  • Direct Upload
    • Upload
    • Error handling
  • Replace
    • has_one_attached
  • Append
    • has_many_attached
  • Remove
    • has_one_attached
    • has_many_attached
    • JS implementation
  • Preview
    • Image
      • Original
      • Variant
    • Audio
      • Original
      • Previewable
    • Video
      • Original
      • Previewable
    • SVG
    • PDF
    • Previewable
    • File
    • Other file type(?)
  • Delivery
    • rails_blob_url
    • Proxy (Rails.application.config.active_storage.resolve_model_to_route)
    • Proxy and CDN
    • Authenticated Controllers
  • Style
  • Test
  • Document

@goosys
Copy link
Contributor Author

goosys commented Mar 4, 2026

@pablobm @nickcharlton

I'm thinking of using this Field with relatively complex behavior as a good example of RenderableObject. What do you think?

By introducing RenderableObject like this, we can separate the logic from the view layer, allowing application developers to tweak layouts or add styles without worrying about the underlying logic.

Or do you think it would be better not to use RenderableObject here? I’d love to hear your thoughts.

@goosys goosys force-pushed the feature/field-active_storage branch from 6d5e6de to 19c0928 Compare March 4, 2026 05:34
@goosys goosys force-pushed the feature/field-active_storage branch from 19c0928 to 2a7d785 Compare March 4, 2026 06:12
@nickcharlton
Copy link
Member

Yeah, let's try RenderableObject and see how it feels. If it makes a complex change much nice, it's definitely worth it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants