Home » Eclipse Projects » Platform - User Assistance (UA) » Context sensitive help: If only one topic, go straight to it.
Context sensitive help: If only one topic, go straight to it. [message #474832] |
Thu, 20 November 2008 21:43 |
Ben Vitale Messages: 247 Registered: July 2009 |
Senior Member |
|
|
I've seen a few other posts on this, but the behavior in Eclipse 3.4.1
(M20080911-1700) still seems wrong.
Consider a context with a single topic. When the user presses F1, I
would expect the help page to show immediately. It should not show the
"Related Topics" part with only a single link. From what I've seen in
various bugs and newsgroup posts, everyone is in agreement that having a
single topic should go straight to the topic.
Unfortunately this isn't happening. I stepped through the code and
stumbled across this bit in DefaultHelpUI, around line 401:
if (tray instanceof HelpTray) {
ReusableHelpPart helpPart = ((HelpTray)tray).getHelpPart();
if (context != null) {
IHelpResource[] topics = context.getRelatedTopics();
if (context.getText() == null && topics.length == 1) {
helpPart.showURL(topics[0].getHref());
}
else {
helpPart.showPage(IHelpUIConstants.HV_CONTEXT_HELP_PAGE);
helpPart.update(null, context, null, controlInFocus, true);
}
}
else {
helpPart.showPage(IHelpUIConstants.HV_FSEARCH_PAGE, true);
}
}
The concerning snippet here is:
if (context.getText() == null)
As far as I can tell, this corresponds to the "description" element on
the context. Its not clear to me why this is part of the requirement
for only a single topic to go straight to its help URL.
Taking out the description on my context does produce the correct behavior.
Is this a bug?
Thanks
Ben
|
|
|
Re: Context sensitive help: If only one topic, go straight to it. [message #474835 is a reply to message #474832] |
Thu, 20 November 2008 22:03 |
Lee Anne Kowalski Messages: 54 Registered: July 2009 |
Member |
|
|
Ben Vitale wrote:
> I've seen a few other posts on this, but the behavior in Eclipse 3.4.1
> (M20080911-1700) still seems wrong.
>
> Consider a context with a single topic. When the user presses F1, I
> would expect the help page to show immediately. It should not show the
> "Related Topics" part with only a single link. From what I've seen in
> various bugs and newsgroup posts, everyone is in agreement that having a
> single topic should go straight to the topic.
>
> Unfortunately this isn't happening. I stepped through the code and
> stumbled across this bit in DefaultHelpUI, around line 401:
>
> if (tray instanceof HelpTray) {
> ReusableHelpPart helpPart = ((HelpTray)tray).getHelpPart();
> if (context != null) {
> IHelpResource[] topics = context.getRelatedTopics();
> if (context.getText() == null && topics.length == 1) {
> helpPart.showURL(topics[0].getHref());
> }
> else {
> helpPart.showPage(IHelpUIConstants.HV_CONTEXT_HELP_PAGE);
> helpPart.update(null, context, null, controlInFocus, true);
> }
> }
> else {
> helpPart.showPage(IHelpUIConstants.HV_FSEARCH_PAGE, true);
> }
> }
>
> The concerning snippet here is:
>
> if (context.getText() == null)
>
> As far as I can tell, this corresponds to the "description" element on
> the context. Its not clear to me why this is part of the requirement
> for only a single topic to go straight to its help URL.
>
> Taking out the description on my context does produce the correct behavior.
>
> Is this a bug?
>
> Thanks
> Ben
Hi Ben,
What version of Eclipse are you seeing this in?
I found this Bugzilla entry that might be related to the behavior:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=218077
Is it the same scenario as you are seeing?
Best,
Lee Anne
|
|
|
Re: Context sensitive help: If only one topic, go straight to it. [message #474839 is a reply to message #474835] |
Fri, 21 November 2008 16:36 |
Ben Vitale Messages: 247 Registered: July 2009 |
Senior Member |
|
|
Lee Anne Kowalski wrote:
> Ben Vitale wrote:
>> I've seen a few other posts on this, but the behavior in Eclipse 3.4.1
>> (M20080911-1700) still seems wrong.
>>
>> Consider a context with a single topic. When the user presses F1, I
>> would expect the help page to show immediately. It should not show
>> the "Related Topics" part with only a single link. From what I've
>> seen in various bugs and newsgroup posts, everyone is in agreement
>> that having a single topic should go straight to the topic.
>>
>> Unfortunately this isn't happening. I stepped through the code and
>> stumbled across this bit in DefaultHelpUI, around line 401:
>>
>> if (tray instanceof HelpTray) {
>> ReusableHelpPart helpPart = ((HelpTray)tray).getHelpPart();
>> if (context != null) {
>> IHelpResource[] topics = context.getRelatedTopics();
>> if (context.getText() == null && topics.length == 1)
>> { helpPart.showURL(topics[0].getHref());
>> }
>> else {
>> helpPart.showPage(IHelpUIConstants.HV_CONTEXT_HELP_PAGE);
>> helpPart.update(null, context, null, controlInFocus, true);
>> }
>> }
>> else {
>> helpPart.showPage(IHelpUIConstants.HV_FSEARCH_PAGE, true);
>> }
>> }
>>
>> The concerning snippet here is:
>>
>> if (context.getText() == null)
>>
>> As far as I can tell, this corresponds to the "description" element on
>> the context. Its not clear to me why this is part of the requirement
>> for only a single topic to go straight to its help URL.
>>
>> Taking out the description on my context does produce the correct
>> behavior.
>>
>> Is this a bug?
>>
>> Thanks
>> Ben
>
> Hi Ben,
>
> What version of Eclipse are you seeing this in?
>
> I found this Bugzilla entry that might be related to the behavior:
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=218077
>
> Is it the same scenario as you are seeing?
>
> Best,
> Lee Anne
I'm on 3.4.1.
218077 looks like the same path that I'm identifying, but I'm still
confused. Thanks for finding it at least.
In an ideal scenario, shouldn't it be possible to:
1) Specify a description
2) Specify only a single topic
3) Have that topic open directly when F1 is pressed.
I can't decide if that's what 218077 was trying to solve. If it was,
then somebody has broken it since then.
If it's the case that a description must be *absent* in order to show
the help directly, what is the design requirement driving that?
Thanks to anyone who can help.
|
|
| | | |
Re: Context sensitive help: If only one topic, go straight to it. [message #474882 is a reply to message #474850] |
Mon, 24 November 2008 13:26 |
Ben Vitale Messages: 247 Registered: July 2009 |
Senior Member |
|
|
Scenario #1: Specify a <context> with a <description> element and a
single <topic> element. Press F1 at runtime and the "Related Topics"
page shows up, with two parts, a section at the top with a single link
to the topic, and a section at the bottom with Dynamic Help search results.
Scenario #2: Specify a <context> with NO <description> element and the
same single <topic> element as Scenario #1. Press F1 and it goes
straight to the single topic. At the bottom of the help view, there are
a set of "Go To" links, one of which says, "Related Topics". Clicking
this produces a page with Dynamic Help results.
I'm guessing Dynamic Help is using the <description> as an input to the
Dynamic Help search. So the workaround I'm looking for is a way to get
the "straight-to-topic" behavior (no <description> element), but also
allow the user to say, "OK, this topic was helpful, but what else is out
there?", and show them Dynamic Help results based off some metadata. I
guess with no <description> that would have to be a search on the
context title or topic label?
Lee Anne Kowalski wrote:
> Hi Ben,
>
> Would you clarify which page you mean by "that page does not produce any
> results"?
>
> I mean, this is what I am picturing from what you wrote:
> a. contexts.xml file does not have a <description> element.
>
> b. As a result, when the user clicks F1, it goes directly to the Help
> Contents help topic that's identified in the <topic> element of the
> contexts.xml
>
> Where are you seeing the "Related Topics" link being displayed then,
> with no results? In the Help Contents help topic page itself?
>
> --Lee Anne
>
> Ben Vitale wrote:
>> Thanks for weighing in Chris. That helps to clarify.
>>
>> If we remove the description, and then F1 opens the help directly, the
>> "Related Topics" link from that page does not produce any results. Is
>> there any way we can workaround that?
>>
>> Chris Goldthorpe wrote:
>>> That is the intended behavior. If we made every context with a single
>>> link open directly it would be a change in behavior and we would
>>> almost certainly get complaints.
>>>
>>> We need to distinguish between the case where there is a single link
>>> but the user wants the old behavior and where there is a single link
>>> which should open the topic directly. The description serves no
>>> purpose if the link is opened directly so we have made the rule that
>>> if there is a description you get the standard behavior of displaying
>>> the description and a link.
|
|
|
Re: Context sensitive help: If only one topic, go straight to it. [message #474883 is a reply to message #474882] |
Mon, 24 November 2008 14:42 |
Lee Anne Kowalski Messages: 54 Registered: July 2009 |
Member |
|
|
Hi Ben,
Thanks for clarifying the scenarios. That helps a lot.
I am under the impression that Dynamic Help was using the title
attribute on the <context> element in the contexts.xml file as the input
to its search. That doesn't explain why you'd get search results with a
description but no title--so maybe under the covers it is an OR search
expression of the title attribute and description values. In previous
releases, I think it was using a combination of the part name and
perspective name. Chris Goldthorpe would have to clarify how that part
works now in 3.4.
I think that you can also define the search expression to use in your
context provider. That allows for more sophisticated results, using
expressions and values that you control. See:
http://help.eclipse.org/ganymede/index.jsp?topic=/org.eclips e.platform.doc.isv/guide/ua_help_context_dynamic.htm
--Lee Anne
Ben Vitale wrote:
> Scenario #1: Specify a <context> with a <description> element and a
> single <topic> element. Press F1 at runtime and the "Related Topics"
> page shows up, with two parts, a section at the top with a single link
> to the topic, and a section at the bottom with Dynamic Help search results.
>
> Scenario #2: Specify a <context> with NO <description> element and the
> same single <topic> element as Scenario #1. Press F1 and it goes
> straight to the single topic. At the bottom of the help view, there are
> a set of "Go To" links, one of which says, "Related Topics". Clicking
> this produces a page with Dynamic Help results.
>
> I'm guessing Dynamic Help is using the <description> as an input to the
> Dynamic Help search. So the workaround I'm looking for is a way to get
> the "straight-to-topic" behavior (no <description> element), but also
> allow the user to say, "OK, this topic was helpful, but what else is out
> there?", and show them Dynamic Help results based off some metadata. I
> guess with no <description> that would have to be a search on the
> context title or topic label?
>
|
|
|
Re: Context sensitive help: If only one topic, go straight to it. [message #622219 is a reply to message #474832] |
Thu, 20 November 2008 22:03 |
Lee Anne Kowalski Messages: 54 Registered: July 2009 |
Member |
|
|
Ben Vitale wrote:
> I've seen a few other posts on this, but the behavior in Eclipse 3.4.1
> (M20080911-1700) still seems wrong.
>
> Consider a context with a single topic. When the user presses F1, I
> would expect the help page to show immediately. It should not show the
> "Related Topics" part with only a single link. From what I've seen in
> various bugs and newsgroup posts, everyone is in agreement that having a
> single topic should go straight to the topic.
>
> Unfortunately this isn't happening. I stepped through the code and
> stumbled across this bit in DefaultHelpUI, around line 401:
>
> if (tray instanceof HelpTray) {
> ReusableHelpPart helpPart = ((HelpTray)tray).getHelpPart();
> if (context != null) {
> IHelpResource[] topics = context.getRelatedTopics();
> if (context.getText() == null && topics.length == 1) {
> helpPart.showURL(topics[0].getHref());
> }
> else {
> helpPart.showPage(IHelpUIConstants.HV_CONTEXT_HELP_PAGE);
> helpPart.update(null, context, null, controlInFocus, true);
> }
> }
> else {
> helpPart.showPage(IHelpUIConstants.HV_FSEARCH_PAGE, true);
> }
> }
>
> The concerning snippet here is:
>
> if (context.getText() == null)
>
> As far as I can tell, this corresponds to the "description" element on
> the context. Its not clear to me why this is part of the requirement
> for only a single topic to go straight to its help URL.
>
> Taking out the description on my context does produce the correct behavior.
>
> Is this a bug?
>
> Thanks
> Ben
Hi Ben,
What version of Eclipse are you seeing this in?
I found this Bugzilla entry that might be related to the behavior:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=218077
Is it the same scenario as you are seeing?
Best,
Lee Anne
|
|
|
Re: Context sensitive help: If only one topic, go straight to it. [message #622225 is a reply to message #474835] |
Fri, 21 November 2008 16:36 |
Ben Vitale Messages: 247 Registered: July 2009 |
Senior Member |
|
|
Lee Anne Kowalski wrote:
> Ben Vitale wrote:
>> I've seen a few other posts on this, but the behavior in Eclipse 3.4.1
>> (M20080911-1700) still seems wrong.
>>
>> Consider a context with a single topic. When the user presses F1, I
>> would expect the help page to show immediately. It should not show
>> the "Related Topics" part with only a single link. From what I've
>> seen in various bugs and newsgroup posts, everyone is in agreement
>> that having a single topic should go straight to the topic.
>>
>> Unfortunately this isn't happening. I stepped through the code and
>> stumbled across this bit in DefaultHelpUI, around line 401:
>>
>> if (tray instanceof HelpTray) {
>> ReusableHelpPart helpPart = ((HelpTray)tray).getHelpPart();
>> if (context != null) {
>> IHelpResource[] topics = context.getRelatedTopics();
>> if (context.getText() == null && topics.length == 1)
>> { helpPart.showURL(topics[0].getHref());
>> }
>> else {
>> helpPart.showPage(IHelpUIConstants.HV_CONTEXT_HELP_PAGE);
>> helpPart.update(null, context, null, controlInFocus, true);
>> }
>> }
>> else {
>> helpPart.showPage(IHelpUIConstants.HV_FSEARCH_PAGE, true);
>> }
>> }
>>
>> The concerning snippet here is:
>>
>> if (context.getText() == null)
>>
>> As far as I can tell, this corresponds to the "description" element on
>> the context. Its not clear to me why this is part of the requirement
>> for only a single topic to go straight to its help URL.
>>
>> Taking out the description on my context does produce the correct
>> behavior.
>>
>> Is this a bug?
>>
>> Thanks
>> Ben
>
> Hi Ben,
>
> What version of Eclipse are you seeing this in?
>
> I found this Bugzilla entry that might be related to the behavior:
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=218077
>
> Is it the same scenario as you are seeing?
>
> Best,
> Lee Anne
I'm on 3.4.1.
218077 looks like the same path that I'm identifying, but I'm still
confused. Thanks for finding it at least.
In an ideal scenario, shouldn't it be possible to:
1) Specify a description
2) Specify only a single topic
3) Have that topic open directly when F1 is pressed.
I can't decide if that's what 218077 was trying to solve. If it was,
then somebody has broken it since then.
If it's the case that a description must be *absent* in order to show
the help directly, what is the design requirement driving that?
Thanks to anyone who can help.
|
|
| | | |
Re: Context sensitive help: If only one topic, go straight to it. [message #622613 is a reply to message #474850] |
Mon, 24 November 2008 13:26 |
Ben Vitale Messages: 247 Registered: July 2009 |
Senior Member |
|
|
Scenario #1: Specify a <context> with a <description> element and a
single <topic> element. Press F1 at runtime and the "Related Topics"
page shows up, with two parts, a section at the top with a single link
to the topic, and a section at the bottom with Dynamic Help search results.
Scenario #2: Specify a <context> with NO <description> element and the
same single <topic> element as Scenario #1. Press F1 and it goes
straight to the single topic. At the bottom of the help view, there are
a set of "Go To" links, one of which says, "Related Topics". Clicking
this produces a page with Dynamic Help results.
I'm guessing Dynamic Help is using the <description> as an input to the
Dynamic Help search. So the workaround I'm looking for is a way to get
the "straight-to-topic" behavior (no <description> element), but also
allow the user to say, "OK, this topic was helpful, but what else is out
there?", and show them Dynamic Help results based off some metadata. I
guess with no <description> that would have to be a search on the
context title or topic label?
Lee Anne Kowalski wrote:
> Hi Ben,
>
> Would you clarify which page you mean by "that page does not produce any
> results"?
>
> I mean, this is what I am picturing from what you wrote:
> a. contexts.xml file does not have a <description> element.
>
> b. As a result, when the user clicks F1, it goes directly to the Help
> Contents help topic that's identified in the <topic> element of the
> contexts.xml
>
> Where are you seeing the "Related Topics" link being displayed then,
> with no results? In the Help Contents help topic page itself?
>
> --Lee Anne
>
> Ben Vitale wrote:
>> Thanks for weighing in Chris. That helps to clarify.
>>
>> If we remove the description, and then F1 opens the help directly, the
>> "Related Topics" link from that page does not produce any results. Is
>> there any way we can workaround that?
>>
>> Chris Goldthorpe wrote:
>>> That is the intended behavior. If we made every context with a single
>>> link open directly it would be a change in behavior and we would
>>> almost certainly get complaints.
>>>
>>> We need to distinguish between the case where there is a single link
>>> but the user wants the old behavior and where there is a single link
>>> which should open the topic directly. The description serves no
>>> purpose if the link is opened directly so we have made the rule that
>>> if there is a description you get the standard behavior of displaying
>>> the description and a link.
|
|
|
Re: Context sensitive help: If only one topic, go straight to it. [message #622614 is a reply to message #474882] |
Mon, 24 November 2008 14:42 |
Lee Anne Kowalski Messages: 54 Registered: July 2009 |
Member |
|
|
Hi Ben,
Thanks for clarifying the scenarios. That helps a lot.
I am under the impression that Dynamic Help was using the title
attribute on the <context> element in the contexts.xml file as the input
to its search. That doesn't explain why you'd get search results with a
description but no title--so maybe under the covers it is an OR search
expression of the title attribute and description values. In previous
releases, I think it was using a combination of the part name and
perspective name. Chris Goldthorpe would have to clarify how that part
works now in 3.4.
I think that you can also define the search expression to use in your
context provider. That allows for more sophisticated results, using
expressions and values that you control. See:
http://help.eclipse.org/ganymede/index.jsp?topic=/org.eclips e.platform.doc.isv/guide/ua_help_context_dynamic.htm
--Lee Anne
Ben Vitale wrote:
> Scenario #1: Specify a <context> with a <description> element and a
> single <topic> element. Press F1 at runtime and the "Related Topics"
> page shows up, with two parts, a section at the top with a single link
> to the topic, and a section at the bottom with Dynamic Help search results.
>
> Scenario #2: Specify a <context> with NO <description> element and the
> same single <topic> element as Scenario #1. Press F1 and it goes
> straight to the single topic. At the bottom of the help view, there are
> a set of "Go To" links, one of which says, "Related Topics". Clicking
> this produces a page with Dynamic Help results.
>
> I'm guessing Dynamic Help is using the <description> as an input to the
> Dynamic Help search. So the workaround I'm looking for is a way to get
> the "straight-to-topic" behavior (no <description> element), but also
> allow the user to say, "OK, this topic was helpful, but what else is out
> there?", and show them Dynamic Help results based off some metadata. I
> guess with no <description> that would have to be a search on the
> context title or topic label?
>
|
|
|
Goto Forum:
Current Time: Wed Dec 11 12:59:37 GMT 2024
Powered by FUDForum. Page generated in 0.04502 seconds
|