<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://www.w3.org/Bugs/Public/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4"
          urlbase="https://www.w3.org/Bugs/Public/"
          
          maintainer="sysbot+bugzilla@w3.org"
>

    <bug>
          <bug_id>4342</bug_id>
          
          <creation_ts>2007-02-22 04:14:22 +0000</creation_ts>
          <short_desc>Revalidation form for Upload and Direct Input</short_desc>
          <delta_ts>2008-12-01 03:03:03 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>Validator</product>
          <component>Templates</component>
          <version>HEAD</version>
          <rep_platform>All</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P3</priority>
          <bug_severity>enhancement</bug_severity>
          <target_milestone>0.8.2</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Olivier Thereaux">ot</reporter>
          <assigned_to name="Brett Bieber">brett.bieber</assigned_to>
          <cc>aaz</cc>
          
          <qa_contact name="qa-dev tracking">www-validator-cvs</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>14041</commentid>
    <comment_count>0</comment_count>
    <who name="Olivier Thereaux">ot</who>
    <bug_when>2007-02-22 04:14:22 +0000</bug_when>
    <thetext>At the moment only the &quot;By URI&quot; validation method has, in the results page, a form to revalidate the document online.

It was suggested that:
- for &quot;direct input&quot;, the form could be given too, with the textarea pre-filled with the given data (properly escaped)

- for &quot;file upload&quot;, the form could be given, with an empty file field and a note that it has to be set again.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>14662</commentid>
    <comment_count>1</comment_count>
    <who name="Olivier Thereaux">ot</who>
    <bug_when>2007-04-04 04:08:07 +0000</bug_when>
    <thetext>Won&apos;t make it for 0.8.0.
Maybe for a 0.8.x</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>16358</commentid>
    <comment_count>2</comment_count>
      <attachid>484</attachid>
    <who name="Brett Bieber">brett.bieber</who>
    <bug_when>2007-09-05 02:20:00 +0000</bug_when>
    <thetext>Created attachment 484
template patch for bug 4342

A couple changes, always populate the file source, and always show the encoding and doctype dropdowns. One possible problem is the content within the textarea has an added newline character to the last line -- usually not a problem.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>16361</commentid>
    <comment_count>3</comment_count>
    <who name="Olivier Thereaux">ot</who>
    <bug_when>2007-09-05 08:30:03 +0000</bug_when>
    <thetext>(In reply to comment #2)
&gt; Created an attachment (id=484) [edit]
&gt; template patch for bug 4342

Excellent! Your patch looks good, I applied it a few minutes ago.
(I&apos;m &quot;giving&quot; the bug to you ;) as a result)
 
&gt; A couple changes, always populate the file source

I made a little patch to this, to not pass the file source to the template object if not needed (so as to save a bit of proc/memory footprint).

One thing that surprised me in your implementation is that you give the source as direct input even in the case of file upload. Was this a deliberate choice?

I guess it would make sense from usability perspective, since at least a textarea can be pre-filled with the content while a file upload control could not. It just might be a little surprising, and I can imagine some hairy issues (related to XML detection or charset), but this may be a good compromise nevertheless.

