Project Publisher - links to Glossary Items?


#1

The Project Publisher does a good job of exporting an entire project to an html structure.
The elements which contain sub diagrams let me link to them as I would expect.

The Glossary Items show up LOOKING LIKE links as they do inside VPP but clicking on the links in the html structure does not behave the same way as within VPP.

Inside VPP, clicking on a glossary item takes you straight to the glossary explanation.

That’s exactly what I want in the html version. Instead it takes me to a page summarising the Element containing the glossary term, rather than the glossary itself.

I’ve looked at some of the html pages and what appears to be happening is that the html generates an image of the relevant diagram, then places dynamic links corresponding to the positions of the elements on the image, which is clever stuff, but it doesn’t drill down to the content of the element (to find such things as the glossary items within. And of course, this leads potential readers to see what looks like links but aren’t really.

Is there a solution to this or are we required to rejig the pages in an html editor to insert the missing links?

and - if we are forced to insert our own links - where can we retrieve the link ids for individual glossary items and how would be export the glossary itself to a location in the html tree where we could access the individual items?


#2

As clicking on glossary item, is it really showing “a page summarising the Element containing the glossary term”, is better than showing “the glossary itself” ?

In fact, I click on link is going to get the detail about the glossary.


#3

and are your glossary terms contained within an element?

If so, it suggests an issue with the advanced settings on the Project Publisher.
For example I’ve already found that you have a choice as to whether clicking on an element takes you to a sub diagram or to a reference. Is there another which determines whether Glossary links are treated as links to the Glossary?


#4

Thanks for you suggestion.

I am sorry about that, in the past (version 13.2 or before), we opened glossary term in glossary diagram (summary of glossary).
But we changed this behavior to be opening details of that term (from version 14.0).

I think we will support an option to let you decide opening summary/details of the term(s).
I will post the news here when we supported it.
Thanks :wink:


#5

well that’ll be useful. Right now we’re paying a web designer to crawl through the html repairing the missing links! And every time we update the project, he’s going to have to repeat the process and we’re going to have to pay him again!


#6

Hi Harry,

I would like to let you know our engineers enhanced the software which now support specify the behavior on navigation of glossary term in published document. Please update the software to latest patch build (v14.2 sp1_20171215bd or later) to get this enhancement. Details about update to latest patch can be found at

  • Please make sure you have pressed the “Update to latest patch” button on the left hand side of the dialog right after launching the update program

After update to patch you can specify the behavior under Advanced Options > Jump to glossary grid from highlighted glossary term in Project Publisher.

image

Feel free to contact me if you require any further information and wish you have a good day!

Best regards,
Rain Wong


#7

Potentially excellent news Rain, but we appear to have a problem with the patch updater.

After running the patch update, it went through all the motions of downloading a couple of hundred Mb of patch files and appeared to install them, but when I checked the version, it’s still showing
14.2 (BUILD SP1_20171215AX)

And the “Jump” option has not appeared in my advanced options.

Ran the patch updater again and it says "you are runniing the latest patch. No need to update.

and just to confuse matters further, I have checked the files in the Lib folder and five of them have been updated today. (vpserver.jar, vpplatform.jar, lib02.jar, lib01.jar and ant.jar)

Suggestions?


#8

could be my bad. Don’t think I followed the instructions closely enough. Just treid again and, this time read the info.

Couldn’t have clicked the “Patch” button, on the left and, instead, ran a normal update. It obviously download something so I must have been a general patch behind.

How do I reset the system to allow me to download the special patch?


#9

hmmm… not as guilty as I thought

I’ve just used Rollback to revert my VP to 20171215am

Ran the patch updater again and, as you can see from this screengrab

the only option avaliable IS the standard update that will take me to the version it did yesterday (20171215ax)

The Update to latest patch button is clearly inactive.

Should I repeat the standard update, or await further advice?


late news. Just experimentally clicked the “Configure Update Source” button
and this came up:

and, as you can see, the “Update to latest patch” button became active. Clicked on it, and found myself back at the previous screen only offering the update to version “ax” instead of “bd”

Next?


#10

Please try update to patch build again and this time should bring you to sp1_20171215bf which contain the enhancement.

Best regards,
Rain Wong


#11

OK, neither the “Update to Latest Patch” nor the bf version were available but I did notice that the default update was now “bi” and guessed that it would include anything in bf. So I applied that patch and the “jump” option is now available.

So then I republished the project and checked out the links. It is not jumping to the glossary. And if I click on the box (avoiding the link) it now no longer jumps to a linked drawing (if there is one).

I’ll play about with it some more to see if I’m missing something but first impression is that it’s actually made things worse than they were. (although, of course, I can always disable the jump option and get back to square one - haven’t tested that yet)

More later…


#12

Hi, I just tested on ‘bi’, the ‘jump to Glossary GRID’ option seems has no problem.

PS: the option is “Jump to Glossary GRID”.
If you misread that is “Jump to Glossary”, and so, you turned it off. Then it will become Jump to Glossary

If you really misread, that should be my problem, that I named it “Jump to Glossary Grid”.
perhaps, I should name it “Open Glossary Grid”. :thinking:


#13

still haven’t had a chance to fully test it. I can live with jumping to the grid as long as it does so leaving us on the right entry (which it seems to so far)

Two things have been obvious in the brief look I’ve taken.
1 where a box has multiple glossary refs, clicking only deals with the first one, so they’re obviously not behaving like links

2 where there is a linked drawing - even from an object with no glossary ref - clicking it no longer opens up the linked drawing, although we can click bottom left or right and choose a destination from the popup.

More after Xmas

Have a good un


#14

Have now had time to test it fairly thoroughly.

Sadly, this implementation is next to useless.

What is required in any half decent web design, when you click on a glossary link, is for a small (but expandable) window to pop up with the relevant glossary text in it (and the ability to navigate directly to other glossary entries from within that popup window, if the initial entry includes other linked references)

In addition, each object on a drawing may have multiple glossary entries and multiple references to other drawings and ALL of those need to work as well in the html as they do within VP itself.

Anything less is frankly useless as it entails a huge amount of effort to “fix” the html to make it presentable.

Now I realise that I may be expecting too much (at least in one bite) as I have some idea of how complex it would be to get the html output to work like that, so I suggest a compromise which will at least speed up the manual fix.

i.e. in the html output, don’t waste your/our time with ugly links like we now have to the entire glossary grid in a ridiculously small font and no (or unpredictable) text wrapping. Instead, just include in the code an absolute reference (to drawing or glossary entry) such that a competent web designer can write a template to present the links as required, just by pasting the absolute reference in. That would reduce the effort on your part and ours.

Make sense?


#15

Sorry for late reply…

Right, it will be very complex to support action on the text(s) of a diagram image.


If on top of the shapes to support the Text(s), it is really very complex. Sorry
PublisherTermOnText
Btw, there is no problem to support highlighted term(s) in pure text.


Sorry, about this:

I get the result on the Glossary Grid, which has text wrapping, and seems in normal font size (seems is 12px).


Can you explain (capture me a screenshot?) how ugly on your results?


I am not quite understand how do it works. But we will discuss with our engineers. Thanks


#16

“Right, it will be very complex to support action on the text(s) of a diagram image.”

That was my first impression but, since I’ve dug in and done it manually, I now disagree!

Have you taken a look at the example I provided with the anon version?

If not, I suggest you do. Read the notes.txt first.

It entails

  1. Identify the glossary terms.
    VP obviously already does that, in order to highlight the term and underscore it. Whatever part of the code is doing that, needs a hook for the new routine. The new routine will
  2. identify the point of origin (co-ordinates) of the term within the diagram
  3. capture the font and length of the term
  4. create a matching transparent hotspot (based on an existing “shape”) at precisely the same co-ordinates, ordered “on top”
  5. capture the unique glossary id (the “system data” buried in the glossary)
  6. create a relative url based on your existing url naming convention
    i.e “Glossary_(unique_id)” yielding something like: …\content\Glossary_TdWYV_qGAqACRAwT.html
  7. embed the url in the hotspot’s reference field.

Job done.

That is essentially what I’ve done manually and it works a treat. But it is a pain in the arse doing that manually for an average of 40-60 links per page and 65 pages. It takes about an hour per page. I suspect you could complete and test the code to make VP do all that before I complete my manual version!

There is only one complication with the above and that arises from the obvious fact that my hotspots aren’t logically bound to their underlying glossary texts. So if I alter the text or move the element, the hotspots can be separated from their texts. The workaround for that is, on completion of any large element (like an extensive note with a couple of dozen links in it) I “group” the whole thing so they can’t get accidentally separated. But that complication wouldn’t arise if you automated it because there would be a logical link between each glossary term and its hotspot.


“Btw, there is no problem to support highlighted term(s) in pure text.”

apart from your presentation which is in a new window for each term. That’s bizarre. NOBODY creates a web page like that. They should be appearing in popups over the relevant diagram.

My web developer created the quick and dirty (but very effective) bash script to convert all the “new window” calls to popups for every diagram where I’ve completed the hotspots.

The point of including it is
a) if any other poor sod is wading through the same job I’m doing, they’re welcome to use it but more importantly,
b) just to show that it can be done, in short order.

