Project

General

Profile

bug #8936

Improve default distribution formatting

Added by Andreas Müller over 1 year ago. Updated 2 days ago.

Status:
Closed
Priority:
Highest
Category:
cdm-dataportal
Target version:
Start date:
04/03/2020
Due date:
% Done:

100%

Severity:
normal
Found in Version:

Description

Currently the default is

  • Level 0-Label suffix: ":"
  • Level 1-Item group prefix: ","

This result in Text like

"Southern America:,Brazil (Brazil Northeast); Caribbean (Cuba)

which is not correct.
Better is to use

  • no (or empty) Level 1-Item group prefix and
  • Level 0-Label suffix: ": " (with space after colon)

This results in

Southern America: Brazil (Brazil Northeast); Caribbean (Cuba)

which looks much better and it is the configuration that I always adjust when configuring a new portal.

UPDATE:

The solution to this problem is to introduce an additional parameter. Using the "label_suffix" is incorrect for this purpose.

The following portals are using the "label_suffix" with a values starting with an ":":

http://portal.cybertaxonomy.org/diptera/ ':
http://portal.cybertaxonomy.org/flora-malesiana-prospective/ ':'
http://portal.cybertaxonomy.org/flora-cuba/ ':'
http://portal.cybertaxonomy.org/flora-de-la-republica-de-cuba/ ':'
http://portal.cybertaxonomy.org/rubiaceae-mexico/ ':'
http://portal.cybertaxonomy.org/algaterra/ ':'
http://portal.cybertaxonomy.org/algaterra-new/ ':'
http://portal.cybertaxonomy.org/euromed/ ':'
http://portal.cybertaxonomy.org/roteliste_animalia/ ':'
http://portal.cybertaxonomy.org/roteliste_plantae/ ':'
http://portal.cybertaxonomy.org/flora-uzbekistan/ ':
http://portal.cybertaxonomy.org/lichenes-genera/ ':
http://portal.cybertaxonomy.org/lichenes-cuba/ ':
http://cichorieae.e-taxonomy.net/portal/ ':'
http://campanula.e-taxonomy.net/ ':'
http://phycobank.org/ ':'
http://europlusmed.org/ ':'
http://caryophyllales.org/caryophyllales_spp/ ':'

