Last Comment Bug 333029 - XBLize xf:message
: XBLize xf:message
Status: RESOLVED FIXED
: fixed1.8.0.5, fixed1.8.1
Product: Core Graveyard
Classification: Graveyard
Component: XForms (show other bugs)
: Trunk
: All All
: -- normal (vote)
: ---
Assigned To: Olli Pettay [:smaug] (way behind * queues, especially ni? queue)
: Stephen Pride
:
Mentors:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2006-04-06 11:35 PDT by Olli Pettay [:smaug] (way behind * queues, especially ni? queue)
Modified: 2016-07-15 14:46 PDT (History)
3 users (show)
See Also:
QA Whiteboard:
Iteration: ---
Points: ---


Attachments
like this. (25.39 KB, patch)
2006-04-06 11:51 PDT, Olli Pettay [:smaug] (way behind * queues, especially ni? queue)
no flags Details | Diff | Splinter Review
using hasBoundNode, not getValue (25.37 KB, patch)
2006-04-06 12:31 PDT, Olli Pettay [:smaug] (way behind * queues, especially ni? queue)
no flags Details | Diff | Splinter Review
"testcase" (2.64 KB, application/xhtml+xml)
2006-04-10 08:02 PDT, Allan Beaufour
no flags Details
"testcase" 2 (2.91 KB, application/xhtml+xml)
2006-04-10 09:24 PDT, Olli Pettay [:smaug] (way behind * queues, especially ni? queue)
no flags Details
better styling (25.57 KB, patch)
2006-04-10 09:27 PDT, Olli Pettay [:smaug] (way behind * queues, especially ni? queue)
allan: review+
doronr: review+
Details | Diff | Splinter Review

Description Olli Pettay [:smaug] (way behind * queues, especially ni? queue) 2006-04-06 11:35:03 PDT
XBLize xf:message.
Comment 1 Olli Pettay [:smaug] (way behind * queues, especially ni? queue) 2006-04-06 11:51:00 PDT
Created attachment 217455 [details] [diff] [review]
like this.

This makes message to inherit delegatestub. This way SNB is easy to handle.
The UI part is implemented in XBL.
Comment 2 Olli Pettay [:smaug] (way behind * queues, especially ni? queue) 2006-04-06 12:31:53 PDT
Created attachment 217464 [details] [diff] [review]
using hasBoundNode, not getValue
Comment 3 Allan Beaufour 2006-04-10 05:04:11 PDT
Comment on attachment 217464 [details] [diff] [review]
using hasBoundNode, not getValue

> Index: nsXFormsMessageElement.cpp
> ===================================================================