again, it would be a lot easier for us if you were to incorporat these changes into your code and it would make your html output at least 10 times more useful than it currently is.

#!/bin/bash

DIR="content/"
AD=“ActivityDiagram*”
#AD="ActivityDiagram_BiLYkfqGAqAACh7y.html"
EXC="menu"
F_POPUP_HEADER=“basicPopup.inj”
#F_POPUP_HEADER=“test.inj”
#S_POPUP_HEADER="script>\n</head>"
S_POPUP_HEADER=“script>
</head>“
OUT=””

sanity

if [ ! -d “$DIR” ]; then
echo "Folder $DIR doesn’t exist, exiting."
exit 1
fi

if [ ! -f “./$F_POPUP_HEADER” ]; then
echo "$F_POPUP_HEADER not found!"
exit 2
fi

load files into vars

R_POPUP_HEADER=cat $F_POPUP_HEADER

cd $DIR

inject html diagram files

for f in $AD; do
if [[ ! $f == “$EXC” ]]; then

# header
#sed "s/${S_POPUP_HEADER}/${R_POPUP_HEADER}/" ${f} > ${f}.new    
perl -p0e "s/${S_POPUP_HEADER}/${R_POPUP_HEADER}/g" ${f} > ${f}.new.html

# popup
#sed "s/href.*(onmouseover=\"storeReferenceAndSubdiagramInfos)/onclick=\"basicPopup('ActivityAction_81X74fqGAqAAChJ2.html');return false\" onmouseover=storeReferenceAndSubdiagramInfos/g" ${f}.new > ${f}.new.html
# perl -p0e "s/href.*(onmouseover=\"storeReferenceAndSubdiagramInfos)/onclick=\"basicPopup('ActivityAction_81X74fqGAqAAChJ2.html');return false\" onmouseover=storeReferenceAndSubdiagramInfos/g" ${f}.new > ${f}.new.html    