Further problems causes by the misuse of the label_suffix (copied from #9756):

the footnote key should come before the colon

Example: https://132.248.13.83/cdm_dataportal/taxon/5ac79016-327e-4318-b9d8-128ddc524502 (Egeria densa Planch.)

picture423-1.png View (20.8 KB) Andreas Kohlbecker, 09/13/2021 01:42 PM

picture714-1.png View (27.7 KB) Andreas Müller, 09/22/2021 08:02 PM

picture035-1.png View (11.7 KB) Andreas Müller, 09/23/2021 01:03 PM

picture035-3.png View (9.8 KB) Andreas Müller, 09/23/2021 01:03 PM

picture953-1.png View (22.7 KB) Andreas Kohlbecker, 09/24/2021 01:31 PM


Related issues

Duplicated by Edit - bug #9756: Footnote key placement in hierarchical distributions improved Duplicate 09/13/2021

Associated revisions

Revision abf43715 (diff)
Added by Andreas Kohlbecker about 1 month ago

fix #8936 new default format for hierarchical distributions

Revision 262f020c (diff)
Added by Andreas Kohlbecker about 1 month ago

ref #8936 introducing additional hierarchical distribution style parameter + migration of old styles

Revision cbefe788 (diff)
Added by Andreas Kohlbecker 28 days ago

ref #8936 item-suffix only when child-nodes exist

Revision a8b43555 (diff)
Added by Andreas Kohlbecker 23 days ago

ref #8936 new default for level-0 item_glue

History

#1 Updated by Andreas Kohlbecker about 1 month ago

  • Description updated (diff)

#2 Updated by Andreas Kohlbecker about 1 month ago

  • Related to bug #9756: Footnote key placement in hierarchical distributions improved added

#3 Updated by Andreas Kohlbecker about 1 month ago

  • Status changed from New to Resolved
  • % Done changed from 0 to 50

#4 Updated by Andreas Kohlbecker about 1 month ago

  • Status changed from Resolved to Closed
  • Target version changed from Unassigned CDM tickets to Release 5.28
  • % Done changed from 50 to 100

#5 Updated by Andreas Kohlbecker about 1 month ago

  • Status changed from Closed to In Progress
  • % Done changed from 100 to 30

need to solve #9756 in the context of this ticket since the issues are more closely related than initially assumed

#6 Updated by Andreas Kohlbecker about 1 month ago

  • Description updated (diff)

New parameter item_suffix with default value ":"

#7 Updated by Andreas Kohlbecker about 1 month ago

#8 Updated by Andreas Kohlbecker about 1 month ago

  • Related to deleted (bug #9756: Footnote key placement in hierarchical distributions improved )

#9 Updated by Andreas Kohlbecker about 1 month ago

  • Duplicated by bug #9756: Footnote key placement in hierarchical distributions improved added

#11 Updated by Andreas Kohlbecker about 1 month ago

  • Status changed from In Progress to Resolved
  • Assignee changed from Andreas Kohlbecker to Andreas Müller

please review

#12 Updated by Andreas Müller about 1 month ago

Do you have some example links on test server?

#13 Updated by Andreas Müller about 1 month ago

  • Priority changed from New to Highest

#14 Updated by Andreas Müller about 1 month ago

  • Status changed from Resolved to Feedback
  • Assignee changed from Andreas Müller to Andreas Kohlbecker
  • % Done changed from 50 to 90

The new implementation looks very good and I guess the ticket can be closed.

The only thing I realized and was wondering about is why we don't use level-0 item glue ", " instead of " ".

Is this a user requirement? To me it looks better then having only whitespace before the next top-level element.

However, this might be a new ticket (if at all) as we have to check if this was a user requirement or not.

#15 Updated by Andreas Kohlbecker 30 days ago

  • Status changed from Feedback to Closed
  • % Done changed from 90 to 100

As far as I remember the level-0 item glue ", " was needed in some cases where only one hierarchy level of area has been used. But I am unsure which project this could have been.

Please open a new ticket if you consider having a new default highly important.

#16 Updated by Andreas Müller 29 days ago

  • Target version changed from Release 5.28 to Release 5.27

#17 Updated by Andreas Müller 28 days ago

  • File picture714-1.png View added
  • Status changed from Closed to Feedback
  • % Done changed from 100 to 80

For a portal showing also the status in the distribution string this does not look so well yet

http://test.e-taxonomy.eu/dataportal/preview/flora-cuba/cdm_dataportal/taxon/afea05be-3728-4ff4-af45-1f001bf74ef3

This seems to be a problem due to the new item suffix which tries to put the separator behind the footnote. This is not correct here. I guess we only need the old label suffix but the role for footnotes should be that they always appear immediately after the label (if no status is shown) or after the status (if a status exists and should be shown). Immediately always means before the suffix.

#18 Updated by Andreas Kohlbecker 28 days ago

  • Status changed from Feedback to Resolved
  • Assignee changed from Andreas Kohlbecker to Andreas Müller

I changed the code a bit so that the item suffix is only added when there are not child-nodes.

Additionally, I also modified the settings in the cuba portal a bit, to achieve a better layout.

The defaults never can satisfy all situations so that it will be needed to adapt them for case to case.

#19 Updated by Andreas Müller 28 days ago

AM:

wir arbeiten in diesem Release an der Optimierung des Verbreitungsstrings bezüglich Separatoren und Fußnoten. Das meiste ist bereits getan, es bleibt nur noch eine Frage: Derzeit ist die Standardeinstellung im Portal die, dass vor dem Label einer Hauptgruppe als Separator nur ein Leerzeichen, aber kein Komma steht. Ist das so gewollt? Ich würde da eher ein Komma erwarten.
Hier ein Beispiel aus den Cichorieen (Cichorium calvum):
Man kann das bereits in den Admin-Tools anpassen, so dass es nicht wirklich ein Problem ist, wenn jemand doch ein Komma haben will. Wenn aber allgemein eher ein Komma gewünscht ist statt einem reinen Leerzeichen, dann könnten wir dies auch als Standard einstellen und es müsste nicht von jedem einzeln eingestellt werden.
Ich stelle auch gerade fest, dass das bislang nur für die Cichorieen relevant zu sein scheint, da alle anderen Portale entweder keine Verbreitungsdaten haben oder nur 1 Toplevel Element (lokale Checklisten/Floren) oder eine andere Darstellung gewählt haben (neue Zeile pro Toplevel-Element).
Dennoch wäre es gut hier den besten Standardwert zu definieren, da wir gerade dabei sind.

WGB:

für mich gibt’s eine Hierarchie: Punkt, Semikolon, Komma – also würde ich hier eher das Komma bei den zusammengehörigen Einträgen setzen und Semikolon (oder Punkt) nach Gruppenabschluss. Falls 3-stufige Einträge möglich sind, sollte Punkt-Semikolon-Komma gelten

NoK:

sehe ich genau wie Walter; meine Option wäre Verwendung von Punkt + Semikolon

AM:

vielen Dank. Also alles wie es ist nur vor der Hauptgruppe ein Punkt statt wie jetzt gar nichts bzw. statt wie von mir vorgeschlagen ein Komma. Ja das macht mehr Sinn, v.a weil ja dann für das 3. Hierarchielevel das Komma genutzt wird (im Beispiel nicht zu sehen).

#20 Updated by Andreas Müller 27 days ago

Andreas Kohlbecker wrote:

I changed the code a bit so that the item suffix is only added when there are not child-nodes.

Sounds better

Additionally, I also modified the settings in the cuba portal a bit, to achieve a better layout.
The defaults never can satisfy all situations so that it will be needed to adapt them for case to case.

True, however now on test cuba looks like this:

On production with the old settings it looks like:

http://portal.cybertaxonomy.org/flora-cuba/cdm_dataportal/taxon/afea05be-3728-4ff4-af45-1f001bf74ef3

I guess the version on production was the wanted behavior. So we should try to adapt the cuba settings in a way that it look like the production version.

#21 Updated by Andreas Müller 27 days ago

In general I did not yet test other databases with status being shown. A reason was that I did not find the place where I can switch on showing the status. Can you give me a hint were to do this?

#22 Updated by Andreas Müller 27 days ago

  • Status changed from Resolved to Feedback
  • Assignee changed from Andreas Müller to Andreas Kohlbecker

#23 Updated by Andreas Kohlbecker 26 days ago

  • File picture953-1.png View added
  • Status changed from Feedback to Resolved
  • Assignee changed from Andreas Kohlbecker to Andreas Müller
  • % Done changed from 80 to 90
  1. I adapted the setting of the cuba test portal, so that it conforms to the production portal, the setting are now like:

we must not forget to adapt the production portal after the release. I will create a calendar entry.

  1. There actually is no option to suppress the status information, this has not yet be requested.

I think this ticked can be closed now, do you agree?

#24 Updated by Andreas Müller 26 days ago

  • Status changed from Resolved to Feedback
  • Assignee changed from Andreas Müller to Andreas Kohlbecker

The issue in #note-19 is still open. The suggestion is to remove Space and use Komma+Space instead for Level-0 item glue as far as I remember.

#25 Updated by Andreas Kohlbecker 26 days ago

Andreas Müller wrote:

The issue in #note-19 is still open. The suggestion is to remove Space and use Komma+Space instead for Level-0 item glue as far as I remember.

and . for level 0 item_group_postfix ?

#26 Updated by Andreas Müller 26 days ago

Andreas Kohlbecker wrote:

Andreas Müller wrote:

The issue in #note-19 is still open. The suggestion is to remove Space and use Komma+Space instead for Level-0 item glue as far as I remember.

and . for level 0 item_group_postfix ?

Hmm, not sure if this is needed. You mean to have a last character in the line? For list like distributions this may look strange, but I have not tested it myself. It may have unwanted effects on existing portals. So we have to check them. (the item glue will have impact only on Cichorieae as far as I have checked it).
But if you think the item group postfix makes sense (and has no negative side effekt) feel free to implement it.

#27 Updated by Andreas Kohlbecker 23 days ago

please can you clarify what exactly the conclusion is that results from the discussion in comment #8936#note-19?

#28 Updated by Andreas Kohlbecker 23 days ago

  • Assignee changed from Andreas Kohlbecker to Andreas Müller

#29 Updated by Andreas Müller 23 days ago

  • Assignee changed from Andreas Müller to Andreas Kohlbecker

Andreas Kohlbecker wrote:

please can you clarify what exactly the conclusion is that results from the discussion in comment #8936#note-19?

See #8936#note-24. I checked again: "remove Space and use Komma+Space instead" seems to be the correct solution.

#30 Updated by Andreas Kohlbecker 23 days ago

  • Status changed from Feedback to Closed
  • % Done changed from 90 to 100

done

#31 Updated by Andreas Müller 5 days ago

It looks item suffix is currently not yet handled correctly in Drupal Code.

Example from mexico flora: https://132.248.13.83/cdm_dataportal/taxon/dd3117eb-3ee7-42c8-8e9c-9a4e837fb333
Settings: https://132.248.13.83/admin/config/cdm_dataportal/settings/layout/taxon

The configured item suffix level 0 ist ": " but is not visible in the portal

#32 Updated by Andreas Kohlbecker 2 days ago

there was a problem with the release in the master branch, some commits have been lost. this is fixed and it is now the solution to this issue is also part of the latest relase.

Also available in: Atom PDF

Add picture from clipboard (Maximum size: 40 MB)