Progressbar: a new tiny widget added to the rails-widgets

Posted by Jacopo Murador Sat, 01 Nov 2008 12:35:00 GMT

Paolo has just released a brand new widget. He has taken the Tobias Lukte’s super-simple-css-bars and has wrapped it in an helper following the rails-widgets way. You can take a look at the result here.

Besides the new widget, we’ve officially moved the rails-widgets project to Github. We’ve chosen Paolo’s Github account, given that he’s the real father of the project:

http://github.com/paolodona/rails-widgets

This change is due to the easy to use collaboration features provided by Github and… honestly, to a strange disappearance of the rails-widgets google group, which made us doubt a bit about it. Anyway our purpose is to involve as many people as possible to improve the project. So feel free to contribute, you just need to have a github account. Even a small comment or a snippet of code are more than welcome!

Socialize it: Add to del.icio.us Digg it! Technorati: Progressbar: a new tiny widget added to the rails-widgets Add to reddit.com

Posted in  | Tags  | no comments

Widgets repo has changed!

Posted by Paolo Wed, 05 Mar 2008 03:47:00 GMT

From now on you can download and install the Rails Widgets Plugin from its Google Code Project.

To install use: script/plugin install http://rails-widgets.googlecode.com/svn/widgets

That’s the stable tag which will be constantly updated. If you feel brave you can also install it from the trunk: script/plugin install http://rails-widgets.googlecode.com/svn/trunk or help us improve it.

Socialize it: Add to del.icio.us Digg it! Technorati: Widgets repo has changed! Add to reddit.com

Posted in  | Tags  | 1 comment | no trackbacks

Opening up the Rails Widgets Plugin repo

Posted by Paolo Mon, 25 Feb 2008 16:26:00 GMT

The Rails Widgets plugin is our most successful open-source effort so far. Lately its development has been put a bit aside and hasn’t got the love it surely deserve. This is mainly because this little piece of software is pretty stable and just suits our needs.

But of course it could be improved, more widgets could be added and the code could be refactored. Why should our own needs stop its development? There are many people on the Widgets Users Mailing List who come up with great ideas about its development so we finally decided to open up the repo and let this plugin find its way through the community!

The repo is now officially hosted on Google Code at http://code.google.com/p/rails-widgets and a brand new Developers Mailing List has been set up to coordinate the development efforts.

We’re willing to find new committers who share our vision about the plugin and help us take it to the next level, so if you’re interested, feel free to join us!

Hope you enjoy it!

Socialize it: Add to del.icio.us Digg it! Technorati: Opening up the Rails Widgets Plugin repo Add to reddit.com

Posted in  | Tags ,  | 1 comment | no trackbacks

A Google Group for Widgets Users

Posted by Paolo Tue, 30 Oct 2007 17:51:00 GMT

Hi guys, we’re receiving many emails regarding our beloved Widgets plugin. We’re happy to receive them but we’d like to keep the discussion open, because so far it’s been like a one-to-many chat.

That’s why we just opened a Google Group about it. You can subscribe and start asking questions, share ideas about new widgets and give us feedback.

Subscribe to SeeSaw's Rails Widgets Users
Email:
Visit this group

Hope you join the group and enjoy it!

Paolo

Socialize it: Add to del.icio.us Digg it! Technorati: A Google Group for Widgets Users Add to reddit.com

Posted in  | Tags  | no comments | no trackbacks

First version of the tooltips widget

Posted by Paolo Sat, 13 Oct 2007 17:48:00 GMT

Hey guys, today I’ve got a little gift for you! A new widget is ready to be tested by the crowd: Tooltips!

So you want to write something like this:

My first tooltip: 

<% tooltip do %>
  <b>Woot, woot, woot!</b><br/>
  Wow, those lousy tooltips are finally ready!<br/>
<% end %>

And get something like this:

All this goodness is available to you just doing:

ruby script/plugin install svn://svn.seesaw.it/widgets/trunk

Btw, there is some magic happening here, let’s see:

  1. Where is the question mark image taken from? It’s automatically copied into your public/images/widgets folder during plugin installation!
  2. Where is the javascript file that handles everything taken from? It’s automatically copied into your public/javascripts/widgets folder during installation, and you don’t even need to include it with javascript_include_tag because I’ve hacked it for you!
  3. Where’s the CSS? It’s automagically inlined in your HTML, you can customize it of course.