# MATCH links to glossary
# S=`perl -ne "print if/<area.*javascript:window.open.*storeReferenceAndSubdiagramInfos/" ${f}.new.html`

# MATCH links to glossary
S=`perl -ne "print if/<area.*href.*javascript:window.open.*/" ${f}.new.html`

while read -r line
do
	# If not matched, exit loop
	if [ -z "$S" ]; then
		break
	fi 

	# Breaking circular buffer to retain persistence
	if [ -n "$OUT" ]; then
		echo "$OUT" > ${f}.new.html
	fi

	# show original line
	#echo $line

	# replace stuff within the line
	fixed=`echo "$line" | perl -p0e "s/href/onclick/g" | perl -p0e "s/javascript:window.open/basicPopup/g" | perl -p0e "s/;void\(0\)/;return false/g"`
	#echo $fixed

	# replace within the file with the fixed-up line
	#perl -p0e "s/${esc_line}/${esc_fixed}/g" ${f} > ${f}.new.fixed.html
	#sed "s|${line}|${fixed}|" ${f}.new.html > ${f}.new.fixed.html
	OUT=$(sed "s|${line}|${fixed}|" ${f}.new.html)

done <<< "$S"

# Output only if not empty
if [ -n "$OUT" ]; then
	echo "$OUT" > ${f}.new.fixed.html
	echo $(ls -alh ${f}.new.fixed.html)
	# overwrite the ofiginal file?
	mv ${f}.new.fixed.html ${f}
fi

fi

OUT=""

done

Tidy up, remove fragments

rm *html.new.html

echo “Done.”


