Skip to content

ZCU-PUB/fix(item-page): drop embargo badge onto its own line under the filename - #1652

Merged
milanmajchrak merged 5 commits into
customer/zcu-pubfrom
zcu-pub/fix-embargo-badge-position-1088
Nov 5, 2026
Merged

milanmajchrak merged 5 commits into
customer/zcu-pubfrom
zcu-pub/fix-embargo-badge-position-1088

Conversation

@Kasinhou

@Kasinhou Kasinhou commented Oct 21, 2026 •

Copy link
Copy Markdown

What

Fixes the embargo-badge position in the ZCU-PUB item view
(dataquest-dev/dspace-customers#1088).

Each file in the Files section is a ds-file-download-link that renders the
lock icon + filename, followed by the per-bitstream access-status badge
(ds-access-status-badge → "Embargo until <date>"). The Files list separates
entries with a projected <br/> (FileSectionComponent.separator) that lands
inside the link — so the badge wrapped onto the next visual line and ran
straight into the following file's lock icon.

Behaviour

BEFORE                                        AFTER
🔒 file.zip (81 B)                            🔒 file.zip (81 B)  [Embargo until …]
[Embargo until …] 🔒  ← glued to next file    🔒 long_file_name….pdf (84 B)
long_file_name….pdf (84 B)                    [Embargo until …]   ← wraps only if it
[Embargo until …] 🔒  ← glued to next file                         doesn't fit
  • each file sits on its own line;
  • the lock icon always stays with the start of the filename; a long filename
    wraps across lines next to the lock instead of jumping to the next line
    and leaving the lock alone;
  • the embargo badge stays inline right after the filename when it fits (with a
    small gap), and drops onto its own line under the filename only when there
    isn't room;
  • either way the badge can no longer collide with the next file's lock icon.

How

SCSS only, scoped to the custom theme's item-page file section — no template
duplication, so the base file-section template keeps propagating:

  • each ds-file-download-link is made block-level (one file per line);
  • the inner, projected <br/> separator is neutralised (block layout already
    breaks between files, so it would otherwise force the badge onto its own line);
  • word-break: break-all on the link so a long filename wraps beside the lock
    icon rather than orphaning it on its own line;
  • a 0.5rem right margin on the link for a gap before the inline badge.

The badge keeps its default inline flow, so it stays next to the filename when
there's space and wraps underneath otherwise. Because each file is its own
block, a wrapped badge can't run into the next file.

Submission (section-upload-file) and process-detail, which also reuse
ds-file-download-link, are not affected (the rule is scoped to
:host ::ng-deep .file-section).

Verification (local)

  • Backend: zcu-pub Clarin fork rebuilt from source (has the per-bitstream
    accessStatus/embargo REST endpoint), running in Docker.
  • Seeded an item with 3 embargoed + 1 open bitstream.
  • Swept the file-section width from ~540px down to ~140px: the lock never gets
    orphaned, long filenames wrap beside the lock, short filenames keep the badge
    inline (with a gap), long ones wrap the badge onto the next line, and the open
    file shows no badge.

Fixes dataquest-dev/dspace-customers#1088

🤖 Generated with Claude Code

Matus Kasak and others added 2 commits October 21, 2026 12:13
…e filename (#1088)

The per-bitstream access-status badge ("Embargo until <date>") is rendered by
ds-file-download-link right after the download link. The item Files list
separates entries with a projected <br/> (FileSectionComponent.separator) that
lands inside the link, so the badge wrapped onto the next visual line and ran
straight into the following file's lock icon.

Scope the custom theme's item-page file section so each file is block-level and
the badge drops onto its own line directly under the filename:

    <lock> filename (size)
    Embargo until <date>

Done via SCSS only (no template duplication); submission and process-detail,
which reuse ds-file-download-link, keep their inline layout.

Fixes dataquest-dev/dspace-customers#1088

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@Kasinhou Kasinhou self-assigned this Oct 21, 2026
)

Collapse the nested rules into flat, single-level selectors and drop the
inline comments. Compiles to the same four selectors, so the rendered
layout is unchanged.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@Kasinhou Kasinhou changed the title ZCU-PUB/fix(item-page): drop embargo badge onto its own line under the filename (#1088) ZCU-PUB/fix(item-page): drop embargo badge onto its own line under the filename Nov 4, 2026
Matus Kasak and others added 2 commits November 4, 2026 16:21
Drop the `display: block` on the access-status badge so it flows inline
after the filename and only wraps onto its own line when it does not fit.
Each file stays block-level, so a wrapped badge still cannot collide with
the next file's lock icon.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…name (#1088)

- add a 0.5rem gap between the filename and the inline access-status badge
- word-break: break-all so the filename wraps beside the lock icon instead of
  jumping to the next line and leaving the lock orphaned on its own line

Verified across widths (140-240px): the lock always stays with the start of the
filename, and the badge stays inline when it fits, wrapping underneath otherwise.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@milanmajchrak
milanmajchrak merged commit a199694 into customer/zcu-pub Nov 5, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants