Skip to content

feat(versions): display resource type label - #972

Open
liptakpanna wants to merge 2 commits into
CERNDocumentServer:masterfrom
liptakpanna:version-resourcetype
Open

liptakpanna wants to merge 2 commits into
CERNDocumentServer:masterfrom
liptakpanna:version-resourcetype

Conversation

@liptakpanna

@liptakpanna liptakpanna commented Sep 16, 2026 •

Copy link
Copy Markdown
Contributor

needs inveniosoftware/invenio-app-rdm#3581
Closes #944

  • Test with EP approval number

How it looks:
Screenshot 2026-09-16 at 14 01 35

Alternative look without the labels:
Screenshot 2026-09-16 at 13 34 11

@zzacharo

Copy link
Copy Markdown
Contributor

what about one version with the resource type under the version number?

@liptakpanna

liptakpanna commented Sep 16, 2026 •

Copy link
Copy Markdown
Contributor Author

what about one version with the resource type under the version number?

Screenshot 2026-09-16 at 16 33 51

@jbenito3

Copy link
Copy Markdown

what about one version with the resource type under the version number?

Screenshot 2026-09-16 at 16 33 51

I like this version.

@liptakpanna

Copy link
Copy Markdown
Contributor Author

Also adding possible future extension with access labels could look like this (not in scope for current issue)
Screenshot 2026-09-30 at 16 38 07

@sakshamarora1

Copy link
Copy Markdown
Contributor

I think it might be better to just have the icon in the red for restricted? Otherwise it just seems a bit too much
And maybe worth exploring hovering options? 👀

@palkerecsenyi

Copy link
Copy Markdown
Member

Thank you @liptakpanna this will be very useful! Just my personal opinion, maybe the contrast of the labels is too strong? I think for me at least the version number should be the most prominent element, and right now the "restricted" is bright red so by far the most prominent. I'm not sure what would look best.

Also, does it make sense to put a "restricted" label and the resource type labels on record where both of these are the same across all versions? E.g. for the internal/restricted record for EP approval records, these will probably be the same for all versions.

@liptakpanna

Copy link
Copy Markdown
Contributor Author

Thanks for all your feedback!

In the current approach, I reused the existing labels to avoid confusion about why they might look different elsewhere, hoping that familiarity leads to a better UX.

Hiding the labels when all items are identical is a great suggestion, so I created a few prototypes to test it out:

Original:
1.
Screenshot 2026-10-01 at 15 04 15

Not displaying the resource type if it matches the currently selected version:
2.
Screenshot 2026-10-01 at 14 37 56
3.
Screenshot 2026-10-01 at 14 38 08

Not displaying the resource type and access status if it matches the currently selected version:
4.
Screenshot 2026-10-01 at 15 09 17

Other record with less diversity:
5.
Screenshot 2026-10-01 at 14 43 20
6.
Screenshot 2026-10-01 at 14 43 31
7.
Screenshot 2026-10-01 at 15 09 34

Personally, I feel that having 0 labels in some rows and 2 in others makes it less uniform.

Alternatively, hiding labels only when all versions share the same value (rather than just comparing against the current version) would require a complex change upstream (fetching all versions or visible only?, make the calculations, pass the info down from RecordVersionsList to RecordVersionItem). But if anybody has a suggestion for this approach (with avoiding race condition), please let me know :)

To summarize the proposed approaches:

  • Displaying both labels in every case
  • Not displaying the ones that match the current version's
    • resource type
    • access status
    • both

@palkerecsenyi

Copy link
Copy Markdown
Member

Amazing, thank you for the designs @liptakpanna! Looked at it with @jbenito3 and @sakshamarora1, we think number 7 looks good, i.e. only showing either type of label (access level & resource type) if it differs from the currently selected one. If we do that then I think it looks perfect. Even if it looks less uniform, I think that's good because it makes the differences of that version very visually prominent.

If I understand correctly, the vast majority of records on CDS will look like the non-diverse record. So in nearly all cases there will be no labels shown whatsoever which is nice.

I think this is enough of a check, we don't need to check that all versions share the same resource type, only showing the ones that differ from the currently selected one should be enough IMO.

@jbenito3

jbenito3 commented Oct 1, 2026

Copy link
Copy Markdown

we were also wondering if "metadata only" tag is really needed there.

@zzacharo

zzacharo commented Oct 1, 2026

Copy link
Copy Markdown
Contributor

we were also wondering if "metadata only" tag is really needed there.

I was thinking the same.... I would keep it to open or restricted to indicate change on access control, not if a file exists or not...

@kpsherva

kpsherva commented Oct 1, 2026

Copy link
Copy Markdown
Contributor

I would keep it max only to restricted/resource type. I think then we are really overloading the interface

@kpsherva

kpsherva commented Oct 1, 2026 •

Copy link
Copy Markdown
Contributor

in addition, after seeing the available options, I would just display resource type and "restricted" (if applicable) at all times, regardless if the resource type changed or not... otherwise it starts to look chaotic to me
to summarise, I prefer this option:
#972 (comment)

@liptakpanna
liptakpanna force-pushed the version-resourcetype branch from 0bdc621 to e79d2c5 Compare October 1, 2026 14:56
@liptakpanna

Copy link
Copy Markdown
Contributor Author

thanks everybody!
@kpsherva updated the PR to this version
Screenshot 2026-10-01 at 16 55 27

This branch has not been deployed

No deployments
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.

add resource type labels to versions list (side panel of the landing page)

6 participants