“Can you explain (capture me a screenshot?) how ugly on your results?”

Here’s an example from the anon version:

First, I’m not too concerned about the font size. If the punter can’t read it, they can zoom the window

BUT note:

  1. It is NOT auto-wrapping and worse
  2. there’s no scroll bar to move right to see the hidden text
  3. Its deleted all the carriage returns which makes it read as paragraphs within VP, so it all jumbles together.

#17

Thanks for your details reply :blush:

Clickable term in diagram image
Thanks for your notes, I think it is complex on collecting the location & size of the texts. Such as 1 term may have 2 or more bounds when it is line-wrap.

BTW, we will discuss with our engineers first. Please wait.


Showing the term in popup
May you provide a sample output (with your modification) to us?
I want to confirm your expected behavior first:

Clicking a term will show
A. the term details, or
B. the Glossary Grid with highlighted that term
, and it should be shown in a popup. (not shown in a new page, no matter in current/new window)

If A, it shown in popup should be a good behavior. And I think we should design a new ‘details page’ for this feature.
But if B, seems showing a Glossary Grid in a popup is not a normal behavior.

So, if you can send us a sample, we can capture the requirements clearly.


Ugly description
background: in VP, normally, the description of the model elements are written in HTML.
If you can send us the sample, can your sample contains one of your description?
as following, if the description is in simple HTML, the line-wrap should be no problem:

but if the description is written with some formatted tag (such as <pre>), then will not work:

With your sample, we can check what format makes the output ugly, and try to fix it. Thanks :pray:


#18

No offence Peter. Your English is obviously somewhat better than my Mandarin (or whatever) but I am finding it difficult to understand your comments.

I’ll try to answer what I (think) I can understand.

" I think it is complex on collecting the location & size of the texts. Such as 1 term may have 2 or more bounds when it is line-wrap."

That’s a fairly trivial objection. I for one would have no problem seeing the hotspot limited to the first line of such a term (with a warning to users that this is how it will behave). In addition, I did face that problem with a few of my own terms, so I just made minor modifications to the text to ensure that it fits on one line.


I don’t understand most of what you’ve written here:

Showing the term in popup
May you provide a sample output (with your modification) to us?
I want to confirm your expected behavior first:”

I’ve already provided the full anonymised project complete with the demonstration of how to achieve the desired behaviour. What more do you need?

" Clicking a term will show
A. the term details, or
B. the Glossary Grid with highlighted that term
, and it should be shown in a popup. (not shown in a new page, no matter in current/new window)

If A, it shown in popup should be a good behavior. And I think we should design a new ‘details page’ for this feature.
But if B, seems showing a Glossary Grid in a popup is not a normal behavior.

So, if you can send us a sample, we can capture the requirements clearly."

as I say, you’ve got the complete working example already. What are you asking for that isn’t already in your possession?


Ugly description
background: in VP, normally, the description of the model elements are written in HTML.
If you can send us the sample, can your sample contains one of your description?
as following, if the description is in simple HTML, the line-wrap should be no problem:
SimpleDescription… (etc)
“With your sample, we can check what format makes the output ugly, and try to fix it.”

again, you’ve already got the sample. What am I missing in this conversation?


#19

Thanks, we got your sample, and our engineer confirmed, there is no difficulty on collecting the highlighted terms.

We will enhance project publisher to support :
i. click-able highlighted term on diagram image.
ii. 3 options to handle clicking a term to :
a. show that term details page in new popup window (New option)
b. show that term details page in current window (Existing option)
c. show that term in glossary grid page in current window (Existing option)

after i & ii, we will try to find out which description failed in auto line-wrap.

Will keep you informed.


#20

Highlighted Term
The enhancements of clicking highlighted-term are done. Please update to latest patch to try this enhancement.

Ugly Description
It is because there are some Long Word showing in the table cell.
Such as the cali term. Its 2nd-last line.


Since it is one word, so, no line-wrap applied on it.

Seems we can apply CSS style into the table:
display:inline-block; word-break: break-all;
to make line-wrap apply on each characters. But it will split a normal word into 2 lines too

if apply
display:inline-block; word-break: break-word;
(based on our testing)
Chrome can show that one word into 2 lines.
Firefox won’t wrap that long word.

Sorry, we have no solution to break a long-word, but keep short-word.