>  NS_IMETHODIMP
>  nsXFormsMessageElement::WillChangeDocument(nsIDOMDocument *aNewDocument)
>  {
>    if (mDocument) {
>      if (mEphemeralTimer) {
> @@ -314,25 +244,26 @@ nsXFormsMessageElement::WillChangeDocume
>      // If we are currently trying to load an external message, cancel the
>      // request.
>      if (mChannel) {
>        mChannel->Cancel(NS_BINDING_ABORTED);
>      }
>    }
 
>    mDocument = aNewDocument;
> +  nsXFormsDelegateStub::WillChangeDocument(aNewDocument);
>    return NS_OK;
>  }
 
>  NS_IMETHODIMP
>  nsXFormsMessageElement::OnDestroyed()
>  {
> -  mElement = nsnull;
> -  mVisualElement = nsnull;
>    mChannel = nsnull;
> +  mDocument = nsnull;
> +  nsXFormsDelegateStub::OnDestroyed();
>    return NS_OK;
>  }

Shouldn't you return the error values from the superclasses in both of these functions?
 
> Index: resources/content/xforms.css
> ===================================================================

> +message[level="ephemeral"] > html|div.-moz-xforms-message-container,
> +hint > html|div.-moz-xforms-message-container {
> +  background-color: InfoBackground;
> +  color: InfoText;
> +  padding: 2px 3px;
> +  font: message-box;
> +  border: 1px black solid;
> +  position: absolute !important;
> +  z-index: 2147483647;
> +  width: auto;
> +  height: auto;
> +  display: inherit;
>  }

Do we want all this default styling? Until now our styling has been minimal for all controls. An empty message also show up as a small black box with this.
<xforms:message level="ephemeral"/>
Could previously be used to clear any currently shown ephemeral message.
Comment 4 Olli Pettay [:smaug] (way behind * queues, especially ni? queue) 2006-04-10 06:20:01 PDT
(In reply to comment #3)
> 
> Shouldn't you return the error values from the superclasses in both of these
> functions?

Oh, yes.

> 
> Do we want all this default styling?
Yes, the default should IMO look like normal tooltip.

> Until now our styling has been minimal for
> all controls. An empty message also show up as a small black box with this.
> <xforms:message level="ephemeral"/>
> Could previously be used to clear any currently shown ephemeral message.
> 
Oh, I didn't know this :) Couldn't you still make
this using message[level="ephemeral"] { display: none;}  ?


Comment 5 Allan Beaufour 2006-04-10 07:46:37 PDT
(In reply to comment #4)
> (In reply to comment #3)
> > 
> > Do we want all this default styling?
>
> Yes, the default should IMO look like normal tooltip.

Hmmm.
 
> > Until now our styling has been minimal for
> > all controls. An empty message also show up as a small black box with this.
> > <xforms:message level="ephemeral"/>
> > Could previously be used to clear any currently shown ephemeral message.
> > 
> Oh, I didn't know this :) Couldn't you still make
> this using message[level="ephemeral"] { display: none;}  ?

Then all my messages would disappear. Yes, problem solved ;-)

How about at least having an appearance="minimal" version without all the styling?
Comment 6 Allan Beaufour 2006-04-10 08:02:30 PDT
Created attachment 217852 [details]
"testcase"

Here's an example of trying to style the messages
Comment 7 Olli Pettay [:smaug] (way behind * queues, especially ni? queue) 2006-04-10 08:52:26 PDT
(In reply to comment #5)
> (In reply to comment #4)
> > Oh, I didn't know this :) Couldn't you still make
> > this using message[level="ephemeral"] { display: none;}  ?
> 
> Then all my messages would disappear. Yes, problem solved ;-)
> 

Äh, <message class="hide">
.hide {
  display: none;
}
Comment 8 Olli Pettay [:smaug] (way behind * queues, especially ni? queue) 2006-04-10 09:24:30 PDT
Created attachment 217868 [details]
"testcase" 2
Comment 9 Olli Pettay [:smaug] (way behind * queues, especially ni? queue) 2006-04-10 09:27:24 PDT
Created attachment 217871 [details] [diff] [review]
better styling
Comment 10 Allan Beaufour 2006-04-11 02:02:53 PDT
Comment on attachment 217871 [details] [diff] [review]
better styling

Much better. r=me
Comment 11 Olli Pettay [:smaug] (way behind * queues, especially ni? queue) 2006-04-17 06:07:14 PDT
Checking in Makefile.in;
/cvsroot/mozilla/extensions/xforms/Makefile.in,v  <--  Makefile.in
new revision: 1.56; previous revision: 1.55
done
RCS file: /cvsroot/mozilla/extensions/xforms/nsIXFormsEphemeralMessageUI.idl,v
done
Checking in nsIXFormsEphemeralMessageUI.idl;
/cvsroot/mozilla/extensions/xforms/nsIXFormsEphemeralMessageUI.idl,v  <--  nsIXFormsEphemeralMessageUI.idl
initial revision: 1.1
done
Checking in nsXFormsMessageElement.cpp;
/cvsroot/mozilla/extensions/xforms/nsXFormsMessageElement.cpp,v  <--  nsXFormsMessageElement.cpp
new revision: 1.19; previous revision: 1.18
done
Checking in resources/content/xforms.css;
/cvsroot/mozilla/extensions/xforms/resources/content/xforms.css,v  <--  xforms.css
new revision: 1.28; previous revision: 1.27
done
Checking in resources/content/xforms.xml;
/cvsroot/mozilla/extensions/xforms/resources/content/xforms.xml,v  <--  xforms.xml
new revision: 1.33; previous revision: 1.32
done

Note You need to log in before you can comment on or make changes to this bug.