It’s an early stage release so please report any bug you will find.

NB: As I said some code gets executed on plugin installation so please install with script/plugin install, just unpacking the plugin under vendor/plugins doesn’t work as expected (you’ll miss necessary images and javascripts).

Have fun!

Socialize it: Add to del.icio.us Digg it! Technorati: First version of the tooltips widget Add to reddit.com

Posted in  | Tags ,  | 5 comments | no trackbacks

What changes in the new Widgets Tabnav?

Posted by Paolo Mon, 03 Sep 2007 14:14:00 GMT

Hi guys, I just gotten back from my one-week vacation in Egypt and imagine what I found on my email inbox? Wow… a bunch of people are giving us feedback on the new Tabnav widget just a few days after its public release.

So let’s dig some changes between the old version and the new one:

Tabnav didn’t highlight with URLs beginning with a slash

Let’s consider this scenario:

add_tab do |t|
  t.named 'Cat'
  t.links_to :controller => '/cats'
end 

This didn’t correctly highlight on :controller => 'cats' beacuse of the leading slash of the controller parameter. Now thanks to Cédric Deltheil this issue as been solved. I’ve never experienced this problem myself… It’s difficult to fix something if you don’t know it’s broken :-) (Cédric pointed me to an old Peter Salomon comment rearding this issue. I didn’t get notified about that comment… so I apologize. I start hating typo, I promise we’ll move to a new blogging system soon).

Where’s my beloved show_if method?

show_if was a very useful method in the old Tabnav. You could set a condition to show or hide specific tabs (eg Administration tabs). Well, we got rid of that. With the new Widgets version the Tabnav definition is backed up by a partial, no more a specific model. That allows us to use pure ruby conditional code to add tabs whenever we want to. And that’s just because the tabnav definition gets reevaluated for every request.

One example is better that a thousand words: look at the if modifier at the end of the 2nd tab:

<% 
render_tabnav :main, :generate_css => true do
    add_tab do |t|
        t.named 'Home'
        t.links_to :controller => 'home'
    end

    add_tab do |t| 
        t.named 'Users'
        t.links_to :controller => 'users'
    end if current_user.admin?
end
%> 

You can also enclose one or more add_tab inside a if/unless block like this:

if @admin
  add_tab do |t| 
        t.named 'Users'
        t.links_to :controller => 'users'
  end 

  add_tab do |t| 
        t.named 'Customers'
        t.links_to :controller => 'customers'
  end 
end

It’s clear now that the show_if method wasn’t really necessary and was difficult to use because of the procs. Now you can just use your view’s params/variables/helpers as conditions.

True dynamic tabs

The facts that Tabnav is now a helper leads to another big improvement. You can now have true dynamic tabs. The default generated Tabnav now generates something like this:

render_tabnav :main, 
              :generate_css => true do 

  controller_names.each do |name|
    add_tab do |t|
      t.named name.camelize
      t.titled "Go to #{name.camelize}"
      t.links_to :controller => name
    end
  end

end 

What does that mean? It dynamically generates a tab for every controller, just like the scaffold does with column names! Of course you’ve got to customize that, but it shows the power that this version brings to you.

You can now have a tab for every user like 37signals’s Highrise does! Just imagine something like this:

render_tabnav :contacts, 
              :generate_css => true do 

  @contacts.each do |contact|
    add_tab do |t|
      t.named contact.name
      t.links_to :controller => 'contacts', :action => 'show', :id => contact.id
    end
  end

end 

No more start/end

Another little improvement: Tabnav’s content are now specified as a block.

# old version
<%= start_tabnav :main %>
  ...
<%= end_tabnav %>

#new widget version
<% tabnav :main do %>
  ...
<% end %>

It’s just a lot more Rubysh now… Hope you enjoy the improvements. If you experience issues just drop us a line.

A big thank you to Cédric Deltheil, Mark Swinson, Denis Bruléand and Glenn West for their feedback!

Socialize it: Add to del.icio.us Digg it! Technorati: What changes in the new Widgets Tabnav? Add to reddit.com

Posted in  | Tags , , ,  | 5 comments | no trackbacks

Older posts: 1 2


SeeSaw srl - Via Monte Pasubio, 8 37126 Verona - tel +39 045 4857457 fax 045 4851151 P.Iva 03609790237