Project

General

Profile

Actions

bug #8936

closed

Improve default distribution formatting

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

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

100%

Estimated time:
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.)


Files

picture423-1.png (20.8 KB) picture423-1.png Andreas Kohlbecker, 09/13/2021 01:42 PM
picture714-1.png (27.7 KB) picture714-1.png Andreas Müller, 09/22/2021 08:02 PM
picture035-1.png (11.7 KB) picture035-1.png Andreas Müller, 09/23/2021 01:03 PM
picture035-3.png (9.8 KB) picture035-3.png Andreas Müller, 09/23/2021 01:03 PM
picture953-1.png (22.7 KB) picture953-1.png Andreas Kohlbecker, 09/24/2021 01:31 PM

Related issues

Has duplicate EDIT - bug #9756: Footnote key placement in hierarchical distributions improved DuplicateAndreas Kohlbecker

Actions
Actions #1

Updated by Andreas Kohlbecker about 1 year ago

  • Description updated (diff)
Actions #2

Updated by Andreas Kohlbecker about 1 year ago

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

Updated by Andreas Kohlbecker about 1 year ago

  • Status changed from New to Resolved
  • % Done changed from 0 to 50
Actions #4

Updated by Andreas Kohlbecker about 1 year ago

  • Status changed from Resolved to Closed
  • Target version changed from Unassigned CDM tickets to Release 5.37
  • % Done changed from 50 to 100
Actions #5

Updated by Andreas Kohlbecker about 1 year 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

Actions #6

Updated by Andreas Kohlbecker about 1 year ago

  • Description updated (diff)

New parameter item_suffix with default value ":"

Actions #7

Updated by Andreas Kohlbecker about 1 year ago

Actions #8

Updated by Andreas Kohlbecker about 1 year ago

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

Updated by Andreas Kohlbecker about 1 year ago

  • Has duplicate bug #9756: Footnote key placement in hierarchical distributions improved added
Actions #11

Updated by Andreas Kohlbecker about 1 year ago

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

please review

Actions #12

Updated by Andreas Müller about 1 year ago

Do you have some example links on test server?

Actions #13

Updated by Andreas Müller about 1 year ago

  • Priority changed from New to Highest
Actions #14

Updated by Andreas Müller about 1 year 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.

Actions #15

Updated by Andreas Kohlbecker about 1 year 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.

Actions #16

Updated by Andreas Müller about 1 year ago

  • Target version changed from Release 5.37 to Release 5.27
Actions #17

Updated by Andreas Müller about 1 year ago

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.

Actions #18

Updated by Andreas Kohlbecker about 1 year 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.

Actions #19

Updated by Andreas Müller about 1 year 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).

Actions #20

Updated by Andreas Müller about 1 year 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.

Actions #21

Updated by Andreas Müller about 1 year 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?

Actions #22

Updated by Andreas Müller about 1 year ago

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

Updated by Andreas Kohlbecker about 1 year ago

  • File picture953-1.png picture953-1.png 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?

Actions #24

Updated by Andreas Müller about 1 year 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.

Actions #25

Updated by Andreas Kohlbecker about 1 year 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 ?

Actions #26

Updated by Andreas Müller about 1 year 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.

Actions #27

Updated by Andreas Kohlbecker about 1 year ago

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

Actions #28

Updated by Andreas Kohlbecker about 1 year ago

  • Assignee changed from Andreas Kohlbecker to Andreas Müller
Actions #29

Updated by Andreas Müller about 1 year 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.

Actions #30

Updated by Andreas Kohlbecker about 1 year ago

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

done

Actions #31

Updated by Andreas Müller about 1 year 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

Actions #32

Updated by Andreas Kohlbecker about 1 year 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.

Actions

Also available in: Atom PDF