If you add the file-names and line numbers, I'm all for it.
Don Z.
On 4/24/2011 7:22 PM, Domizio Demichelis wrote:
Yes, I fixed it locally and... it's still a big big mess even without
escaping. :-)
I have a better idea: a Firebug extension. When you select any node in
the HTML view panel, you could have another panel on the side (like
the style panel) showing the hierarchy of def and calls that concurred
to generate that output.
Let's see whether I find any supporter ;-)
ciao
dd
On Sun, Apr 24, 2011 at 7:00 PM, Donald R. Ziesig <[email protected]
<mailto:[email protected]>> wrote:
Hi Domizio, et. al.,
Now you see why I complained :-) . I tried it and could not use
it because of all the (as you said it) soup (great word)!
I spent a few minutes editing the pre31 generators to put the line
<% if Rails.env == 'development' %> <p
class="dryml_file">"#{__FILE__}, #{__LINE__}"</p> <% end %>
at strategic places where it really helps. Unfortunately, I found
that it was translated in some cases to
<p class="dryml_file">"#{__FILE__}, #{__LINE__}"</p>
during the auto generation - this only was a problem when I
transitioned to production mode to help out my beta testers with a
faster site. The file trace output remained wherever I had to
copy the auto/rapid code into my views/zzz directories to
customize the appearance. This means that in those cases I'll
have to find the <p ... /p> lines and replace them with <% if ...
end %> code before I finally deploy the new site to replace the
original site.
This is rather a "brute-force" update (and I'll have to repeat it
when pre?? or later comes out) so fixing the escape of the
meta-comments and introducing a way of showing only (for example)
the file name and line number would still be useful (IMHO) as
shown in the attached screenshot.
Donz
On 4/24/2011 4:48 PM, Domizio Demichelis wrote:
I tried it for the first time today, and IMO it is absolutely
impossible to take ANY advantage from it. Indeed it escapes
the meta-
comments so you have all that soup in the page output itself! :-)
Bryan, since you talk about hiding the comments easily, I
suspect you
used it with an old rails that was not escaping them.
ciao
dd
On Apr 14, 11:49 am, "Donald R. Ziesig"<[email protected]
<mailto:[email protected]>> wrote:
In case it got lost in my text, the problem I saw was
acres ;-) of
RENDERED html comments, complete with local styles,
interspersed with a
few square inches of my page's content. It sounds like
you guys are
seeing html comments that are not rendered, but are
viewable in
firebug. The 'official' page content was lost in the
comments.
Don Z.
On 4/14/2011 11:40 AM, Domizio Demichelis wrote:
A simple Hobo page I looked at had 189 DRYML|def
comments using
the below tip
Indeed that is the source of the mess :-).
Firebug shows the html only after you click on a node,
so the ideal
behaviour for dryml meta-info would be teh possibility
to selectively
show only the meta info you are interested in. I have
posted in the
firebug forum to ask what is the simplest way to
achieve that.
ciao
dd
On Thu, Apr 14, 2011 at 10:02 AM, Bryan
Larsen<[email protected]
<mailto:[email protected]>
<mailto:[email protected]
<mailto:[email protected]>>> wrote:
Very Nice.
A simple Hobo page I looked at had 189 DRYML|def
comments using
the below tip, so I think it's much more useful
mixed into the
source to provide context. But not messing with
the source is
very appealing -- it's probably worth looking in to.
Bryan
On 11-04-14 09:49 AM, Domizio Demichelis wrote:
I didn't thought about Firebug, but now that
you mention it...
it would
be VERY interesting using something like this
very new Firebug
extension
in order to add also DRYML specific info!
https://addons.mozilla.org/en-US/firefox/addon/railsbug/
Take a look at the templates tab (3rd screenshot)
ciao
dd
On Thu, Apr 14, 2011 at 9:10 AM, Bryan Larsen
<[email protected]
<mailto:[email protected]><mailto:[email protected]
<mailto:[email protected]>>
<mailto:[email protected]
<mailto:[email protected]>
<mailto:[email protected]
<mailto:[email protected]>>>> wrote:
Use it for a while, I suspect you'll
eventually find it
very useful.
It goes a long way towards turning Hobo
magic into Hobo
science.
Yes, it clutters up a standard view-source
quite a bit, but
firebug
or any other tree structured viewer makes
it very easy to
navigate.
Firebug will even let you hide all comments
easily.
For instance, you may find the close indicators
unnecessary, but
they are also very useful in determining
the actually
hierarchy that
Hobo used.
Bryan
On 11-04-14 08:35 AM, Donald R. Ziesig wrote:
Bryan,
Thanks for the tip!
Unfortunately, when I tried it I got
many html
comments, as in:
<!--[DRYML|def|login-page|50|/usr/local/lib/ruby/gems/1.8/gems/hobo-1.3.0.pre31/lib/hobo/rapid/taglibs/rapid_user_pages.dryml[-->
<!--[DRYML|call|simple-page|52|/usr/local/lib/ruby/gems/1.8/gems/hobo-1.3.0.pre31/lib/hobo/rapid/taglibs/rapid_user_pages.dryml[--><!--[DRYML|def|simple-page|4|/usr/local/lib/ruby/gems/1.8/gems/hobo-1.3.0.pre31/lib/hobo/rapid/taglibs/rapid_user_pages.dryml[-->
<!--[DRYML|call|page|5|/usr/local/lib/ruby/gems/1.8/gems/hobo-1.3.0.pre31/lib/hobo/rapid/taglibs/rapid_user_pages.dryml[--><!--[DRYML|def|page|11|app/views/taglibs/application.dryml[-->
<!--[DRYML|call|old-page|12|app/views/taglibs ...
rendered along with my normal output;
so many that the
view was
pretty
much useless.
Not knowing of any dryml editors, I used:
DRYML_EDITOR=abc
export DRYML_EDITOR
as the enabling definition. (I did hunt
through the
code for
references
to DRYML_EDITOR to see if there was
something of use
there, but only
found a definition of code_editor which
was not used
anywhere
else, so I
had to presume that any non-blank value
of DRYML_EDITOR was
sufficient).
Any idea of what I did wrong?
Don Z.
P.S. Your reply below crossed in the
mail with my reply
to Domizio
outlining a crude but effective mod to
the dryml
templates. I saw it
yesterday, but had to start the
installation of 3000 ft
of CAT6
cable in
our new office so had to wait till
today to try it.
On 4/13/2011 1:39 PM, Bryan Larsen wrote:
Such a simple solution to a major
pain point. So I
thought
to myself,
"there must be a reason it hasn't
been done.". So I
went
into Hobo to
try and hack it in and see what
happens.
When I got to the right place, I
found this in
dryml/template.rb:
def include_source_metadata
# disabled for now -- we're still
getting broken
rendering
with this
feature on
return false
@include_source_metadata = RAILS_ENV ==
"development"&&
!ENV['DRYML_EDITOR'].blank? if
@include_source_metadata.nil?
@include_source_metadata
end
I commented out the "return false"
and set the
DRYML_EDITOR
variable
in my environment, and it seems to
work fine. Give
it a try
and let me
know if it breaks anything!
cheers,
Bryan
P.S. Please don't start new message
by replying to
an old
one unless
it's actually a reply. Many of us
have properly
nested email
readers,
so your message becomes hidden in
the other thread.
--
You received this message because you are
subscribed to the
Google
Groups "Hobo Users" group.
To post to this group, send email to
[email protected]
<mailto:[email protected]><mailto:[email protected]
<mailto:[email protected]>>
<mailto:[email protected]
<mailto:[email protected]>
<mailto:[email protected]
<mailto:[email protected]>>>.
To unsubscribe from this group, send email to
[email protected]
<mailto:hobousers%[email protected]>
<mailto:hobousers%[email protected]
<mailto:hobousers%[email protected]>>
<mailto:hobousers%[email protected]
<mailto:hobousers%[email protected]>
<mailto:hobousers%[email protected]
<mailto:hobousers%[email protected]>>>.
For more options, visit this group at
http://groups.google.com/group/hobousers?hl=en.
--
You received this message because you are subscribed
to the Google
Groups "Hobo Users" group.
To post to this group, send email to
[email protected]
<mailto:[email protected]>.
To unsubscribe from this group, send email to
[email protected]
<mailto:hobousers%[email protected]>.
For more options, visit this group at
http://groups.google.com/group/hobousers?hl=en.
--
You received this message because you are subscribed to the Google
Groups "Hobo Users" group.
To post to this group, send email to [email protected]
<mailto:[email protected]>.
To unsubscribe from this group, send email to
[email protected]
<mailto:hobousers%[email protected]>.
For more options, visit this group at
http://groups.google.com/group/hobousers?hl=en.
--
You received this message because you are subscribed to the Google
Groups "Hobo Users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/hobousers?hl=en.
--
You received this message because you are subscribed to the Google Groups "Hobo
Users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/hobousers?hl=en.