Working in this area could also be an opportunity to clean up the usage of $File-&gt;{&apos;Is Upload&apos;} and $File-&gt;{&apos;Direct Input&apos;}. I can&apos;t understand why the former is TRUE when the input mode actually is &quot;Direct input&quot;. </thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>16387</commentid>
    <comment_count>4</comment_count>
    <who name="Brett Bieber">brett.bieber</who>
    <bug_when>2007-09-05 20:00:43 +0000</bug_when>
    <thetext>(In reply to comment #3)
&gt; I made a little patch to this, to not pass the file source to the template
&gt; object if not needed (so as to save a bit of proc/memory footprint).

Ahh yes, very good.
 
&gt; One thing that surprised me in your implementation is that you give the source
&gt; as direct input even in the case of file upload. Was this a deliberate choice?

Not deliberate... but the &apos;File Upload&apos; results page suffers from the same problem Alastair McKenzie noted, no easy way to re-validate the file.

&gt; I guess it would make sense from usability perspective, since at least a
&gt; textarea can be pre-filled with the content while a file upload control could
&gt; not. It just might be a little surprising, and I can imagine some hairy issues
&gt; (related to XML detection or charset), but this may be a good compromise
&gt; nevertheless.

This may be the best compromise --- I find copying and pasting the content easier than a file choosing window, but I&apos;m sure some will want the file upload interface again. We could provide a file input to choose the file again...? 

&gt; Working in this area could also be an opportunity to clean up the usage of
&gt; $File-&gt;{&apos;Is Upload&apos;} and $File-&gt;{&apos;Direct Input&apos;}. I can&apos;t understand why the
&gt; former is TRUE when the input mode actually is &quot;Direct input&quot;. 
&gt; 

Right, this is somewhat confusing, and even now on file upload results the &lt;th&gt; left of the textarea states &quot;Direct Input&quot; instead of &quot;File&quot; (regression?).

Hard to predict what people will find more useful, a textarea populated with the content or a blank file input. I suspect most users would expect a input for file upload --- and then complain that it wasn&apos;t automatically populated with the file they chose in the previous screen.   :-)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>16450</commentid>
    <comment_count>5</comment_count>
    <who name="Olivier Thereaux">ot</who>
    <bug_when>2007-09-11 05:17:05 +0000</bug_when>
    <thetext>(In reply to comment #4)
&gt; Not deliberate... but the &apos;File Upload&apos; results page suffers from the same
&gt; problem Alastair McKenzie noted, no easy way to re-validate the file.
&gt; 
&gt; Hard to predict what people will find more useful, a textarea populated with
&gt; the content or a blank file input. I suspect most users would expect a input
&gt; for file upload --- and then complain that it wasn&apos;t automatically populated
&gt; with the file they chose in the previous screen.   :-)

Right. I actually think that most people would be happier with a pre-filled textarea than an empty file input, but I&apos;m  always wary of pretending to know what people want. If people are using file upload in the first place, maybe they prefer file upload...

For now, I think I want to clean up the $File-&gt;{&apos;Is Upload&apos;} and $File-&gt;{&apos;Direct Input&apos;} mess, and survey the list for opinions (knowing full well that the list is not entirely representative of all the users, but that&apos;s a pool of users nonetheless). Then we can decide which way to go. 

Delaying the 0.8.2 release a few days for this won&apos;t be too much of an issue.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>16451</commentid>
    <comment_count>6</comment_count>
    <who name="Olivier Thereaux">ot</who>
    <bug_when>2007-09-11 05:19:10 +0000</bug_when>
    <thetext>I also modified the template to use the POST method when revalidating through the textarea. Doing this with GET would be problematic.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>16476</commentid>
    <comment_count>7</comment_count>
    <who name="Olivier Thereaux">ot</who>
    <bug_when>2007-09-12 06:16:13 +0000</bug_when>
    <thetext>(In reply to comment #5)
&gt; For now, I think I want to clean up the $File-&gt;{&apos;Is Upload&apos;} and
&gt; $File-&gt;{&apos;Direct Input&apos;} mess

Done in CVS. In Upload mode the form shows a file upload control, in direct input, it shows the source in a textarea. I&apos;ll post something to survey for opinions/ideas.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>16496</commentid>
    <comment_count>8</comment_count>
    <who name="Brett Bieber">brett.bieber</who>
    <bug_when>2007-09-12 13:37:04 +0000</bug_when>
    <thetext>Thanks Olivier.. everything looks great. Feel free to close when you&apos;re ready, otherwise I&apos;ll wait for feedback to your post on the list - then close when a consensus is reached.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>17011</commentid>
    <comment_count>9</comment_count>
    <who name="Olivier Thereaux">ot</who>
    <bug_when>2007-10-03 08:19:36 +0000</bug_when>
    <thetext>Seeing no objection (no opinion at all actually) for now on the mail thread, I&apos;ll close this. Let&apos;s revisit when/if the public release provides us with more feedback.

</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>484</attachid>
            <date>2007-09-05 02:20:00 +0000</date>
            <delta_ts>2007-09-05 02:20:00 +0000</delta_ts>
            <desc>template patch for bug 4342</desc>
            <filename>validator_4342.patch.txt</filename>
            <type>text/plain</type>
            <size>3987</size>
            <attacher name="Brett Bieber">brett.bieber</attacher>
            
              <data encoding="base64">IyMjIEVjbGlwc2UgV29ya3NwYWN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