Skip to content

Adjust grid in simple item view#4720

Open
alanorth wants to merge 3 commits into
DSpace:mainfrom
alanorth:simple-item-view
Open

Adjust grid in simple item view#4720
alanorth wants to merge 3 commits into
DSpace:mainfrom
alanorth:simple-item-view

Conversation

@alanorth
Copy link
Copy Markdown
Contributor

@alanorth alanorth commented Sep 12, 2025

Description

The Bootstrap grid is composed of 12 columns and several of our item pages are not using the entire grid on medium displays and up, for example 4+6 (10) on the untyped item display and 4+7 (11) on publication entity pages. To make things even more confusing, our search results pages use a grid layout of 3+9!

This adjusts all item views to use 3+9 to be consistent with the search result lists and to allow more space to be used for things like abstracts and citations. To improve readability, I have included a change to limit the max-width of the item page fields to 75ch.

Before and after screenshots on an "xl" viewport according to Bootstrap (this is a 14" laptop screen).

Before

Screenshot 2026-02-25 at 12-48-21 Music and Early Language Acquisition

After

Screenshot 2026-02-25 at 12-48-25 Music and Early Language Acquisition

I tested with this item on DSpace sandbox: https://sandbox.dspace.org/items/b1689b37-5002-4646-b85f-4c5070d208a3

Instructions for Reviewers

Please add a more detailed description of the changes made by your PR. At a minimum, providing a bulleted list of changes in your PR is helpful to reviewers.

List of changes in this PR:

  • First, adjust columns on medium size screens to utilize the full twelve columns of the Bootstrap grid
  • Second, adjust the max-width of item view fields to 75 characters, in line with a handful of readability best practices

Include guidance for how to test or review your PR. This may include: steps to reproduce a bug, screenshots or description of a new feature, or reasons behind specific changes.

Checklist

This checklist provides a reminder of what we are going to look for when reviewing your PR. You do not need to complete this checklist prior creating your PR (draft PRs are always welcome).
However, reviewers may request that you complete any actions in this list if you have not done so. If you are unsure about an item in the checklist, don't hesitate to ask. We're here to help!

  • My PR is created against the main branch of code (unless it is a backport or is fixing an issue specific to an older branch).
  • My PR is small in size (e.g. less than 1,000 lines of code, not including comments & specs/tests), or I have provided reasons as to why that's not possible.
  • My PR passes ESLint validation using npm run lint
  • My PR doesn't introduce circular dependencies (verified via npm run check-circ-deps)
  • My PR includes TypeDoc comments for all new (or modified) public methods and classes. It also includes TypeDoc for large or complex private methods.
  • My PR passes all specs/tests and includes new/updated specs or tests based on the Code Testing Guide.
  • My PR aligns with Accessibility guidelines if it makes changes to the user interface.
  • My PR uses i18n (internationalization) keys instead of hardcoded English text, to allow for translations.
  • My PR includes details on how to test it. I've provided clear instructions to reviewers on how to successfully test this fix or feature.
  • If my PR includes new libraries/dependencies (in package.json), I've made sure their licenses align with the DSpace BSD License based on the Licensing of Contributions documentation.
  • If my PR includes new features or configurations, I've provided basic technical documentation in the PR itself.
  • If my PR fixes an issue ticket, I've linked them together.

@alanorth alanorth requested a review from EikLoe September 12, 2025 06:54
@alanorth alanorth added quick win Pull request is small in size & should be easy to review and/or merge ux User Experience related works port to dspace-7_x This PR needs to be ported to `dspace-7_x` branch for next bug-fix release port to dspace-8_x This PR needs to be ported to `dspace-8_x` branch for next bug-fix release port to dspace-9_x This PR needs to be ported to `dspace-9_x` branch for next bug-fix release labels Sep 12, 2025
@alanorth
Copy link
Copy Markdown
Contributor Author

alanorth commented Sep 12, 2025

On second thought, perhaps the previous grid was doing this deliberately to optimize the line length for readability? Many studies show a "sweet spot" being:

We can set the CSS max-width property using character units (ch) on the item view and other pages, for example max-width: 75ch. This makes sense at least for abstracts, citations, descriptions, etc.

@mwoodiupui
Copy link
Copy Markdown
Member

Heh, there's a reason that the old fixed-pitch "dumb terminal" had an 80-column display, and it wasn't just because tab cards were that wide.

@tdonohue tdonohue moved this to 🙋 Needs Reviewers Assigned in DSpace 10.0 Release Sep 12, 2025
@EikLoe
Copy link
Copy Markdown
Member

EikLoe commented Feb 24, 2026

Hi @alanorth ,
thanks for the PR. I think, it would be good to fix this column issue on the item-view. Nevertheless I agree, it improves readability to reduce the max-width property on item pages. This might also be helpful for community and collection descriptions.

@alanorth
Copy link
Copy Markdown
Contributor Author

Thanks @EikLoe. I just realized that the simple publication (entity) view uses a strange grid as well: 4 + 7! So that, in addition to the simple untyped-item view using 4+6, is another weird grid.

I think we should do something here too. I think we should use the correct the grid and apply a max-width of 75ch.

@EikLoe
Copy link
Copy Markdown
Member

EikLoe commented Feb 24, 2026

Yes, I agree with you!
And I see, it's the same with all the other entity-pages:

  • Journal, JournalIssue, JournalVolume: 4, 6
  • OrgUnit, Person, Project: 4, 7

@alanorth alanorth changed the title src/app/item-page: adjust space in simple item view Adjust grid in simple item view Feb 24, 2026
@alanorth alanorth removed port to dspace-7_x This PR needs to be ported to `dspace-7_x` branch for next bug-fix release port to dspace-8_x This PR needs to be ported to `dspace-8_x` branch for next bug-fix release port to dspace-9_x This PR needs to be ported to `dspace-9_x` branch for next bug-fix release labels Feb 24, 2026
@alanorth
Copy link
Copy Markdown
Contributor Author

alanorth commented Feb 24, 2026

I updated this to fix the entity item pages as well.

I removed the change to adjust columns (3+9) on large displays for now, though I think that would be an improvement to DSpace's out-of-the-box user interface. And I have not figured out how to apply a max-width of 75 characters yet. I also think it would be good (in another pull request) to increase the default thumbnail size.

I also removed the port to previous branches because I thought it may be too much of a change.

What do you think?

@alanorth
Copy link
Copy Markdown
Contributor Author

alanorth commented Feb 25, 2026

@EikLoe today I realized that the search result list uses a grid of col-md-3 and col-md-9, so perhaps we should use that for item views as well to be consistent.

I will update the PR to this effect, and I will add a max-width of 75 on item page field components.

Edit: I tried to get the max-width to apply to the item-page-field div in src/app/item-page/simple/field-components/specific-field/item-page-field.component.ts by adding a style there, but I can't figure out why it isn't working.

The Bootstrap grid is composed of 12 columns, but we are not using
the entire grid, which could lead to unexpected stacking depending
on the viewport size. This also adjusts the columns to be consist-
ent with the sizing use by the search results page (3+9).
@alanorth alanorth force-pushed the simple-item-view branch 2 times, most recently from 974f09e to 42c2617 Compare February 25, 2026 09:57
Copy link
Copy Markdown
Member

@EikLoe EikLoe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would agree. The 3-9 col system sounds reasonable to me.

@alanorth
Copy link
Copy Markdown
Contributor Author

Thanks @EikLoe. I tried your method and it works—I've updated the PR.

Copy link
Copy Markdown
Member

@EikLoe EikLoe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Look good as far as can see, I just saw, you still had the 4-8 schema in the org-unit and person item-page.

Comment thread src/app/entity-groups/research-entities/item-pages/person/person.component.html Outdated
Comment thread src/app/entity-groups/research-entities/item-pages/person/person.component.html Outdated
@github-project-automation github-project-automation Bot moved this from 🙋 Needs Reviewers Assigned to 👀 Under Review in DSpace 10.0 Release Feb 27, 2026
The Bootstrap grid is composed of 12 columns, but we are not using
the entire grid, which could lead to unexpected stacking depending
on the viewport size. This also adjusts the columns to be consist-
ent with the sizing use by the search results page (3+9).
Set max-width of item-page-field components to 75 characters. This
is in line with some best practices regarding readability, though
may need to be adjusted in the future.

See the following recommendations:
  - 50 to 75 characters: https://baymard.com/blog/line-length-readability
  - 60 to 80 characters: https://pimpmytype.com/line-length-line-height/
  - 50 to 75 characters: https://www.uxpin.com/studio/blog/optimal-line-length-for-readability/
  - 50 to 75 characters: https://medium.com/@wblekhoa/talk-aboutthe-optimal-length-of-text-in-ux-ui-525e689f0b71
  - Less than 80 characters: https://www.w3.org/WAI/WCAG21/Understanding/visual-presentation.html
@alanorth
Copy link
Copy Markdown
Contributor Author

alanorth commented Feb 27, 2026

Look good as far as can see, I just saw, you still had the 4-8 schema in the org-unit and person item-page.

Ah yes thanks, I didn't notice those. Updated now.

Copy link
Copy Markdown
Member

@EikLoe EikLoe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thanks @alanorth! 👍🏾

@github-actions
Copy link
Copy Markdown

Hi @alanorth,
Conflicts have been detected against the base branch.
Please resolve these conflicts as soon as you can. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merge conflict needs discussion quick win Pull request is small in size & should be easy to review and/or merge ux User Experience related works

Projects

Status: 👀 Under Review

Development

Successfully merging this pull request may close these issues.

4 participants