Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

125 lines (83 sloc) 5.903 kB

1.3.2

  • Limit Cells to < 4.0.0. This is the last release of Apotomo, it will be superceded by cells-widget.

1.3.1

  • Fix the routing problem with Rails 4.2.

1.3.0

  • Removed `Widget::DEFAULT_VIEW_PATHS`. This makes it compatible with Cells 3.11.

1.2.6

  • Upgrade to newest hooks and uber, fixing `uninitialized constant Hooks::InheritableAttribute ` (fixes #144).

1.2.5

  • Introduce #widget_tag helper allowing you to wrap widget content in an arbitrary tag. Extends #widget_div.

1.2.4

  • Make it work with Rails 4.

1.2.3

  • Maintenance release to make happy people happy.

1.2.2

  • Derive Apotomo::Widget from Cell::Rails now to make it compatible with 3.8.

1.2.1

Changes

  • Save the @options hash in the constructor since we cannot rely on cells anymore.

1.2.0

Changes

  • The Widget.new constructor now expects the parent widget as first argument (except for the root widget, which still gets the damned ActionController instance). Nobody needed orphaned widgets so far so we decided to make it simpler. This makes the #<< method a DSL-method, only.
  • You can now access the root widget instance (or any other parent widget) in any subsequent has_widgets block. This fixes a famous issue and makes the :passing option work as expected at every tree level.
  • The #widget shortcut method no longer returns a valid widget instance but a DSL-specific thing. Use the real constructor form if you need it right away (MouseWidget.new(parent, :kid)) or access the instance afterwards (root[:kid]).
  • Removed the after_add hook. Now that adding happens in the constructor, hook into after_initialize.
  • Removed #param in favor of #options.
  • Removed #emit in favor of #render.
  • Removed #remove_all! and #remove_from_parent!. Did you ever use these?

1.1.4

Changes

  • New signature: TestCase#trigger(type, source, options). This method no longer messes around with the widget’s options hash but simply passes any additional options to evt#data. Also, the event source is now the required second argument.
  • We now got TestCase#view_assigns to access instance variables from the last rendered widget.

1.1.1

Additions

  • You can now attach event handlers to other widgets simply by using the :passing option: responds_to_event :click, :passing => :root.
  • If you want to debug events, just include the (WIP) apotomo/debugging file and watch your server output on the console.

Changes

  • Widget.responds_to_event is inheritable now.
  • The generator now places namespaced widgets into the correct sub-directories.

Removals

  • Removed the alias Widget.respond_to_event, please use Widget.responds_to_event.

1.1

Changes

  • Widgets now reside in app/widgets/ and have the Widget appendix per convention, identical to cells and controllers. This introduces the following changes, illustrated with an imaginary CommentsWidget:
    • widget(:comments, ...) will search and instantiate CommentsWidget (note the missing “Widget”).
    • The CommentsWidget views are searched in app/widgets/comments/ (note the missing “_widget”).
  • Including Apotomo::Rails::ControllerMethods by hand is optional. The first call to Controller.has_widgets will include the real module.
  • You can now #render_widget in your widget views to render children.
  • #widget now accepts one arg only (the widget prefix). widget(:comments) sets id to :comments. We also removed the start state argument.
  • Start states are no longer accepted, you have to explicitely pass the state to #render_widget. That’s why #invoke now requires an explicit state as well.
  • #replace/#update now append a ; to the JavaScript expression. You may pass an arbitrary selector string as first argument (optional).
  • The event is no longer added to #options at triggering time.
  • Options passed in #render_widget are no longer merged with #options. They are passed as state-args to reduce complexity.
  • We no longer have @opts and @params but #options and #params from Cell::Base.
  • The params hash is appended to the event in RequestProcessor#process_for. You can now live completely without accessing the global #params.
  • #respond/#update with :selector does not longer prefix the selector with #. It’s up to you.
  • Event delegates #[] to #data.

Removals

  • Removed #param, it is simply too complex.
  • Removed render :render_children and :invoke options. Use #render_widget in your state/view.
  • Removed render :suppress_js as it was ugly and kills children.
  • Removed #jump_to_state and #last_state.
  • Removed `@cell`, now longer available in state views.
  • Removed #cell, #container and #section widget shortcuts.
  • Removed rendered_children local in views. Use #render_widget.
  • Removed ContainerWidget, nobody needs it.

Bugfixes

  • Widget.responds_to_event no longer shares its options with multiple widget instances of the same class.

1.0.4

Bugfixes

  • Caching states works, again. Thanks to Gudleik Rasch for spotting.
  • We cleanly require cells-3.4.x now. Thanks to Ryan Bates who remarked that Apotomo 1.0.x tries to require cells-3.5, which was wrong.

Notes

  • Removed the usage of state-args. If you want the event instance in your triggered state, use @opts[:event] or upgrade to apotomo-1.1.

1.0.3

Bugfixes

  • fixed gemspec to not require useless gem dependencies.

1.0.2

Changes

  • removals from ViewHelper: #trigger_event, #form_to_event and friends as they use deprecated Rails helpers.

Bugfixes

  • Widget#fire now accepts payload data for the fired event.
  • triggered states now receive the event object if they expect one argument.
Jump to Line
Something went wrong with that request. Please try again.