Publish Dataset button displays a dropdown arrow when only one action is available

Aperta Adatta ai principianti
#12,837 2 commenti 2 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
78/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
html, java, javascript
Ambito
frontend, web-dev

Direzione di ricerca

Inizia da src/main/webapp/dataset.xhtml e confronta la condizione di rendering del pulsante Publish Dataset con il template Dataverse 6.9 collegato nell’issue. Riproduci il caso in cui Publish è l’unica azione disponibile e verifica che il pulsante non abbia una freccia a discesa e apra comunque la finestra di dialogo di conferma; poi verifica che la freccia rimanga quando sono disponibili altre azioni.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Type: Bug

What steps does it take to reproduce the issue?

  • When does this issue occur?

    1. Open an unpublished draft dataset in Dataverse 6.12.
    2. Ensure that the user has permission to publish the dataset.
    3. Locate the Publish Dataset button.
    4. Observe the dropdown arrow next to the button label.
    5. Click the button.
  • Which page(s) does it occurs on?
    The dataset landing page (dataset.xhtml).

  • What happens?

    The Publish Dataset button displays a dropdown arrow even when Publish is the only available action.

    Clicking the button directly opens the Publish confirmation dialog rather than displaying a dropdown menu.

    The rendered HTML includes , but the button does not have the dropdown-toggle class or data-toggle="dropdown" attribute.

    Comparing the upstream dataset.xhtml templates reveals a change in the condition controlling the arrow.

    Dataverse 6.9: jsf:rendered="#{(showSubmitForReviewLink or showReturnToAuthorLink) and showPublishLink}"
    Dataverse 6.12: jsf:rendered="#{(showSubmitForReviewLink or showReturnToAuthorLink or showPublishLink)}"
    In 6.12, the arrow is displayed whenever showPublishLink is true, even if no additional actions are available.

  • To whom does it occur (all users, curators, superusers)?
    Users with permission to publish a dataset when Publish is the only available action. The issue was observed with an account authorized to publish datasets.

  • What did you expect to happen?

    The Publish Dataset button should display a dropdown arrow only when multiple actions are available.

    When Publish is the only available action, the button should appear without a dropdown arrow and continue opening the Publish confirmation dialog directly.

Which version of Dataverse are you using?
v. 6.12.1 build master-bddc062

Any related open or closed issues to this bug report?
Relevant source files:

Dataverse 6.9 – dataset.xhtml

Dataverse 6.11 – dataset.xhtml

Dataverse 6.12 – dataset.xhtml

Screenshots:

6.8:

Image

6.12:

Image
Lingua principale
Java
Stelle
1.1k
Fork
571
Merge medio
1g 17h
PR unite (30g)
11

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di IQSS/dataverse

Tutte le issue di IQSS/dataverse

Issue simili

Altre issue su Java

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.